Move general tasks + time reqs to Settings; add date adjustments
- Rename 'Category Settings' to 'Settings' (nav, page title, component) - Move Recurring General Tasks and Time Requirements editing to Settings page - Planner still loads both for calcRequired calculations - Add date-specific Adjustments section to Planner: per-date +/- hour offsets keyed by YYYY-MM-DD (non-recurring); feed into Required Hours total - Adjustments row shown in Required Hours tfoot when non-zero Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b803b01ae1
commit
c0b1d2a62e
7 changed files with 416 additions and 238 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import type { BookingsData, StaffMember, GeneralTask, PickupData, TimeReqs, WorkforceRota } from './types'
|
||||
import type { BookingsData, StaffMember, GeneralTask, PickupData, TimeReqs, WorkforceRota, Adjustment } from './types'
|
||||
|
||||
const BASE = '/hk-planner/api'
|
||||
|
||||
|
|
@ -11,6 +11,7 @@ export interface ConfigData {
|
|||
tolerance_minutes: number
|
||||
workforce_rota: WorkforceRota | null
|
||||
workforce_departments: string[]
|
||||
adjustments: Adjustment[]
|
||||
}
|
||||
|
||||
export interface CategoryConfig {
|
||||
|
|
@ -116,3 +117,11 @@ export function syncWorkforceRota(start: string, end: string): Promise<Workforce
|
|||
export function getWorkforceStaff(): Promise<{ id: string; name: string }[]> {
|
||||
return request('/workforce/staff')
|
||||
}
|
||||
|
||||
export function putAdjustments(adjustments: Adjustment[]): Promise<{ ok: boolean }> {
|
||||
return request('/config/adjustments', {
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ adjustments }),
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue