Skip to content

Commit

Permalink
feat: ajout des formations transition numérique, écologique, démograp…
Browse files Browse the repository at this point in the history
…hique
  • Loading branch information
LucasDetre committed Nov 29, 2024
1 parent 6ee31a5 commit 53f8d6b
Show file tree
Hide file tree
Showing 56 changed files with 1,331 additions and 390 deletions.
4 changes: 2 additions & 2 deletions server/src/commands.product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ export function productCommands(cli: Command) {
importTensionRomeRegion,
importTensionRomeDepartement,
importActionPrioritaire,
refreshViews,
};

if (usecaseName) {
Expand All @@ -313,6 +312,7 @@ export function productCommands(cli: Command) {
await usecase();
}
}
await refreshViews();
});

cli.command("refreshViews").action(async () => {
Expand All @@ -329,7 +329,6 @@ export function productCommands(cli: Command) {
.action(async (usecaseName: string) => {
const usecases = {
importFormations,
refreshViews,
importPositionsQuadrant,
};

Expand All @@ -340,6 +339,7 @@ export function productCommands(cli: Command) {
await usecase();
}
}
await refreshViews();
});

cli
Expand Down
13 changes: 8 additions & 5 deletions server/src/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export interface Demande {
campagneId: string | null;
id: Generated<string>;
numeroHistorique: string | null;
autreBesoinRH: string | null;
amiCmaValide: boolean | null;
amiCmaValideAnnee: string | null;
recrutementRH: boolean | null;
Expand All @@ -241,7 +242,6 @@ export interface Demande {
nbFormationRH: number | null;
discipline1FormationRH: string | null;
discipline2FormationRH: string | null;
autreBesoinRH: string | null;
amiCmaEnCoursValidation: boolean | null;
updatedBy: string | null;
capaciteScolaireColoreeActuelle: Generated<number | null>;
Expand Down Expand Up @@ -405,8 +405,8 @@ export interface FormationEtablissement {
}

export interface FormationHistorique {
ancienCFD: string;
cfd: string;
ancienCFD: string;
voie: string;
}

Expand All @@ -424,6 +424,9 @@ export interface FormationNonMaterializedView {
typeFamille: "1ere_commune" | "2nde_commune" | "option" | "specialite" | null;
voie: string | null;
codeNsf: string | null;
isTransitionNumerique: boolean | null;
isTransitionEcologique: boolean | null;
isTransitionDemographique: boolean | null;
}

export interface FormationRome {
Expand All @@ -441,8 +444,8 @@ export interface IndicateurEntree {
formationEtablissementId: string;
rentreeScolaire: string;
effectifs: Json | null;
anneeDebut: number | null;
capacites: Json | null;
anneeDebut: number | null;
premiersVoeux: Json | null;
}

Expand Down Expand Up @@ -683,6 +686,7 @@ export interface LatestDemandeNonMaterializedView {
campagneId: string | null;
id: string | null;
numeroHistorique: string | null;
autreBesoinRH: string | null;
amiCmaValide: boolean | null;
amiCmaValideAnnee: string | null;
recrutementRH: boolean | null;
Expand All @@ -701,7 +705,6 @@ export interface LatestDemandeNonMaterializedView {
nbFormationRH: number | null;
discipline1FormationRH: string | null;
discipline2FormationRH: string | null;
autreBesoinRH: string | null;
amiCmaEnCoursValidation: boolean | null;
updatedBy: string | null;
capaciteScolaireColoreeActuelle: number | null;
Expand Down Expand Up @@ -816,7 +819,7 @@ export interface PositionFormationRegionaleQuadrant {
export interface RawData {
type: string;
data: Json | null;
id: Generated<string | null>;
id: Generated<string>;
}

export interface Region {
Expand Down
2 changes: 2 additions & 0 deletions server/src/migrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ import * as migration_1729693085251 from "./migration_1729693085251";
import * as migration_1730888921742 from "./migration_1730888921742";
import * as migration_1731666807035 from "./migration_1731666807035";
import * as migration_1732531157506 from "./migration_1732531157506";
import * as migration_1732800962380 from "./migration_1732800962380";

type Migration = {
up: (db: Kysely<any>) => Promise<void>;
Expand Down Expand Up @@ -197,4 +198,5 @@ export const migrations: Migrations = {
migration_1730888921742,
migration_1731666807035,
migration_1732531157506,
migration_1732800962380,
};
Loading

0 comments on commit 53f8d6b

Please sign in to comment.