forked from jappel/leistungsbilanz-ts
Add editable project floors and rooms
This commit is contained in:
parent
1e3c721cfa
commit
1eed19ef6b
15 changed files with 743 additions and 80 deletions
|
|
@ -69,6 +69,14 @@ export const createFloorSchema = z
|
|||
})
|
||||
.strict();
|
||||
|
||||
export const updateFloorSchema = createFloorSchema;
|
||||
|
||||
export const deleteProjectLocationSchema = z
|
||||
.object({
|
||||
expectedRevision: expectedProjectRevisionSchema,
|
||||
})
|
||||
.strict();
|
||||
|
||||
export const createRoomSchema = z
|
||||
.object({
|
||||
expectedRevision: expectedProjectRevisionSchema,
|
||||
|
|
@ -78,6 +86,15 @@ export const createRoomSchema = z
|
|||
})
|
||||
.strict();
|
||||
|
||||
export const updateRoomSchema = z
|
||||
.object({
|
||||
expectedRevision: expectedProjectRevisionSchema,
|
||||
floorId: z.string().trim().min(1).nullable(),
|
||||
roomNumber: z.string().trim().min(1),
|
||||
roomName: z.string().trim().min(1),
|
||||
})
|
||||
.strict();
|
||||
|
||||
export type CreateProjectInput = z.infer<typeof createProjectSchema>;
|
||||
export type UpdateProjectSettingsInput = z.infer<
|
||||
typeof updateProjectSettingsSchema
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue