add support for random store

This commit is contained in:
2022-09-15 21:20:07 +02:00
parent 0616d4af65
commit 2a8d6afc88
6 changed files with 34 additions and 9 deletions
+12
View File
@@ -3,6 +3,18 @@ let endNumber = 0;
let selectedStore = 'faubourg';
window.addEventListener('load', () => {
window.appointment.scanDevices().then((deviceList) => {
// Make the list
let listElement = document.getElementById('device_list');
for (i = 0; i < deviceList.length; ++i) {
// Create an item for each one
let listItem = document.createElement('li');
// Add the item text
listItem.innerHTML = deviceList[i].join(" : ");
// Add listItem to the listElement
listElement.appendChild(listItem);
}
})
document.getElementById("start_book_btn").addEventListener('click', () => {
window.appointment.startBook(startNumber, endNumber, selectedStore)
})