-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
424 lines (392 loc) · 27.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<!DOCTYPE html>
<html class="full-screen noscroll" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="description" content="Company Directory">
<meta name="keywords" content="directory, relational, database, SQL, MariaDB, DBMS, HTML, HTML5, CSS, CSS3, JavaScript, jQuery, Bootstrap, web, app, PHP, AJAX">
<meta name="author" content="Chris Walker">
<!-- Favicons -->
<link rel="apple-touch-icon" sizes="180x180" href="./resources/img/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./resources/img/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./resources/img/favicons/favicon-16x16.png">
<link rel="manifest" href="./resources/img/favicons/site.webmanifest">
<link rel="mask-icon" href="./resources/img/favicons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="./resources/img/favicons/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="./resources/img/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<!-- Bootstrap 5.0.2 CSS -->
<link rel="stylesheet" href="./vendors/css/bootstrap.min.css">
<!-- Font Awesome CSS -->
<link rel="stylesheet" type="text/css" href="./vendors/css/all.css">
<!-- Main styles CSS -->
<link rel="stylesheet" type="text/css" href="./resources/css/style.min.css">
<title>Company Directory</title>
</head>
<body class="full-screen noscroll">
<!-- Preloader and 'busy' spinner -->
<div class="preloader-init" id="preloader">
<div class="circle">
<div class="circle1 child"></div>
<div class="circle2 child"></div>
<div class="circle3 child"></div>
<div class="circle4 child"></div>
<div class="circle5 child"></div>
<div class="circle6 child"></div>
<div class="circle7 child"></div>
<div class="circle8 child"></div>
<div class="circle9 child"></div>
<div class="circle10 child"></div>
<div class="circle11 child"></div>
<div class="circle12 child"></div>
</div>
</div>
<!-- Main Bootstrap container -->
<div class="container-fluid full-screen d-flex flex-column">
<!-- First row - header -->
<div class="row header-row d-flex flex-shrink-0">
<div class="col-12">
<nav class="navbar navbar-expand-lg navbar-dark">
<div class="container-fluid p-0" id="maintenance-nav-container">
<!-- Header logo -->
<div class="navbar-brand">
<div id="header-logo">
<a href="https://chrismwalker.co.uk" target="_blank">
<img src="./resources/img/company-directory-logo.png" class="img-fluid" alt="Company Directory" aria-label="Company Directory">
</a>
</div>
</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#maintenance-nav" aria-controls="maintenance-nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="maintenance-nav">
<ul class="navbar-nav">
<li class="nav-item mt-3 mt-lg-0 mb-2 mb-lg-0 me-lg-3">
<!-- Personnel search box -->
<form action="./resources/php/searchAllPersonnel.php" method="POST" id="search-personnel-form">
<div class="input-group">
<label class="sr-only" for="personnel-search-input"></label>
<input class="form-control border-0" type="search" placeholder="Search personnel..." aria-label="Personnel search" id="personnel-search-input" name="personnel-search-input" minlength="2" maxlength="50" required>
<span class="input-group-append">
<button type="submit" class="btn btn-outline-secondary bg-white border-0" id="personnel-search-button">
<i class="fas fa-search"><span class="sr-only">Search Personnel</span></i>
</button>
<button type="button" class="btn btn-outline-secondary bg-white border-0" id="personnel-refresh-button" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-offset="0,10" data-bs-custom-class="tt-add" title="Refresh Personnel">
<i class="fas fa-redo-alt"><span class="sr-only">Refresh Personnel List</span></i>
</button>
</span>
</div>
</form>
</li>
<li class="nav-item">
<a class="nav-link active" id="personnel-nav-link" aria-current="page" href="#">Personnel</a>
</li>
<li class="nav-item">
<a class="nav-link" id="departments-nav-link" href="#">Departments</a>
</li>
<li class="nav-item">
<a class="nav-link" id="locations-nav-link" href="#">Locations</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<!-- Second row - main data area -->
<div class="row main-row d-flex flex-fill overflow-hidden h-100 mt-3 mb-0">
<div class="col-12 overflow-hidden h-100">
<!-- Personnel table -->
<div class="table-responsive table-wrapper h-100" id="personnel-table-wrapper">
<table class="table table-striped table-hover" id="personnel-table">
<thead>
<tr>
<th scope="col" class="d-none d-lg-table-cell">ID
<i class="sort fas fa-sort" id="sort-personnel-id" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-offset="0,10" data-bs-custom-class="tt-add" data-sort="ASC" title="Sort ID"></i>
</th>
<th scope="col">Name
<i class="sort fas fa-sort" id="sort-personnel-lastName" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-offset="0,10" data-bs-custom-class="tt-add" data-sort="DESC" title="Sort Name"></i>
</th>
<th scope="col" class="d-none d-lg-table-cell">Email
<i class="sort fas fa-sort" id="sort-personnel-email" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-offset="0,10" data-bs-custom-class="tt-add" data-sort="ASC" title="Sort Email"></i>
</th>
<th scope="col" class="d-none d-lg-table-cell">Department
<i class="sort fas fa-sort" id="sort-personnel-department" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-offset="0,10" data-bs-custom-class="tt-add" data-sort="ASC" title="Sort Department"></i>
</th>
<th scope="col" class="d-none d-lg-table-cell">Location
<i class="sort fas fa-sort" id="sort-personnel-location" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-offset="0,10" data-bs-custom-class="tt-add" data-sort="ASC" title="Sort Location"></i>
</th>
<th scope="col" class="d-none d-lg-table-cell">Job Title
<i class="sort fas fa-sort" id="sort-personnel-jobTitle" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-offset="0,10" data-bs-custom-class="tt-add" data-sort="ASC" title="Sort Job Title"></i>
</th>
<th scope="col" class="td-icon text-end"><i class="fas fa-plus-circle" id="add-personnel-icon" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-offset="0,10" data-bs-custom-class="tt-add" title="Add Personnel"></i></th>
</tr>
</thead>
<tbody class="overflow-auto">
</tbody>
</table>
</div>
<!-- Departments table -->
<div class="table-responsive table-wrapper h-100 hide" id="departments-table-wrapper">
<table class="table table-striped table-hover" id="departments-table">
<thead>
<tr>
<th scope="col">Department Name
<i class="sort fas fa-sort" id="sort-department-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-offset="0,10" data-bs-custom-class="tt-add" data-sort="DESC" title="Sort Name"></i>
</th>
<th scope="col" class="d-none d-lg-table-cell">Location
<i class="sort fas fa-sort" id="sort-department-location" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-offset="0,10" data-bs-custom-class="tt-add" data-sort="ASC" title="Sort Location"></i>
</th>
<th scope="col" class="td-icon text-end"><i class="fas fa-plus-circle" id="add-department-icon" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-offset="0,10" data-bs-custom-class="tt-add" title="Add Department"></i></th>
</tr>
</thead>
<tbody class="overflow-auto">
</tbody>
</table>
</div>
<!-- Locations table -->
<div class="table-responsive table-wrapper h-100 hide" id="locations-table-wrapper">
<table class="table table-striped table-hover" id="locations-table">
<thead>
<tr>
<th scope="col">Location Name
<i class="sort fas fa-sort" id="sort-location-name" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-offset="0,10" data-bs-custom-class="tt-add" data-sort="DESC" title="Sort Name"></i>
</th>
<th scope="col" class="td-icon text-end"><i class="fas fa-plus-circle" id="add-location-icon" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-offset="0,10" data-bs-custom-class="tt-add" title="Add Location"></i></th>
</tr>
</thead>
<tbody class="overflow-auto">
</tbody>
</table>
</div>
</div>
</div>
<!-- Third row - footer containing record count -->
<div class="row footer-row d-flex flex-shrink-0">
<div class="col-auto">
<!-- Record count -->
<p class="mt-0 mb-0 pt-1 pb-1" id="personnel-row-count"></p>
</div>
</div>
<!-- Fixed icons - hidden by default, appear on main row scroll down -->
<i class="icon-fixed fas fa-chevron-up" id="backtop-icon-fixed" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-offset="0,10" data-bs-custom-class="tt-default" title="Back To Top"></i>
<i class="icon-fixed fas fa-plus" id="add-record-icon-fixed" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-offset="0,10" data-bs-custom-class="tt-add" title="Add Personnel"></i>
</div>
<!-- Add/update personnel modal -->
<div class="modal fade" id="personnelModal" tabindex="-1" aria-labelledby="personnel-modal-title" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-2">
<div class="modal-header">
<h5 class="modal-title hide" id="personnel-modal-title">Maintain Personnel</h5>
<h5 class="modal-title modal-title-add-record hide" id="add-personnel-modal-title">Add Personnel</h5>
<h5 class="modal-title modal-title-update-record hide" id="update-personnel-modal-title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="./resources/php/insertUpdatePersonnel.php" method="POST" id="personnel-form">
<div class="table-responsive">
<table class="table table-borderless">
<tbody>
<tr class="hide">
<th scope="row" class="hide"><label for="update-personnel-id" class="hide">ID:</label></th>
<td class="hide"><input type="text" class="w-100 hide" id="update-personnel-id" name="update-personnel-id"></td>
</tr>
<tr class="hide">
<th scope="row" class="hide"><label for="update-personnel-name" class="hide">Name:</label></th>
<td class="hide"><input type="text" class="form-control w-100 hide" id="update-personnel-name" name="update-personnel-name"></td>
</tr>
<tr>
<th scope="row"><label for="personnel-first-name">First Name:</label></th>
<td><input type="text" class="form-control w-100" id="personnel-first-name" name="personnel-first-name" maxlength="50" required></td>
</tr>
<tr>
<th scope="row"><label for="personnel-last-name">Last Name:</label></th>
<td><input type="text" class="form-control w-100" id="personnel-last-name" name="personnel-last-name" maxlength="50" required></td>
</tr>
<tr>
<th scope="row"><label for="personnel-email">Email:</label></th>
<td><input type="email" class="form-control w-100" id="personnel-email" name="personnel-email" maxlength="50" required></td>
</tr>
<tr>
<th scope="row"><label for="personnel-department">Department:</label></th>
<td><select class="form-control w-100" id="personnel-department" name="personnel-department"></td>
</tr>
<tr>
<th scope="row"><label for="personnel-location">Location:</label></th>
<td><input type="text" class="form-control w-100" id="personnel-location" name="personnel-location" disabled></td>
</tr>
<tr>
<th scope="row"><label for="personnel-job-title">Job Title:</label></th>
<td><input type="text" class="form-control w-100" id="personnel-job-title" name="personnel-job-title" maxlength="50" required></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary btn-save" id="personnel-save-button" form="personnel-form">Save</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Add/update department modal -->
<div class="modal fade" id="departmentModal" tabindex="-1" aria-labelledby="department-modal-title" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-2">
<div class="modal-header">
<h5 class="modal-title hide" id="department-modal-title">Maintain Department</h5>
<h5 class="modal-title modal-title-add-record hide" id="add-department-modal-title">Add Department</h5>
<h5 class="modal-title modal-title-update-record hide" id="update-department-modal-title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="./resources/php/insertUpdateDepartment.php" method="POST" id="department-form">
<div class="table-responsive">
<table class="table table-borderless">
<tbody>
<tr class="hide">
<th scope="row" class="hide"><label for="update-department-id" class="hide">ID:</label></th>
<td class="hide"><input type="text" class="form-control w-100 hide" id="update-department-id" name="update-department-id"></td>
</tr>
<tr class="hide">
<th scope="row" class="hide"><label for="update-department-name" class="hide">Department Name:</label></th>
<td class="hide"><input type="text" class="form-control w-100 hide" id="update-department-name" name="update-department-name"></td>
</tr>
<tr>
<th scope="row"><label for="department-name">Department Name:</label></th>
<td><input type="text" class="form-control w-100" id="department-name" name="department-name" maxlength="50" required></td>
</tr>
<tr>
<th scope="row"><label for="department-location">Location:</label></th>
<td><select class="form-control w-100" id="department-location" name="department-location"></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary btn-save" id="department-save-button" form="department-form">Save</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Add/update location modal -->
<div class="modal fade" id="locationModal" tabindex="-1" aria-labelledby="location-modal-title" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-2">
<div class="modal-header">
<h5 class="modal-title hide" id="location-modal-title">Maintain Location</h5>
<h5 class="modal-title modal-title-add-record hide" id="add-location-modal-title">Add Location</h5>
<h5 class="modal-title modal-title-update-record hide" id="update-location-modal-title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="./resources/php/insertUpdateLocation.php" method="POST" id="location-form">
<div class="table-responsive">
<table class="table table-borderless">
<tbody>
<tr class="hide">
<th scope="row" class="hide"><label for="update-location-id" class="hide">ID:</label></th>
<td class="hide"><input type="text" class="form-control w-100 hide" id="update-location-id" name="update-location-id"></td>
</tr>
<tr class="hide">
<th scope="row" class="hide"><label for="update-location-name" class="hide">Location Name:</label></th>
<td class="hide"><input type="text" class="form-control w-100 hide" id="update-location-name" name="update-location-name"></td>
</tr>
<tr>
<th scope="row"><label for="location-name">Location Name:</label></th>
<td><input type="text" class="form-control w-100" id="location-name" name="location-name" maxlength="50" required></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary btn-save" id="location-save-button" form="location-form">Save</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Error modal -->
<div class="modal fade" id="errorModal" tabindex="-1" aria-labelledby="error-modal-title" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-2">
<div class="modal-header">
<h5 class="modal-title" id="error-modal-title">Error</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p class="hide" id="error-description"></p>
<p>Please try again</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Search - No Match Found modal -->
<div class="modal fade" id="searchNoMatchModal" tabindex="-1" aria-labelledby="search-modal-title" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-2">
<div class="modal-header">
<h5 class="modal-title" id="search-modal-title">Search</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>No matching records found</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Confirm modal -->
<div class="modal fade" id="confirmModal" tabindex="-1" aria-labelledby="confirm-modal-title" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-2">
<div class="modal-header">
<h5 class="modal-title" id="confirm-modal-title">Confirm</h5>
<button type="button" class="btn-close" id="confirm-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p class="mt-0 mb-0">Are you sure?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="confirm-yes">Yes</button>
<button type="button" class="btn btn-secondary" id="confirm-no" data-bs-dismiss="modal">No</button>
</div>
</div>
</div>
</div>
<!-- Success toast -->
<div class="toastWrapper position-fixed bottom-0 start-50 translate-middle-x p-3">
<div id="successToast" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<i class="fas fa-check me-2"></i>
<strong class="me-auto">Success</strong>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
<p class="mt-0 mb-0" id="success-toast-text"></p>
</div>
</div>
</div>
<!-- jQuery -->
<script src="./vendors/js/jquery-3.6.0.min.js"></script>
<!-- Bootstrap 5.0.2 -->
<script src="./vendors/js/bootstrap.bundle.min.js"></script>
<!-- Main JavaScript -->
<script src="./resources/js/script.min.js"></script>
</body>
</html>