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

Rework housing precisions modal #1118

Merged
merged 64 commits into from
Feb 6, 2025
Merged

Rework housing precisions modal #1118

merged 64 commits into from
Feb 6, 2025

Conversation

Falinor
Copy link
Collaborator

@Falinor Falinor commented Feb 4, 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 and others added 27 commits February 6, 2025 11:57
@Falinor Falinor force-pushed the feat-save-housing-precisions branch from 6fe52c0 to 5205e7c Compare February 6, 2025 10:57
@Falinor Falinor merged commit 1b38acd into main Feb 6, 2025
16 of 18 checks passed
@Falinor Falinor deleted the feat-save-housing-precisions branch February 6, 2025 10:59
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.

2 participants