forked from jappel/leistungsbilanz-ts
Add versioned project settings modal
This commit is contained in:
parent
e1fc81a083
commit
d77cfbeb49
22 changed files with 2563 additions and 111 deletions
|
|
@ -2,7 +2,11 @@ import { z } from "zod";
|
|||
import { expectedProjectRevisionSchema } from "./project-command.schemas.js";
|
||||
|
||||
export const createProjectSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
name: z.string().trim().min(1).max(200),
|
||||
internalProjectNumber: z.string().trim().max(100).optional(),
|
||||
externalProjectNumber: z.string().trim().max(100).optional(),
|
||||
buildingOwner: z.string().trim().max(200).optional(),
|
||||
description: z.string().trim().max(2000).optional(),
|
||||
singlePhaseVoltageV: z.number().positive().optional(),
|
||||
threePhaseVoltageV: z.number().positive().optional(),
|
||||
});
|
||||
|
|
@ -10,6 +14,11 @@ export const createProjectSchema = z.object({
|
|||
export const updateProjectSettingsSchema = z
|
||||
.object({
|
||||
expectedRevision: expectedProjectRevisionSchema,
|
||||
name: z.string().trim().min(1).max(200),
|
||||
internalProjectNumber: z.string().trim().max(100).nullable(),
|
||||
externalProjectNumber: z.string().trim().max(100).nullable(),
|
||||
buildingOwner: z.string().trim().max(200).nullable(),
|
||||
description: z.string().trim().max(2000).nullable(),
|
||||
singlePhaseVoltageV: z.number().positive(),
|
||||
threePhaseVoltageV: z.number().positive(),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue