fix: restore admin lunch warning tier (30-60min) with gap-worsening comparison
CI / Nginx config check (push) Successful in 25s
CI / Docker compose check (push) Successful in 25s
CI / Env docs check (push) Successful in 26s
CI / Frontend major deps (push) Failing after 26s
CI / Frontend deps check (push) Successful in 34s
CI / Secrets scan (push) Successful in 38s
CI / Go build (push) Successful in 38s
CI / Frontend build (push) Successful in 44s
CI / Frontend a11y check (push) Failing after 31s
CI / Knip (push) Successful in 42s
CI / go mod tidy (push) Successful in 31s
CI / Go vet (prod) (push) Successful in 1m58s
CI / Go vet (dev) (push) Successful in 2m15s
CI / Frontend QC (audit) (push) Successful in 1m37s
CI / Staticcheck (prod) (push) Successful in 3m39s
CI / Go vulnerabilities (push) Successful in 2m48s
CI / golangci-lint (push) Successful in 4m36s
CI / Staticcheck (dev) (push) Successful in 4m47s
CI / Frontend QC (typecheck) (push) Successful in 2m42s
CI / Security scan (dev) (push) Successful in 4m57s
CI / Security scan (prod) (push) Successful in 4m33s
CI / Tests (prod) (push) Has been cancelled
CI / Tests (dev) (push) Has been cancelled
CI / Race (prod) (push) Has been cancelled
CI / Race (dev) (push) Has been cancelled
CI / Svelte strict check (push) Has been cancelled
CI / Frontend QC (lint) (push) Has been cancelled

This commit is contained in:
2026-07-10 21:10:00 +01:00
parent fe47cb486a
commit 7c8fd94fcb
+20 -6
View File
@@ -217,15 +217,29 @@ export function getLunchProtectionForSlots(
showWarning: false,
warningMessage: 'This booking would leave no lunch break (minimum 30 minutes required).'
});
} else if (gapWith < 60) {
const gapsWithout = findAllLunchGaps(windowStart, windowEnd, existingBookings);
const gapWithout = gapsWithout[0] ?? 0;
if (gapWith < gapWithout) {
results.set(slotStartStr, {
isBlocked: false,
showWarning: true,
warningMessage: `This booking would reduce lunch break to ${gapWith} minutes.`
});
}
}
} else {
if (gapWith < 60) {
results.set(slotStartStr, {
isBlocked: true,
showWarning: false,
warningMessage:
'This booking would leave insufficient lunch break (minimum 1 hour required).'
});
const gapsWithout = findAllLunchGaps(windowStart, windowEnd, existingBookings);
const gapWithout = gapsWithout[0] ?? 0;
if (gapWith < gapWithout) {
results.set(slotStartStr, {
isBlocked: true,
showWarning: false,
warningMessage:
'This booking would leave insufficient lunch break (minimum 1 hour required).'
});
}
}
}
}