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
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
22265df
feat(frontend): add ConfirmationModalNext to replace the old confirma…
Falinor Jan 23, 2025
c6c3a92
feat(frontend): split the precision modal into two components
Falinor Jan 23, 2025
53806a1
feat(frontend): map the old precisions to the new format
Falinor Jan 23, 2025
471bda4
feat(frontend): immediately save precisions on modal close
Falinor Jan 23, 2025
f0f4f94
feat(frontend): only send the relevant payload when updating housing
Falinor Jan 23, 2025
47512fa
feat(server): link precisions to a housing
Falinor Jan 23, 2025
0b8a5f6
feat(server): add a script to migrate precisions
Falinor Jan 23, 2025
68ac8eb
feat(server): add PrecisionMissingError
Falinor Jan 23, 2025
8ba92da
feat: set tab when opening precisions; serialize and deserialize old …
Falinor Jan 23, 2025
036d022
refactor(server): simplify precisions migration script
Falinor Jan 24, 2025
1bd2e97
fix(server): ensure writing to the old and new precisions
Falinor Jan 24, 2025
6f8972d
fix(frontend): use only the well formed precisions
Falinor Jan 24, 2025
61fea15
feat: replace the hardcoded precision list by a service
Falinor Jan 24, 2025
07b9ccf
fix(server): fix precision and vacancy reason comparisons
Falinor Jan 24, 2025
2dbf8c7
fix(frontend): fix type error
Falinor Jan 24, 2025
312edc1
feat(frontend): add extra-large size to the PrecisionModal
Falinor Jan 24, 2025
6bb2fc7
test(frontend): add precision handlers
Falinor Jan 24, 2025
d0ce12a
fix: typo in existing precisions and vacancy reasons
Falinor Jan 24, 2025
192fc55
fix: send null values instead of empty strings
Falinor Jan 24, 2025
2000d40
fix: UI adjustments and add 'view more' button
loicguillois Jan 30, 2025
e4fd768
refactor(frontend): import PrecisionCategory; replace px by rem
Falinor Feb 3, 2025
f090e00
Merge pull request #1112 from MTES-MCT/retours-lucas-feat-save-housin…
Falinor Feb 3, 2025
6ddd374
fix(frontend): replace housing evolution checkboxes by radio buttons
Falinor Feb 3, 2025
d888117
feat(frontend): specify the precision category for housing evolutions
Falinor Feb 3, 2025
2c7498f
test(server): fix precision repository test
Falinor Feb 3, 2025
d477f25
fix(frontend): fix select opacity on Chrome; add an empty option
Falinor Feb 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(frontend): use only the well formed precisions
Falinor committed Jan 24, 2025
commit 6f8972dda03e28210f58d6dd25c3bc86c5076b48
Original file line number Diff line number Diff line change
@@ -440,6 +440,9 @@ function HousingEditionSideMenu(props: HousingEditionSideMenuProps) {
const precisions =
housing?.precisions
?.concat(housing?.vacancyReasons ?? [])
// Only keep the well formed precisions and vacancy reasons
// like `Dispositifs > Dispositifs incitatifs > Réserve personnelle ou pour une autre personne`
?.filter((precision) => precision.split(' > ').length === 3)
?.map((precision) => toNewPrecision(precisionOptions, precision)) ?? [];
const mechanisms = precisions.filter((precision) =>
isPrecisionMechanismCategory(precision.category)