-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(modele): correction de la création des modèles #1393
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,7 @@ export const ModelForm = ({ | |
}, | ||
{ | ||
label: "Lettre", | ||
value: "letter", | ||
value: "lettre", | ||
}, | ||
]} | ||
/> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import { | |
import { fileSchema } from "../common/type"; | ||
|
||
export const modelSchema = z.object({ | ||
id: z.string().uuid(), | ||
id: z.string().uuid().optional(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dans quel cas l'id n'est pas défini en fait ? Car sinon on peut modifier le type de base There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Il n'est pas présent dans le cas de la création. On peut modifier un autre type en effet, mais hier dans le feu de l'action j'ai été au plus simple. |
||
title: z | ||
.string({ required_error: "Un titre doit être renseigné" }) | ||
.min(1, "Un titre doit être renseigné"), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Du coup, on rajoute ça vu que ça peut être optionnel