Skip to content

Feat: add project sorting by sector #1592

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

Closed
wants to merge 19 commits into from
Closed

Conversation

dolemoine
Copy link
Contributor

@dolemoine dolemoine commented Jan 29, 2025

Cette pull request se concentre sur l'introduction d'une nouvelle méthode de filtre et la modification de la logique de tri des projets.

Mises à jour du store des filtres :

  • Ajout d'une nouvelle méthode isCompanyDataSelected au store des filtres pour vérifier si les données de l'entreprise sont sélectionnées. [1] [2]

Simplification et refactorisation du code :

  • Simplification des déclarations d'importation dans projectFilter.ts en consolidant les imports du même module.
  • Suppression de la méthode inutilisée byPrograms de la classe ProjectFilter.
  • Modification de la classe ProjectSorter pour inclure un mécanisme de tri conditionnel basé sur le filtre isCompanyDataSelected.

close #1375

@dolemoine dolemoine self-assigned this Jan 29, 2025
Updated project sorting functionality to include a new method for sorting by sector when company data is selected. Refactored existing code to improve reusability and integrate the sector-based sorting across multiple components. Enhanced UI by adding badges for sector count and priority in project cards.
Refactored sorting to remove redundant methods and improve clarity by directly sorting within reactive projects. Simplified badge rendering in `ProjectCard.vue` to better reflect the project's priority and remove unused logic.
Updated filters across multiple components and utilities to use `isCompanyDataSelected()` instead of directly accessing `filters[FilterItemKeys.companyData]`. This improves readability, encapsulates logic, and streamlines future maintenance.
# Conflicts:
#	apps/nuxt/src/components/catalog/CatalogProjects.vue
#	apps/nuxt/src/components/home/TeeHomeProjectList.vue
#	apps/nuxt/src/components/questionnaire/result/list/ResultProjectList.vue
#	apps/nuxt/src/tools/project/projectSorter.ts
Introduced interfaces for project eligibility and sorting. Updated filtering logic to support new query parameters like `onlyEligible` and `sortBy`. Simplified integration of tools across backend and frontend components.
# Conflicts:
#	apps/nuxt/src/stores/filters.ts
#	apps/nuxt/src/stores/program.ts
#	apps/nuxt/src/stores/project.ts
#	apps/nuxt/src/tools/project/projectFilter.ts
# Conflicts:
#	apps/nuxt/src/components/catalog/CatalogProjects.vue
#	apps/nuxt/src/components/home/TeeHomeProjectList.vue
#	apps/nuxt/src/server/api/projects/index.get.ts
#	apps/nuxt/src/tools/project/projectManager.ts
#	libs/backend-ddd/src/project/application/projectService.ts
#	libs/backend-ddd/src/project/domain/projectFeatures.ts
#	libs/common/src/project/projectSchemaValidator.ts
#	libs/common/src/project/types.ts
@dolemoine dolemoine closed this Feb 13, 2025
@dolemoine dolemoine deleted the feat/sector-project-sorting branch February 13, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant