Commit graph

151 commits

Author SHA1 Message Date
Martin
fe0411203f amelioration(types_de_champ/editor): en mode edition d'un champ de type explication, permet de choisir d'afficher ou pas cette explication derriere un collapse 2022-11-08 17:49:24 +01:00
simon lehericey
9bba2093be refactor(champ): mandatory_blank_and_visible? -> mandatory_blank?
As the method does not check visibility
2022-10-18 11:13:41 +02:00
simon lehericey
7114623285 fix(champ): rewire champ.mandatory? to type_de_champ.mandatory?
it fixes behaviour in drop_down_list_component which add option if not mandatory (!= not required)
2022-10-18 11:13:41 +02:00
simon lehericey
528b7ec3f8 refactor(champ): add required?
used for the `required` html attribute. It check visibility to avoid hidden required input which prevent the form from being sent.
2022-10-18 11:13:41 +02:00
simon lehericey
f8ee6386b9 perf(champ): check condition.present? without json deserializationl, -6ms 2022-10-13 22:36:56 +02:00
Damien Le Thiec
2e8c0512a5 Remove skip_cleanup option 2022-10-11 15:11:51 +02:00
Damien Le Thiec
bcdc9c18ae Remove skip_fetch_data mechanism 2022-10-11 11:52:59 +02:00
Damien Le Thiec
0131a41266
Merge branch 'main' into feature/add_rna_type_de_champs 2022-10-05 12:38:24 +02:00
Damien Le Thiec
0d9f02c88d First draft autofetch data for RNA 2022-10-04 22:11:01 +02:00
Paul Chavard
462cc41caa refactor(block): use block? instead of repetition? 2022-09-29 17:49:14 +02:00
Paul Chavard
16bba911ba Revert "Merge pull request #7637 from tchak/chore-add-missing-foreign-keys"
This reverts commit b21ee46dc2, reversing
changes made to dd85b5c35c.
2022-09-21 15:20:42 +02:00
Damien Le Thiec
d8afe81034 Setup RNA champ 2022-09-21 15:18:08 +02:00
Paul Chavard
84b9644bcd fix(db): add missing foreign keys 2022-09-20 15:16:52 +02:00
Paul Chavard
d35ceb7214 fix(champs): finish EditableChampComponent refactor 2022-09-08 11:26:29 +02:00
simon lehericey
ac0ac171ad perf(dossier): remove unused row validation
Gain, one request per champ not child
2022-09-07 15:00:40 +02:00
Colin Darie
4ece7c2494 fix(champ): remove null byte before save
Les null bytes peuvent être injectés lors de c/c depuis certains documents,
et ne sont pas sauvegardables en base, rendant la sauvegarde d'un dossier impossible.

Closes #7656

