diff --git a/Views/Home/Kiosk.cshtml b/Views/Home/Kiosk.cshtml index 369a3b22..203a14b0 100644 --- a/Views/Home/Kiosk.cshtml +++ b/Views/Home/Kiosk.cshtml @@ -40,6 +40,15 @@ errorToast('Location Services not Enabled'); } } + function setAccessToken(accessToken){ + //use this function to never worry about user session expiring. + $.ajaxSetup({ + headers: { + 'Authorization': `Basic ${accessToken}` + } + }); + console.log("Access Token for Kiosk Mode Configured!"); + } function retrieveKioskContent(){ clearInterval(refreshTimer); if (kioskMode != 'Cycle'){ @@ -93,9 +102,6 @@ }, 100); } function addVehicleToExceptionList(vehicleId) { - if (kioskMode == 'Cycle') { - return; - } Swal.fire({ title: "Remove Vehicle from Dashboard?", text: "Removed vehicles can be restored by refreshing the page", @@ -105,7 +111,13 @@ }).then((result) => { if (result.isConfirmed) { exceptionList.push(vehicleId); - retrieveKioskContent(); + if (kioskMode == 'Cycle') { + //remove the vehicle programmatically. + $(`[data-vehicleId=${vehicleId}]`).remove(); + } else { + //force a refresh + retrieveKioskContent(); + } } }); } diff --git a/Views/Home/_Kiosk.cshtml b/Views/Home/_Kiosk.cshtml index 71fe6bd3..06414660 100644 --- a/Views/Home/_Kiosk.cshtml +++ b/Views/Home/_Kiosk.cshtml @@ -11,7 +11,7 @@