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

Closed
wants to merge 26 commits into 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.

Previous branch updates

  • Create a new AsideNext based on MUI’s Drawer to replace our custom Aside
  • Split housing update and note creation
  • Add AppSelectNext to replace our old AppSelect
  • Add validation schemas for housing update, note creation and identity
  • Add hasRole middleware
  • Add a transaction module to start a transaction throughout several repositories

@Falinor Falinor marked this pull request as ready for review February 4, 2025 14:46
@Falinor Falinor closed this Feb 4, 2025
@Falinor Falinor deleted the feat-save-housing-precisions branch February 4, 2025 14:48
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.

2 participants