-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
65 lines (54 loc) · 2.46 KB
/
script.js
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
document.addEventListener('DOMContentLoaded', function() {
const checklist = [
"CLEAN ALL BAR STOOLS & CHAIRS",
"KEEP BAR COUNTER CLEAN AND CLUTTER FREE",
"ROTATE AND STOCK ALL BEER AFTER EACH SHIFT",
"ROTATE AND STOCK ALL JUICE, MIXERS, FRUIT AFTER EACH SHIFT (PM THROW AWAY FRUIT)",
"CLEAN TABLETOP DEVICES AND KEEP CHARGED (PM PUT ON CHARGER)",
"REFILL AND LABEL ALL ITEMS PREPPED",
"CLEAN AND SWEEP BAR AREA FLOORS AND BEHIND THE BAR",
"TAKE OUT TRASH AND GLASS CONTAINER AFTER EACH SHIFT & RE-BAG",
"WIPE DOWN ALL BAR COOLERS, BAR EQUIPMENT, GASKETS AFTER EACH SHIFT",
"CLEAN ALL BOTTLES & RAILS",
"MELT AND SANITIZE ICE WELL THEN FILL (PM ONLY)",
"STOCK ALL BAR GLASSES SHIFTLY",
"EMPTY DISH TANK SHIFTLY",
"ROLL SILVERWARE AND KEEP STOCKED BEHIND THE BAR EACH SHIFT",
"SODA GUN WIPED AND CLEANED AFTER EACH SHIFT",
"CLEAN ALL STAINLESS STEEL BEHIND BAR",
"CLEAN ALL BAR SINKS, HAND SINKS, (STOCK SOAP, PAPER TOWEL, CHEMICALS AS NEEDED)",
"CLEAN ALL BAR TAPS & BEER TAP DRAINS",
"KEEP MARGARITA MACHINE CLEANED AND LABELED",
"END OF EACH OF YOUR SHIFT CLEAN AND PLACE YOUR IPAD ON THE CHARGER IN THE OFFICE."
];
const tasksContainer = document.getElementById('tasksContainer');
checklist.forEach(task => {
const taskDiv = document.createElement('div');
taskDiv.classList.add('task-item');
const label = document.createElement('label');
label.textContent = task;
const checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.name = 'tasks';
const signatureInput = document.createElement('input');
signatureInput.type = 'text';
signatureInput.classList.add('signature-input');
signatureInput.placeholder = 'Signature';
taskDiv.appendChild(checkbox);
taskDiv.appendChild(label);
taskDiv.appendChild(signatureInput);
tasksContainer.appendChild(taskDiv);
});
const checklistForm = document.getElementById('checklistForm');
checklistForm.addEventListener('submit', function(event) {
event.preventDefault();
const formData = new FormData(checklistForm);
// Convert FormData to JSON
const checklistData = {};
formData.forEach((value, key) => {
checklistData[key] = value;
});
console.log(checklistData);
// Here you can send the checklistData to a server or do something else with it
});
});