Add 5-tier warning thresholds to staff rota footer
Replaces the 2-row (vs Booked / vs with Pickup) footer with a progressive 5-row breakdown: - Total Available (unchanged) - vs Booked — plain diff, room cleaning only - with Recurring Tasks — plain diff, adds recurring tasks - with Pickup — plain diff, adds pickup hours - with Adjustments — bold coloured final row with configurable thresholds New 5-tier icon system: red ⚠ / amber ⚠ / green ✓ / amber ✗ / red ✗, with defaults of 4h / 1h / 1h / 2h spare or short. Thresholds are editable in Settings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fee388db4c
commit
75ac7591d2
7 changed files with 256 additions and 20 deletions
|
|
@ -8,10 +8,13 @@ export interface ConfigData {
|
|||
pickup_data: PickupData
|
||||
general_tasks: GeneralTask[]
|
||||
last_reviewed: string
|
||||
tolerance_minutes: number
|
||||
workforce_rota: WorkforceRota | null
|
||||
workforce_departments: string[]
|
||||
adjustments: Adjustment[]
|
||||
warn_over_red_hrs: number
|
||||
warn_over_amber_hrs: number
|
||||
warn_under_amber_hrs: number
|
||||
warn_under_red_hrs: number
|
||||
}
|
||||
|
||||
export interface CategoryConfig {
|
||||
|
|
@ -129,3 +132,16 @@ export function putAdjustments(adjustments: Adjustment[]): Promise<{ ok: boolean
|
|||
body: JSON.stringify({ adjustments }),
|
||||
})
|
||||
}
|
||||
|
||||
export function putWarningThresholds(thresholds: {
|
||||
warn_over_red_hrs: number
|
||||
warn_over_amber_hrs: number
|
||||
warn_under_amber_hrs: number
|
||||
warn_under_red_hrs: number
|
||||
}): Promise<{ ok: boolean }> {
|
||||
return request('/config/warning-thresholds', {
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(thresholds),
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue