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
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:
@@ -217,15 +217,29 @@ export function getLunchProtectionForSlots(
|
|||||||
showWarning: false,
|
showWarning: false,
|
||||||
warningMessage: 'This booking would leave no lunch break (minimum 30 minutes required).'
|
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 {
|
} else {
|
||||||
if (gapWith < 60) {
|
if (gapWith < 60) {
|
||||||
results.set(slotStartStr, {
|
const gapsWithout = findAllLunchGaps(windowStart, windowEnd, existingBookings);
|
||||||
isBlocked: true,
|
const gapWithout = gapsWithout[0] ?? 0;
|
||||||
showWarning: false,
|
if (gapWith < gapWithout) {
|
||||||
warningMessage:
|
results.set(slotStartStr, {
|
||||||
'This booking would leave insufficient lunch break (minimum 1 hour required).'
|
isBlocked: true,
|
||||||
});
|
showWarning: false,
|
||||||
|
warningMessage:
|
||||||
|
'This booking would leave insufficient lunch break (minimum 1 hour required).'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user