https://sentry.io/organizations/demarches-simplifiees/issues/3194932607/activity/?project=1429550&query=is%3Aunresolved
2022-08-31 11:39:34 +02:00
simon lehericey
898badb579 a champ is mandatory when visible with a mandatory tdc 2022-08-09 10:25:47 +02:00
Paul Chavard
a24885c2ee feat(champ): can condition on other option 2022-08-04 15:28:54 +02:00
Paul Chavard
782af3322a fix(patron): when rendering “patron” champs should have dossier 2022-07-28 12:10:32 +02:00
Paul Chavard
d9eea35ae8 fix(dossier): decoralate dropdown behaviour from autosave 2022-07-21 18:40:16 +02:00
Paul Chavard
3e40b6d7bc fix(graphql): handle annotations inside blocks 2022-07-21 14:54:14 +02:00
Paul Chavard
0f9d8b6a39 feat(dossier): exclude conditionally invisible fields from mandatory check 2022-07-12 17:33:42 +02:00
Paul Chavard
120b593015 feat(dossier): toggle conditional champs visibility 2022-07-12 17:33:42 +02:00
Paul Chavard
6801b04b7b feat(type_de_champ): type_de_champ editor in stimulus/turbo 2022-06-17 11:04:09 +02:00
Paul Chavard
564daeffe8 perf(dossier): improuve dossier preloading perf 2022-06-14 09:04:26 +01:00
Paul Chavard
6f98def288 refactor(revision): remove old code 2022-05-31 08:58:53 +02:00
simon lehericey
abc3681053 delegate stable_id to tdc 2022-05-24 15:38:50 +02:00
Paul Chavard
6c2a3bafa4 refactor(dossier): champs order by coordinate 2022-05-18 11:20:50 +02:00
Paul Chavard
4523c0590c fix(dossier): champs repetable in champs private 2022-05-04 15:57:25 +02:00
Paul Chavard
b94bc8fd8a refactor(dossier): use champ id as champ attributes key 2022-05-03 16:14:54 +02:00
simon lehericey
ea361643be types_de_champ -> types_de_champs_public 2022-05-03 11:05:24 +02:00
simon lehericey
44f2d93277 quick fix of sections in preview 2022-03-15 10:54:39 +01:00
Paul Chavard
c60a8970f1 perf(dossier): memoize champ.sections on dossier 2022-03-11 00:15:53 +01:00
Paul Chavard
54b559364a feat(dossier): replace discarded with visible_by_administration 2022-03-10 14:29:40 +01:00
Paul Chavard
fc058f721d a11y(champs): expose ids for UI on champ 2022-01-05 12:33:40 +01:00
kara Diaby
dc35d9521f add other option to liste deroulante champ 2021-10-26 16:11:15 +02:00
Paul Chavard
d308448f02 feat(type_de_champ): add secondary label and description do linked drop downs 2021-10-26 12:18:01 +02:00
Paul Chavard
09a09d3fcf feat(revisions): add rebased_at to champs 2021-10-20 17:26:09 +02:00
simon lehericey
354735ace4 add champ value_json jsonb column 2021-10-12 14:27:20 +02:00
Paul Chavard
ac0f50b488 Improuve champ blank check 2021-07-22 10:45:25 +02:00
Paul Chavard
dfc46a8736 Enable add descriptions to cadastres 2021-05-26 11:27:09 +02:00
Paul Chavard
c20ad5ca17 Remove the link between commentaire and user 2021-04-22 15:10:47 +01:00
Paul Chavard
5e5122a436 Prevent crash in preview where there is no siblings 2021-04-06 18:15:29 +01:00
Paul Chavard
2702660d72 Update app/models/champs/header_section_champ.rb
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-04-06 10:45:16 +01:00
Pierre de La Morinerie
3499f5af9a models: remove invalid Dossier ↔︎ Champ inverse relationship
`Dossier.champs` is not really an inverse of `Champs.dossier`: when a
Champ record is created, it should not always be added to dossier.champs
(for instance if the champ is private).

NB: this breaks the workaround we added in #3907 to fix the parent
dossier not being touched in some cases (the workaround was to add an
inverse relationship, but we now have to remove it).

The new workaround is to watch for `changed_for_autosave?` on champs.
Unlike `changed?`, `changed_for_autosave?` also detects changes to
attachments. This allows us to touch both `last_champ_updated_at` and
`updated_at` in a single pass.
2021-04-06 10:26:17 +02:00
Paul Chavard
1449fbbe67 Fix multiple_drop_down_list mandatory check 2021-03-18 15:22:28 +01:00
Paul Chavard
d24ee27cac Try to reduce the number of external data fetches
Only fetch external data if the external_id is the current one and data is not yet fetched
2021-03-11 14:56:37 +01:00
Paul Chavard
7eee14feef Add ChampFetchExternalDataJob 2021-02-17 19:10:16 +01:00
Paul Chavard
a591d5528e Add job exception log methods to champ and dossier 2021-02-05 18:56:27 +01:00
Paul Chavard
78a07ef021 Add job exception logs to dossier and champ 2021-02-04 19:27:27 +01:00