Terminplaner: Zellen gegen Doppelbuchung, Tokens, Buchungsspeicher
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4def5c735d
commit
e281db1b2b
5 files changed
+1315
-1
No files matched your search
@@ -59,7 +59,8 @@ function feiertag(tag, land) {
|
||||
|
||||
// ---------------------------------------------------------------- Belegung
|
||||
|
||||
function istBelegend(buchung, jetztMs) {
|
||||
/** Belegt die Buchung zum Zeitpunkt jetztMs? gehalten nur solange heldUntil > jetzt, angefragt und bestaetigt immer. */
|
||||
export function istBelegend(buchung, jetztMs) {
|
||||
if (buchung.status === 'angefragt' || buchung.status === 'bestaetigt') return true
|
||||
if (buchung.status === 'gehalten') return zeitMs(buchung.heldUntil) > jetztMs // abgelaufen oder ohne Haltezeit = frei
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user