-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (fonction-utilisateur): Ajout d'un champ fonction pour l'utilisa… (
#472) * feat (fonction-utilisateur): Ajout d'un champ fonction pour l'utilisateur * fix: fonction utilisateur enum
- Loading branch information
Showing
17 changed files
with
117 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { Kysely } from "kysely"; | ||
|
||
import type { DB } from "@/db/schema"; | ||
|
||
export const up = async (db: Kysely<DB>) => { | ||
return await db.schema.alterTable("user").addColumn("fonction", "varchar").execute(); | ||
}; | ||
|
||
export const down = async (db: Kysely<unknown>) => { | ||
return await db.schema.alterTable("user").dropColumn("fonction").execute(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { z } from "zod"; | ||
|
||
export const userFonction = z.enum([ | ||
"Région", | ||
"Région académique", | ||
"Inspecteur", | ||
"DO CMQ", | ||
"Conseiller en formation professionnelle", | ||
"Coordonnateur de CFA-A", | ||
"DRAIO", | ||
"Services DOS", | ||
"DASEN", | ||
"DRAFPIC", | ||
"SGRA", | ||
"CSA", | ||
"Recteur", | ||
]); | ||
|
||
export const UserFonctionEnum = userFonction.Enum; | ||
|
||
export type UserFonction = z.infer<typeof userFonction>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 10 additions & 9 deletions
19
ui/app/(wrapped)/intentions/perdir/synthese/[numero]/actions/FONCTIONS.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
import type { AvisTypeType } from "shared/enum/avisTypeEnum"; | ||
import type { UserFonction } from "shared/enum/userFonction"; | ||
|
||
export const FONCTIONS = { | ||
préalable: ["région", "région académique"], | ||
préalable: ["Région", "Région académique"], | ||
consultatif: [ | ||
"inspecteur", | ||
"Inspecteur", | ||
"DO CMQ", | ||
"conseiller en formation professionnelle", | ||
"coordonnateur de CFA-A", | ||
"Conseiller en formation professionnelle", | ||
"Coordonnateur de CFA-A", | ||
"DRAIO", | ||
"services DOS", | ||
"Services DOS", | ||
"DASEN", | ||
"région", | ||
"Région", | ||
"DRAFPIC", | ||
"SGRA", | ||
"recteur", | ||
"Recteur", | ||
], | ||
final: ["région", "CSA", "recteur"], | ||
} as Record<AvisTypeType, string[]>; | ||
final: ["Région", "CSA", "Recteur"], | ||
} as Record<AvisTypeType, UserFonction[]>; |