-
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
feat(api): 40 implement referentiel import functionality with region academique, academie and departement support #4683
base: main
Are you sure you want to change the base?
Conversation
2fef523
to
132f4d9
Compare
apiv2/src/admin/core/referentiel/ReferentielImportTask.service.ts
Outdated
Show resolved
Hide resolved
...re/referentiel/regionAcademique/useCase/ImportRegionsAcademiques/ImportRegionsAcademiques.ts
Outdated
Show resolved
Hide resolved
2c4ec5a
to
697c9bf
Compare
En plus du conflit, je vois un problème avec l'intégration du code de Johann sur l'import / désistement des classes et le mien. Je le règle. |
697c9bf
to
c515010
Compare
...rentiel/regionAcademique/useCase/ImporterRegionsAcademiques/dto/RegionAcademiqueImportDto.ts
Outdated
Show resolved
Hide resolved
c515010
to
a170ff7
Compare
apiv2/src/admin/core/referentiel/ReferentielImportTask.service.ts
Outdated
Show resolved
Hide resolved
a170ff7
to
bb0c637
Compare
apiv2/src/admin/infra/referentiel/regionAcademique/RegionAcademiqueMongo.provider.ts
Outdated
Show resolved
Hide resolved
}).compile(); | ||
|
||
|
||
regionAcademiqueGateway = module.get<RegionAcademiqueGateway>(RegionAcademiqueGateway); |
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.
Je pense qu'on peut éviter toutes les références à Mongoose dans les tests, il y a un intérêt à découpler les tests aussi.
Que penses tu d'un helper : apiv2/test/admin/sejour/cle/EtablissementHelper.ts
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.
Oui, bonne idée
throw new RegionAcademiqueValidationError('Invalid format - zone'); | ||
} | ||
|
||
if (!regionAcademique.dateDerniereModificationSI || !isValidDate(regionAcademique.dateDerniereModificationSI)) { |
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.
sur la v2 il y a clockGateway : apiv2/src/shared/core/Clock.gateway.ts implémenté par ClockProvider qui dépend de date-fns
ça permet de repartir sur qqch de plus propre dans la gestion des dates
1e019be
to
390e537
Compare
… academique support - Added ReferentielModule to handle import tasks related to regions academiques. - Introduced ReferentielImportTaskService for managing import logic. - Created RegionAcademiqueImportService for handling region-specific imports. - Implemented ImportReferentielController to manage API endpoints for imports. - Added necessary models, DTOs, and MongoDB repository for region academique. - Added tests for the new functionality. This commit enhances the API with the ability to import region academique data, improving data management capabilities. Add error reporting for RegionAcademique, handling validations for classes, and add some tests and fix some typos issues
- Renamed XslX types to XlsX across multiple files - Moved FileValidation interface to a common Referentiel module - Updated type references in mapper, model, and service files - Ensured consistent naming for Excel file-related types
- Moved column names and file validation logic to specific model files - Updated import task service to use ClockGateway for timestamp generation - Added todo list for future referentiel import improvements - Cleaned up imports and type references across referentiel modules - Prepared groundwork for additional referentiel import types
- Integrated Département referentiel import support - Updated ReferentielModule to include Département-related providers and services - Added Département import task type to ReferentielTaskType - Implemented import handling for Département in AdminTaskImportReferentielSelectorService - Updated test cases to support Département import - Marked Département referentiel task as completed in todo list
- Integrated Academie referentiel import support - Updated ReferentielModule to include Academie-related providers and services - Added Academie import task type to ReferentielTaskType - Implemented import handling for Academie in AdminTaskImportReferentielSelectorService - Removed deprecated DTO classes and replaced with Mapper pattern - Updated todo list to mark Academie referentiel import as completed
- Deleted unnecessary pre-save middleware for Academie, Departement, and RegionAcademique schemas - Removed TODO comments related to user and timestamp tracking - Simplified MongoDB provider configurations for referentiel entities
- Replaced enum with object-based FilePath configuration - Updated file upload paths to use dynamic FilePath mapping - Standardized file path generation for different referentiel import types - Simplified file path management across referentiel services
… across referentiel modules - Replaced direct date validation with ClockGateway's isValidDate method - Renamed Mapper classes to ImportMapper for consistent naming - Updated import use cases to use ClockGateway for date validation - Removed deprecated isValidDate function from snu-lib - Simplified date parsing and validation logic across Academie, Departement, and RegionAcademique imports
…epositories - Implemented deleteAll() method in AcademieGateway, DepartementGateway, and RegionAcademiqueGateway - Added corresponding deleteAll() implementations in MongoDB repositories - Created helper functions for deleting all entities in test helpers - Updated test cases to use new deleteAll() method for test data cleanup - Standardized data deletion approach across referentiel modules
…ement, and RegionAcademique repositories - Implemented detailed test cases for AcademieMongoRepository - Added comprehensive test coverage for DepartementMongoRepository - Updated RegionAcademiqueMongo.repository.spec.ts with improved test structure - Introduced helper methods for creating and deleting test data - Ensured consistent testing approach across referentiel repositories
390e537
to
445e712
Compare
This commit enhances the APIv2 with the ability to import region academique data, improving data management capabilities.
https://www.notion.so/jeveuxaider/Importer-les-nomenclatures-SI-SNU-12272a322d508095a937c7713fb4604d?pvs=4