add workload placement
This commit is contained in:
parent
465db4a5b8
commit
46ba265f38
8 changed files with 291 additions and 34 deletions
|
|
@ -6,6 +6,8 @@ import { API_BASE } from '@/utils/apiBase'
|
|||
|
||||
const isoDateSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
||||
|
||||
export const workloadPlacementSchema = z.enum(['start', 'middle', 'end'])
|
||||
|
||||
export const scheduleSummarySchema = z.object({
|
||||
id: z.number().int().positive(),
|
||||
set: z.object({
|
||||
|
|
@ -76,11 +78,13 @@ const errorResponseSchema = z.object({
|
|||
export type ScheduleSummary = z.infer<typeof scheduleSummarySchema>
|
||||
export type ScheduleDetail = z.infer<typeof scheduleDetailSchema>
|
||||
export type AssignmentForDate = z.infer<typeof assignmentForDateSchema>
|
||||
export type WorkloadPlacement = z.infer<typeof workloadPlacementSchema>
|
||||
export type CreateScheduleInput = {
|
||||
setId: number
|
||||
levelId: number
|
||||
startDate: string
|
||||
targetDate: string
|
||||
workloadPlacement: WorkloadPlacement
|
||||
}
|
||||
|
||||
const LIST_ERROR = "We couldn't load your schedules."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue