Skip to content

Release : Filtre entreprise dans le catalogue + dans le détail des projets #1832

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

Merged
merged 47 commits into from
Apr 16, 2025

Conversation

yvalentin
Copy link
Collaborator

@yvalentin yvalentin commented Apr 14, 2025

oumeimaelisbihani and others added 30 commits January 16, 2025 15:14
oumeimaelisbihani and others added 11 commits March 27, 2025 11:38
…ct-the-ohter-way' into release/company-data-filter-improvements
# Conflicts:
#	apps/nuxt/src/components/filters/FiltersAccordion.vue
#	apps/nuxt/src/components/project/details/ProjectPrograms.vue
#	apps/nuxt/src/components/project/details/ProjectSideNav.vue
#	apps/nuxt/src/tools/companyData/companyData.ts
# Conflicts:
#	apps/nuxt/src/components/catalog/CatalogLayout.vue
@yvalentin yvalentin requested review from Copilot and ttdm April 14, 2025 13:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 25 out of 26 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • apps/nuxt/src/assets/scss/sidemenu.scss: Language not supported
Comments suppressed due to low confidence (7)

apps/nuxt/src/stores/program.ts:35

  • Verify that ProgramFilter.byCompanyData accepts a boolean value as its second argument, as this replaces the previously passed company data. Adjust the filter logic if the function expects a different type.
ProgramFilter.byCompanyData(program, isCompanySelected)

apps/nuxt/src/pages/projets-entreprise/[projectSlug]/index.vue:12

  • Ensure the removal of MiddlewareName.resetFilters is intentional, as this change may affect the expected reset behavior on project detail pages.
middleware: [MiddlewareName.resetUsedTrackStore, MiddlewareName.resetQueries, MiddlewareName.hasProject]

apps/nuxt/src/pages/aides-entreprise/index.vue:42

  • Confirm that switching the argument to true in getDependentCompanyData is the intended behavior for fetching enterprise aid data.
await new ProgramManager().getDependentCompanyData(true)

apps/nuxt/src/components/filters/FilterByCompanyData.vue:94

  • [nitpick] Using a computed setter that instantiates Navigation on every set call could lead to performance issues; consider reusing a Navigation instance or refactoring the logic to reduce redundant instantiations.
const isCompanyDataSelected = computed({

apps/nuxt/src/components/catalog/CatalogProjects.vue:1

  • Ensure that the deletion of CatalogProjects.vue is intentional and that all references to this component have been updated.
File removed entirely

apps/nuxt/src/components/catalog/CatalogPrograms.vue:1

  • Verify that the removal of CatalogPrograms.vue does not break any dependent functionality in the catalog flow.
File removed entirely

apps/nuxt/src/components/catalog/CatalogLayout.vue:1

  • Confirm that removing CatalogLayout.vue is intentional and that any components relying on its structure have been refactored accordingly.
File removed entirely

@yvalentin yvalentin linked an issue Apr 14, 2025 that may be closed by this pull request
1 task
@ttdm
Copy link
Collaborator

ttdm commented Apr 16, 2025

Salut, je viens de débuter ma review. Si jamais tu es en train de regarder cette PR, il y a un petit problème fonctionnel sur :

  1. Créer une variante au niveau du titre "Mes aides" sur les fiches projet : Mettre "Mes aides" quand l'entreprise est identifiée (ou filtre actif) et "Toutes les aides" quand l'entreprise n'est pas identifiée

Copy link
Collaborator

@ttdm ttdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool comme PR.

⚠️ j'ai approuve parce que le changement nécessaire ne redemande pas de review mais il y a bien au moins un changement nécessaire !

Comment on lines +94 to +105
const isCompanyDataSelected = computed({
get: () => useFiltersStore().getCompanyDataSelected().value,
set: (value: boolean) => {
useFiltersStore().companyDataSelected = value
if (navigation.isCatalogProjects()) {
new ProjectManager().getProjects()
}
if (navigation.isCatalogProjectDetail() || navigation.isCatalogPrograms()) {
new ProgramManager().getDependentCompanyData(true)
}
}
})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Praise !

@@ -3,7 +3,7 @@
v-if="isDataFull || countFilteredPrograms"
id="project-aids-title"
class="fr-pt-3v fr-pb-4v fr-border-b--grey--light"
title="💰 Mes aides"
:title="isCompanyDataSelected ? '💰 Vos aides' : '💰 Toutes les aides'"
Copy link
Collaborator

@ttdm ttdm Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ isCompanyDataSelected => companyDataSelected
voir même companyDataSelected && isDataFull

const teeProjectFormContainer = useTemplateRef<HTMLElement>('teeProjectFormContainer')

const resume = computed<string>(() =>
Translation.t('project.programsList', {
effectif: Translation.t('enterprise.structureSize.' + CompanyData.size),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remarque: c'est peut être le moment de changer les valeur qui s'affichent en fonction de la taille des entreprises.
JB s'est pris des remarques en comité opérateur à cause du MICRO quand les entreprises font moins de 10personnes.

@@ -40,6 +40,7 @@ export const useFiltersStore = defineStore('filters', () => {
[FilterItemKeys.regionAid]: [],
[FilterItemKeys.operatorAid]: []
}
setCompanyDataSelected(true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça me semble étonnant ça.
ça t'airait de le mettre derrière un "ifCompanyDataFull" ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@yvalentin yvalentin merged commit bd34013 into main Apr 16, 2025
10 checks passed
@yvalentin yvalentin deleted the release/company-data-filter-improvements branch April 16, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants