Allow shifts without a role
Allow a shift to have no role associated with it in order to simplify conflict resolution around situations like a shift being created while the role it was assoiated with was deleted. This also allows for shifts that are freestanding to be created in case having a role doesn't make sense for it.
This commit is contained in:
parent
1d2edf7535
commit
5144bf2b37
5 changed files with 32 additions and 55 deletions
|
@ -111,7 +111,7 @@ export const apiScheduleShiftSlotSchema = z.object({
|
|||
export type ApiScheduleShiftSlot = z.infer<typeof apiScheduleShiftSlotSchema>;
|
||||
|
||||
export const apiScheduleShiftSchema = defineApiEntity({
|
||||
roleId: idSchema,
|
||||
roleId: z.optional(idSchema),
|
||||
name: z.string(),
|
||||
description: z.optional(z.string()),
|
||||
slots: z.array(apiScheduleShiftSlotSchema),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue