Skip to content
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: Ajout du CTA + form autre projet sur le catalogue des projects #1565

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dolemoine
Copy link
Collaborator

@dolemoine dolemoine commented Jan 22, 2025

Petite refacto pour ajouter le CTA + formulaire côté catalogue projet.
Test fonctionnel en local OK

app review: https://tee-preprod-pr1565.osc-fr1.scalingo.io/

close #1485

Replaced inline code for "OtherProject" functionality with a new, reusable `OtherProject` component. This simplifies the structure of `ResultProjectList.vue` and `CatalogProjects.vue`, reducing redundancy and improving maintainability. Unneeded logic and imports have been removed accordingly.
Refactored OtherProject component to accept a `form` prop via `defineProps`, providing better flexibility and reactivity. Updated ResultProjectList to pass `otherProjectForm` as a prop and added a watcher to reset the form state when `filteredProjects` changes.
@dolemoine dolemoine requested review from oumeimaelisbihani and ttdm and removed request for oumeimaelisbihani January 22, 2025 14:37
</Transition>
<div class="fr-container fr-m-0 fr-p-0 fr-pl-md-2v">
<div class="fr-col-12 fr-col-offset-md-2 fr-col-md-10 fr-pl-md-2v fr-pr-md-6v">
<OtherProject :form="otherProjectForm" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

[praise] : propre la refacto!

@oumeimaelisbihani oumeimaelisbihani removed the request for review from ttdm January 22, 2025 15:55
@dolemoine dolemoine self-assigned this Jan 22, 2025
Removed unused props from OtherProject and directly managed the form state locally for clarity and better independence. Added a watcher to reset the form state when the theme changes, ensuring a consistent behavior. Updated related components to reflect these adjustments and removed redundant logic.
@dolemoine dolemoine requested a review from yvalentin January 22, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ajouter "j'ai un autre projet" sur le catalogue des projets
2 participants