mirror of
https://github.com/itflow-org/itflow
synced 2026-03-19 04:04:51 +00:00
Add ticket timer functionality and clear all
timers button
This commit is contained in:
@@ -78,6 +78,7 @@
|
||||
function clearTimeStorage() {
|
||||
localStorage.removeItem(getLocalStorageKey("startTime"));
|
||||
localStorage.removeItem(getLocalStorageKey("pausedTime"));
|
||||
localStorage.removeItem("ticket-timer-running-" + ticketID);
|
||||
}
|
||||
|
||||
function resetTimer() {
|
||||
@@ -176,6 +177,11 @@
|
||||
// Wait for other synchronous actions (if any) to complete before resetting the timer.
|
||||
setTimeout(forceResetTimer, 100); // 100ms delay should suffice, but you can adjust as needed.
|
||||
});
|
||||
|
||||
document.getElementById("ticket_close").addEventListener('click', function() {
|
||||
// Wait for other synchronous actions (if any) to complete before resetting the timer.
|
||||
setTimeout(clearTimeStorage, 100); // 100ms delay should suffice, but you can adjust as needed.
|
||||
});
|
||||
|
||||
try {
|
||||
displayTime();
|
||||
|
||||
Reference in New Issue
Block a user