refactor: simpler timing inputs

This commit is contained in:
Barf-Vader
2025-06-13 02:57:23 +01:00
parent 07742ad405
commit 8be06bba8b
14 changed files with 400 additions and 140 deletions

View File

@@ -62,7 +62,7 @@
(h) => h.day_of_week === new Date().getDay()
);
if (!entry) return false;
if (entry.is_24_7) return true;
if (entry.open_today_status) return true;
const openMin = toMinutes(entry.opens_at);
let closeMin = toMinutes(entry.closes_at);
// Treat midnight as end of day and handle overnight spans
@@ -79,7 +79,7 @@
(h) => h.day_of_week === new Date().getDay()
);
if (!entry) return false;
if (entry.is_24_7) return true;
if (entry.open_today_status) return true;
const openMin = toMinutes(entry.opens_at);
let closeMin = toMinutes(entry.closes_at);
if (closeMin === 0) closeMin = 24 * 60;