Skip to content

Commit

Permalink
feat(server): correction & MAJ des réseaux compagnons du tour de fran…
Browse files Browse the repository at this point in the history
…ce & compagnons du devoir (#3273)
  • Loading branch information
sbenfares authored Oct 9, 2023
1 parent 4bc2a70 commit 99a71fb
Show file tree
Hide file tree
Showing 21 changed files with 110 additions and 143 deletions.
99 changes: 0 additions & 99 deletions server/src/common/constants/networks.ts

This file was deleted.

1 change: 1 addition & 0 deletions server/src/common/model/@types/Effectif.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1832,6 +1832,7 @@ export interface Effectif {
| "CCI"
| "CFA_EC"
| "COMP_DU_DEVOIR"
| "COMP_DU_TOUR_DE_FRANCE"
| "GRETA"
| "UIMM"
| "BTP_CFA"
Expand Down
1 change: 1 addition & 0 deletions server/src/common/model/@types/Organisation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface Organisation {
| "CCI"
| "CFA_EC"
| "COMP_DU_DEVOIR"
| "COMP_DU_TOUR_DE_FRANCE"
| "GRETA"
| "UIMM"
| "BTP_CFA"
Expand Down
1 change: 1 addition & 0 deletions server/src/common/model/@types/Organisme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface Organisme {
| "CCI"
| "CFA_EC"
| "COMP_DU_DEVOIR"
| "COMP_DU_TOUR_DE_FRANCE"
| "GRETA"
| "UIMM"
| "BTP_CFA"
Expand Down
3 changes: 1 addition & 2 deletions server/src/common/model/effectifs.model/effectifs.model.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { CreateIndexesOptions, IndexSpecification } from "mongodb";
import { ACADEMIES, DEPARTEMENTS, REGIONS } from "shared";
import { ACADEMIES, DEPARTEMENTS, REGIONS, TETE_DE_RESEAUX } from "shared";
import { PartialDeep } from "type-fest";

import { TETE_DE_RESEAUX } from "@/common/constants/networks";
import { SIRET_REGEX_PATTERN, UAI_REGEX_PATTERN, YEAR_RANGE_PATTERN } from "@/common/constants/validations";
import { any, arrayOf, boolean, date, object, objectId, string } from "@/common/model/json-schema/jsonSchemaTypes";

Expand Down
12 changes: 10 additions & 2 deletions server/src/common/model/organisations.model.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import { CreateIndexesOptions, IndexSpecification } from "mongodb";
import { REGIONS, DEPARTEMENTS, ACADEMIES, ACADEMIES_BY_CODE, DEPARTEMENTS_BY_CODE, REGIONS_BY_CODE } from "shared";
import {
REGIONS,
DEPARTEMENTS,
ACADEMIES,
ACADEMIES_BY_CODE,
DEPARTEMENTS_BY_CODE,
REGIONS_BY_CODE,
TETE_DE_RESEAUX,
TETE_DE_RESEAUX_BY_ID,
} from "shared";

import { TETE_DE_RESEAUX, TETE_DE_RESEAUX_BY_ID } from "@/common/constants/networks";
import { ORGANISATIONS_NATIONALES } from "@/common/constants/organisations";
import { SIRET_REGEX_PATTERN, UAI_REGEX_PATTERN } from "@/common/constants/validations";

Expand Down
2 changes: 1 addition & 1 deletion server/src/common/model/organismes.model.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CreateIndexesOptions, IndexSpecification } from "mongodb";
import { TETE_DE_RESEAUX } from "shared";

import { STATUT_CREATION_ORGANISME, STATUT_FIABILISATION_ORGANISME } from "@/common/constants/fiabilisation";
import { TETE_DE_RESEAUX } from "@/common/constants/networks";
import { SIRET_REGEX_PATTERN, UAI_REGEX_PATTERN } from "@/common/constants/validations";

import { NATURE_ORGANISME_DE_FORMATION, STATUT_PRESENCE_REFERENTIEL } from "../constants/organisme";
Expand Down
2 changes: 1 addition & 1 deletion server/src/common/validation/registrationSchema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TETE_DE_RESEAUX, TeteDeReseauKey } from "shared";
import { z } from "zod";

import { TETE_DE_RESEAUX, TeteDeReseauKey } from "@/common/constants/networks";
import { ORGANISATIONS_NATIONALES, OrganisationsNationalesKey } from "@/common/constants/organisations";

export const registrationSchema = {
Expand Down
3 changes: 1 addition & 2 deletions server/src/http/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import express, { Application } from "express";
import Joi from "joi";
import { ObjectId, WithId } from "mongodb";
import passport from "passport";
import { TETE_DE_RESEAUX } from "shared";
import swaggerUi from "swagger-ui-express";
import { z } from "zod";

// catch all unhandled promise rejections and call the error middleware
import "express-async-errors";

Expand Down Expand Up @@ -73,7 +73,6 @@ import { searchOrganismesFormations } from "@/common/actions/organismes/organism
import { createSession } from "@/common/actions/sessions.actions";
import { generateSifa } from "@/common/actions/sifa.actions/sifa.actions";
import { changePassword, updateUserProfile } from "@/common/actions/users.actions";
import { TETE_DE_RESEAUX } from "@/common/constants/networks";
import logger from "@/common/logger";
import { Organisme } from "@/common/model/@types";
import { jobEventsDb, organisationsDb } from "@/common/model/collections";
Expand Down
3 changes: 2 additions & 1 deletion server/src/jobs/hydrate/reseaux/hydrate-reseaux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ const INPUT_FILES = [
"reseaux/referentiel-reseau-agri.csv", // AGRI
// "reseaux/referentiel-reseau-anasup.csv", // TODO Fichier non fourni pour l'instant
// "reseaux/referentiel-reseau-dgesip.csv", // TODO Fichier non fourni pour l'instant
"reseaux/referentiel-reseau-compagnons-du-devoir.csv", // Compagnons du devoir
"reseaux/referentiel-reseau-compagnons-du-tour-de-france.csv", // Compagnons du tour de france
"reseaux/referentiel-reseau-uimm.csv", // UIMM
"reseaux/referentiel-reseau-greta.csv", // GRETA
"reseaux/referentiel-reseau-en.csv", // EDUC. NAT
// "reseaux/referentiel-reseau-ccca-btp.csv", // TODO Fichier non fourni pour l'instant
"reseaux/referentiel-reseau-amue.csv", // AMUE
"reseaux/referentiel-reseau-cfa-ec.csv", // CFA EC
"reseaux/referentiel-reseau-compagnons-du-devoir.csv", // Compagnons du devoir
];

/**
Expand Down
Loading

0 comments on commit 99a71fb

Please sign in to comment.