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

Save housing precisions #1110

Draft
wants to merge 19 commits into
base: feat-update-housing-modal
Choose a base branch
from

Conversation

Falinor
Copy link
Collaborator

@Falinor Falinor commented Jan 24, 2025

This branch is based upon the one which settled foundations to update the housing edition modal.
This branch should add the precision modal, its three tabs, retrieving and saving precisions for a housing.
The old fields (precisions, vacancy_reasons) and the new join table (housing_precisions) should both be written at the same time. Reads will still come from the old fields and get translated in the front app, using the referential of precisions coming from the database.

Features

  • Retrieve the precision referential using a basic service
  • Save a housing’s precisions to both the old and new fields
  • Provide a migration script to copy data from the old fields to the new join table housing_precisions
  • Add PrecisionTabs
  • Add PrecisionModalNext to wrap PrecisionTabs (shall replace PrecisionModal later)
  • Map from/to old precisions and vacancy reasons

Refactoring

ConfirmationModal

The confirmation modal was based on @codegouvfr/react-dsfr’s Modal but included the opening button and the modal, which lacks flexibility for some use cases. Thus ConfirmationModalNext.tsx and its function createConfirmationModal has been added to only provide a basic modal with default buttons : cancel and save.

TODO

  • Add margin between tags
Screenshot 2025-01-24 at 10 33 58
  • Add a button "Display more"
Screenshot 2025-01-24 at 10 35 19
  • Augment the width and height of the precision modal
  • The items in the precision tab "Évolutions du logement" should be radio boxes
  • Anything forgotten ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant