Commit graph

3590 commits

Author SHA1 Message Date
Paul Chavard
c52688e1e9
Merge pull request #10056 from tchak/fix-champ-nil
fix(dossier): no crash if condition target champ is not found
2024-03-03 09:40:24 +00:00
Colin Darie
dbf04c63a4
fix(flipper): don't clone features globally enabled 2024-03-03 00:13:01 +01:00
Eric Leroy-Terquem
e94ae3498c
Merge pull request #10048 from demarches-simplifiees/etq-admin-je-vois-les-messages-envoyes-aux-brouillons
ETQ instructeur je vois les messages envoyés aux usagers avec un dossier en brouillon
2024-03-01 13:27:36 +00:00
Paul Chavard
1e0baca866 fix(dossier): no crach if condition target champ is not found 2024-02-29 22:09:27 +01:00
Paul Chavard
0721c98e65 fix(export): avoid a crash when dossier user is deleted 2024-02-29 17:54:46 +01:00
Eric Leroy-Terquem
1f0e2030be db(migration): add procedure_id to bulk_messages 2024-02-28 16:07:27 +01:00
Christophe Robillard
26a86d8003 filter all demarches by kind usager 2024-02-23 16:04:27 +01:00
Colin Darie
f04420812b
fix(export): typo tier => tiers 2024-02-22 15:58:29 +01:00
Colin Darie
7143c7e8e2
Merge pull request #9995 from colinux/attestation-v2-improvements
ETQ admin, quelques améliorations sur l'éditeur v2
2024-02-22 11:30:41 +00:00
Colin Darie
3c22f4ea48
fix(attestation): always return v1 template when exists, otherwise it's a v2 2024-02-22 12:19:07 +01:00
Colin Darie
8ba1c0e481
feat(attestation): can toggle optional champs tags visibility 2024-02-22 12:19:06 +01:00
Colin Darie
c5174f7d43
feat(attestation): dossier for preview priorize termine dossier: all data are available 2024-02-22 12:19:05 +01:00
Colin Darie
accc5af7d2
chore(tags): don't list champs Carte, PJ, Titre identité
Note: ils ne sont pas validés par le TagsValidator, donc ça ne cassera
pas les attestations existantes. L'objectif est juste de ne pas les
proposer dans les interfaces.
2024-02-22 12:19:04 +01:00
Colin Darie
bacfc0c5d1
Merge pull request #10015 from mfo/US/feat-export-include-mandataire
ETQ instructeur, ETQ API les exports contiennent plus de donnée (mandataire & info de france connection france connect)
2024-02-22 10:33:15 +00:00
Martin
77927e41bc feat(api.mandataire): add missing mandataire_first_name/last_name
Co-authored-by: Colin Darie <colin@darie.eu>
2024-02-21 15:15:55 +01:00
Martin
c2675dfb4d feat(export.user): add when user passthru FranceConnect or not 2024-02-21 14:44:49 +01:00
Martin
c9235c8a3d feat(export.for_tier): add to export 2024-02-21 14:44:49 +01:00
Colin Darie
5ab1d45b8a fix(instructeur): don't crash when adding a filter too long 2024-02-21 12:13:47 +01:00
Paul Chavard
5a8859cd28
Merge pull request #10018 from tchak/fix-address-champ
fix(champ): do not reset data on champs without fetch_external_data
2024-02-21 09:06:24 +00:00
Colin Darie
1671a783a2
Merge pull request #10021 from colinux/fix-email-subject-double-encode
ETQ usager je dois voir de vraies apostrophes à la place de `&#39;` dans les sujets d'email
2024-02-21 08:33:44 +00:00
Paul Chavard
702b9dd8b3 fix(champ): do not reset data on champs without fetch_external_data 2024-02-21 08:54:08 +01:00
Colin Darie
c05aaa5f35 fix(email): dynamic subject should be escaped, cf RFC 2047 which have its own encoding 2024-02-20 18:29:41 +01:00
Colin Darie
560d50f52d fix(dropdown-multiple): a valid option starting by [ may not be a JSON value 2024-02-20 17:41:53 +01:00
Martin
8dc3103ac1 fix(champs.email): allow nil 2024-02-19 15:13:20 +01:00
Paul Chavard
46b12c0c3d
Merge pull request #9990 from tchak/refactor-adresse-champ
refactor(address): use directly BAN data
2024-02-16 16:42:17 +00:00
Martin
1a424beb6f fix(tags): libelle with double dash, becomes double underscore. no worries it was already broken 2024-02-16 14:00:18 +01:00
Paul Chavard
20307f1d21 refactor(address): use directly BAN data 2024-02-16 12:15:14 +01:00
Martin
56ed901703 tech(clean): remove dead code 2024-02-16 11:23:39 +01:00
Martin
3e64a3bbbc tech(refactor): extract clone logic inside its own class 2024-02-16 11:23:39 +01:00
Martin
72a3f6e89c refactor(export/archives): holds user profile asking for the archive or export 2024-02-16 11:23:38 +01:00
mfo
4dfb3b86ef
Merge pull request #10000 from mfo/US/groupe-instructeur-manageable-for-routee-procedure
ETQ administrateur, je peux gerer la liste des instructeurs même si le routage est activé sur ma démarche
2024-02-16 09:26:06 +00:00
Martin
8488e74bbb review(suggestion): better code with reviews, normalize Champs::EmailChamp.value, simplier default strict validation activation
Co-authored-by: Colin Darie <colin@darie.eu>
2024-02-15 16:41:00 +01:00
Martin
5f77c0cd06 feat(email.validation): expand email validation to Avis, ContactInformation, Invite, DossierTransfert 2024-02-15 16:41:00 +01:00
Martin
05193e1d1e feat(User.validation): validates email when env var is present 2024-02-15 16:41:00 +01:00
Martin
25f92a7760 feat(email.validator): define a strict email validator, validates Champs::EmailChamp.value only on validation context
Co-authored-by: Paul Chavard <github@paul.chavard.net>
2024-02-15 16:41:00 +01:00
Martin
5407011668 feat(procedure.routing): allow admin to manage instructeur even when procedure has some routing 2024-02-15 13:40:48 +01:00
seb-by-ouidou
9ddd55d5cd feat: remove commentaire_component and replace it by message_component + replace commentaires/_form by messages/_form + few fixes 2024-02-15 07:50:20 +00:00
Colin Darie
bd3c2c070a
Merge pull request #9957 from demarches-simplifiees/finalize-rna-rnf-ldu
ETQ instructeur et consommateur API, la vue du champ RNA est harmonisée avec le champ RNF
2024-02-14 15:30:54 +00:00
Colin Darie
48644ae407
Merge pull request #9846 from adullact/feature-ouidou/admin_creation_delegation_gestionnaire_contact_parent_gestionnaires
Délégation de compte: ETQ gestionnaire je peux contacter les gestionnaires des groupes parents
2024-02-13 14:42:03 +00:00
Paul Chavard
93635b3516 refactor(logic): compute sub champ values 2024-02-13 11:57:31 +01:00
seb-by-ouidou
fba3cbe331 feat: as gestionnaire, contact gestionnaire of parent groupe 2024-02-13 11:19:52 +01:00
Lisa Durand
f09ab62620
add rna type de champ to harmonize api with rnf 2024-02-12 17:20:07 +01:00
Lisa Durand
9e3f28e87b
add rnf and rna address in form view 2024-02-12 17:20:05 +01:00
Colin Darie
ea89c2e8dd
fix(attestation): tag commune_name from address 2024-02-12 15:08:05 +01:00
Colin Darie
6ab3fa1cf4
fix(rubocop): Rails/RedundantActiveRecordAllMethod 2024-02-12 09:33:18 +01:00
Paul Chavard
23592087ae refactor(instructeur): use precomputed timestamps 2024-02-08 18:36:04 +01:00
Colin Darie
fb14afc530 fix(rna): real RNA identifier could contain at least 1 letter, despite of specs 2024-02-06 15:02:57 +01:00
Colin Darie
70e92f7c6b
Merge pull request #9903 from colinux/attestation-ux
ETQ admin, je peux tester l'attestation v2
2024-02-06 08:09:53 +00:00
Colin Darie
f7484eb0e5
feat(attestation): list tags errors and substitute missing tag by libelle 2024-02-02 13:05:09 +01:00
seb-by-ouidou
46c19014f9 feat: notify administrateur and gestionnaire by email when new commentaire + for administrateur highlight card and commentaires if any unread 2024-02-02 12:52:36 +01:00
Colin Darie
7e02342518
feat(attestation): tiptap default attestation 2024-02-01 18:55:58 +01:00
Colin Darie
443e41a6ed
style(attestation): group tags by section 2024-02-01 18:55:52 +01:00
Colin Darie
40353fee04
feat(attestation): replace tags in preview for v2 2024-02-01 18:55:50 +01:00
mfo
86fb28bda0
Merge pull request #9956 from mfo/US/amelioration-rebase
tech(perf.rebase): améliore la performance pour réconcilier les dossiers d'une procédure lorsqu'un administrateur change le formulaire (donc nouveau milésime 🍷)
2024-01-31 17:26:25 +00:00
Martin
437b3d2a61 fix(perf): last n+1 2024-01-31 17:06:16 +01:00
Martin
47ff3086af fix(rebase): preload revision too 2024-01-31 17:06:16 +01:00
Colin Darie
1123222b36
chore(schema): add version to attestation_templates 2024-01-31 17:03:59 +01:00
Colin Darie
1c3254755d
chore(schema): add official layout to attestation templates 2024-01-31 17:03:55 +01:00
Colin Darie
8ba78d1cfe
feat(attestation): conditional official layout & logo (start) 2024-01-31 17:03:54 +01:00
Colin Darie
277b4f4ec8
style(attestation): improve rendering with almost all nodes 2024-01-31 17:03:48 +01:00
mfo
fcb2d93056
Merge pull request #9954 from mfo/US/procedure-logo-size
ETQ admin les logos de démarches gardent une résolution convenable
2024-01-31 16:01:07 +00:00
Martin
b964ac6a7a perf(rebase): includes champs.types de champs instead of n+1 on this one 2024-01-31 16:20:50 +01:00
Martin
6360ae25b0 feat(procedure.logo): avoid to resize logo to the smallest scale otherwise it gets pixelated 2024-01-31 14:33:28 +01:00
Kara Diaby
46748091a6 Permet au Support de marquer une démarche comme modèle et de filtrer dans toutes les démarches 2024-01-31 09:30:14 +00:00
seb-by-ouidou
6cd8b6d2df feat: for gestionnaire highlight card and commentaires if any unread 2024-01-29 18:23:39 +01:00
Eric Leroy-Terquem
6203b1fd05
Merge pull request #9879 from demarches-simplifiees/cleaning-conditional-and-routing-code
Tech : nettoyage du code conditionnel et routage
2024-01-29 13:43:52 +00:00
mfo
77ca3dd28a
Merge pull request #9922 from mfo/US/nplus_one_in_summary
perf(TypeDeChampEditor): faster
2024-01-29 10:58:05 +00:00
Martin
f1f471a020 feat(ProcedureRevisionPreloader): find PRTDCs and children first, then dispatch on all revision. Apply to admin/procedure/:id/modifications 2024-01-29 11:38:36 +01:00
Colin Darie
a582fef1e5
Merge pull request #9934 from colinux/fix-export-link-witout-file
ETQ instructeur, n'affiche pas encore de lien vers un export quand le fichier n'est pas encore disponible
2024-01-29 10:11:33 +00:00
LeSim
e12c663d21
Merge pull request #9940 from demarches-simplifiees/can_edit_again_a_token
Admin: je peux modifier le nom et les réseaux d'un jeton d'API
2024-01-29 09:21:21 +00:00
simon lehericey
5eaa957c31 can edit api_token to change networks and name 2024-01-29 10:09:55 +01:00
Colin Darie
c02171ede7
Merge pull request #9936 from colinux/badge-corrige
ETQ instructeur, je vois un badge Corrigé lorsque le dossier a été corrigé
2024-01-29 08:57:54 +00:00
Colin Darie
b64a32444c
Merge pull request #9935 from colinux/transfer-empty-no-fail
Tech: plus d'erreur lorsque l'email de transfert n'a plus de dossier associé
2024-01-29 08:43:50 +00:00
Martin
b9bbe70ec5 perf(Administrateurs::ConditionsController#*): better perfs 2024-01-26 15:09:55 +01:00
Martin
01752bc2e8 perf(ProcedureRevisionPreloader): preload revision quickly 2024-01-26 14:47:44 +01:00
Martin
ecc83edf4f wip 2024-01-26 13:43:10 +01:00
simon lehericey
d909e2c8ea add various expiring scopes to APIToken 2024-01-26 10:15:37 +01:00
Martin
0e5768ec5b fixup! perf(editor): better perf to add, destroy, update, move up, move down and move with number 2024-01-26 09:45:59 +01:00
Martin
aae26a863a perf(admin#dashboard): skip validation of PJ 2024-01-25 17:29:39 +01:00
Martin
271ac14fad perf(draft_changed?): do not try to compare revisoin if they are not loaded 2024-01-25 17:20:30 +01:00
Martin
60800b6113 perf(editor): better perf to add, destroy, update, move up, move down and move with number 2024-01-25 15:49:44 +01:00
Martin
50d148d412 perf(types_de_champs_controller): preload procedure to avoid n+1 query in champs_summary 2024-01-25 14:19:55 +01:00
Colin Darie
4aa1306536
feat(transfer): make it silent in case dossier had been destroyed between queuing and processing
Co-authored-by: mfo <mfo@users.noreply.github.com>
2024-01-25 11:31:12 +01:00
simon lehericey
47076063bb feature(api): remove update 2024-01-25 11:17:44 +01:00
simon lehericey
b635c940ae refactor(UI api token): add more information to api token list
- network filtering
- validity
- last used

remove creation logic
2024-01-25 11:17:43 +01:00
simon lehericey
7e8555923f feature(api): add ensure_token_is_not_expired to api_controller v1 and v2 2024-01-25 10:51:58 +01:00
simon lehericey
6e5678d1c2 feature(api): add forbidden_network? to api_token 2024-01-25 10:51:58 +01:00
Colin Darie
8e6a1c58b2 feat(correction): badge Corrigé when a correction has been resolved
Closes #9928
2024-01-24 17:26:34 +01:00
Colin Darie
520a7c4402
fix(exports): don't try to link to an export when file is not yet attached 2024-01-24 13:36:25 +01:00
Kara Diaby
ac29cfbfdb Envoie un email à l'expert en cas de nouveau commentaire de l'usager dans la messagerie 2024-01-24 10:48:17 +00:00
Martin
2952987ad8 refactor(spec): stop using procedure type de champs traits as :with_datetime, :with_xxx in favor of :types_de_champ_public which keeps position in check 2024-01-23 17:30:22 +01:00
Colin Darie
716e4bbe5d
Merge pull request #9645 from adullact/feature-ouidou/admin_creation_delegation_gestionnaire_answer_administrateur
Feature ouidou/admin creation delegation gestionnaire answer administrateur
2024-01-22 15:45:58 +00:00
Martin
0f194a5e8e refactor(procedure_revision): without renumber, use types_de_champ_public factory for ordered champs 2024-01-22 14:57:04 +01:00
mfo
89d2c57cb2 review(sim): some review suggestions
Co-authored-by: LeSim <mail@simon.lehericey.net>
2024-01-22 14:57:04 +01:00
Martin
434cd77030 poc(spec): renumber only at one point 2024-01-22 14:57:04 +01:00
Martin
a9c0d3e7e9 tech(clean): avoid useless indirection, cleanup some code complexity, rubocopify 2024-01-22 14:57:04 +01:00
Martin
a78a6b6f34 feat(remove_type_de_champ): stop renumbering all procedure_revision_type_de_champ on remove_type_de_champ 2024-01-22 14:57:04 +01:00
Martin
4d97c5bc8a feat(move_type_de_champ): stop renumbering all procedure_revision_type_de_champ on move_type_de_champ 2024-01-22 14:57:04 +01:00
Martin
4b57ed871a feat(add_type_de_champ): stop renumbering all procedure_revision_type_de_champ 2024-01-22 14:57:04 +01:00
seb-by-ouidou
a6ca4b668e feat: answer message to administrateur as gestionnaire 2024-01-22 14:36:38 +01:00
seb-by-ouidou
e6474f0d14 feat: US4.3.9 children management 2024-01-22 14:36:38 +01:00
seb-by-ouidou
96dd6bec52 feat: US4.3 update and delete groupe gestionnaire 2024-01-22 14:36:38 +01:00
Colin Darie
2f53a017b4
Merge pull request #9886 from colinux/export-ff-active-revision-first
Tech exports: feature flat pour trier les colonnes par révision récente puis position plutôt que mélanger les révisions entre elles
2024-01-22 12:21:32 +00:00
Colin Darie
58c00b2d4e
feat(export): can sort by revision first, instead of mixing revisions 2024-01-22 12:03:30 +01:00
Colin Darie
7892b54aa6 fix(discarded-dossiers): don't crash whole job when a single dossier causes an error 2024-01-17 13:15:42 +01:00
Colin Darie
1a8f839a7e
Merge pull request #9915 from colinux/fix-admin-memory-leak
Perf: remplace les `OpenStruct` par des objets plus performants
2024-01-17 08:59:01 +00:00
Colin Darie
a4db911585
perf(admin): remove 2 useless zones queries on each admin page due to navigation 2024-01-16 19:43:58 +01:00
Colin Darie
e1102ed993
perf(admin): fix N+1 on procedures zones on every admin page 2024-01-16 19:43:56 +01:00
Colin Darie
4408f0f4fb
perf(zone): replace OpenStruct by a Struct label model 2024-01-16 19:43:25 +01:00
Colin Darie
e807752a78
perf(type-de-champ): replace stable_self OpenStruct by Struct model 2024-01-16 19:43:23 +01:00
Colin Darie
fa74cdb4c7
perf(null-zone): replace open struct by struct 2024-01-16 19:43:22 +01:00
Colin Darie
461e311d3d
perf(admin): replace ProcedureDetail open struct with proper struct 2024-01-16 19:43:19 +01:00
Lisa Durand
6773843d52 add clickable summary in champ editor view for admin 2024-01-16 11:23:14 +01:00
Lisa Durand
d9b75ce0a2
Merge pull request #9882 from demarches-simplifiees/add-dossier-reference-in-transfer-email
Je veux que le numéro du dossier apparaisse dans l'email de demande de transfert
2024-01-15 15:39:09 +00:00
Colin Darie
8a83fd2ce0
fix(recherche): show notification indicator for instructeurs 2024-01-12 10:09:34 +01:00
simon lehericey
90f145e17a add email_merge_token to france connect information 2024-01-11 11:33:38 +01:00
simon lehericey
6bad272825 style 2024-01-11 11:33:38 +01:00
seb-by-ouidou
c45e2eaccc feat: write message to gestionnaires as administrateur 2024-01-09 13:25:04 +01:00
mfo
a0248bf08b
Merge pull request #9888 from mfo/US/validate-epci-by-code
Correctif: Le noms des EPCIs changent, ce qui bloque la validation et ou demande a resaisir le champs
2024-01-08 09:56:09 +00:00
Martin
fa07c21ec3 fix(champs.epci): epci names change over time. remap when it occurs 2024-01-04 07:17:15 +01:00
mfo
9df978f6fa
Merge pull request #9887 from mfo/US/fix-fci-missing-device-callback
Correctif: ETQ usager invité, lorsque je crée mon compte via FC, je ne retrouve pas mes invitations
2024-01-04 06:15:14 +00:00
Martin
92730e266b fix(FranceConnect): missing after_confirmation callback, leading to invalites invitations when user france connect 2023-12-26 15:00:15 +01:00
Eric Leroy-Terquem
547a4d95b7 chore(logic): commune and epci champs are always compute with compute_value_json 2023-12-22 10:57:53 +01:00
seb-by-ouidou
c253e7dd65 feat: US5.1 US5.2 administrateur in admin 2023-12-21 18:40:36 +01:00
Colin Darie
6f7d786783
Merge pull request #9880 from demarches-simplifiees/api_token_store_last_used_ips
API: stocke les ips utilisées pour accéder à l'API
2023-12-21 16:18:00 +00:00
Lisa Durand
ff284a1c96 add more info in notify transfer email 2023-12-21 16:58:33 +01:00
Eric Leroy-Terquem
4c82f2c9d7 fix(champ value): fix compute_value_json on departement champ 2023-12-21 16:21:08 +01:00
simon lehericey
afb6eacf57 feature(api): store any ip used 2023-12-21 16:02:11 +01:00
Colin Darie
9bdf525ff1
Merge pull request #9863 from colinux/fix-message-html-injection
Tech: échappe les tags de données utilisateur dans les modèles pour email
2023-12-21 08:50:21 +00:00
Colin Darie
29df9ad09d
Merge pull request #9751 from tchak/departement-tags
feat(champs): expose more tags and api fields on rnf, address and commune
2023-12-21 08:45:01 +00:00
Colin Darie
535a54ce97
Merge pull request #9874 from demarches-simplifiees/add-email-for-tiers-when-repasser-en-instruction-ldu
[Co-construction] Envoyer un mail au bénéficiaire si le dossier repasse en instruction
2023-12-21 08:32:10 +00:00
Lisa Durand
3e872c5246 add email for tiers when repasser en instruction 2023-12-20 11:51:02 +01:00
Eric Leroy-Terquem
954facdaff
Merge pull request #9798 from demarches-simplifiees/add-new-operators-to-conditional
Etq admin je peux conditionner/router avec les opérateurs "est dans mon département",  "n'est pas dans mon département",  "est dans ma région" et   "n'est pas dans ma région".
2023-12-19 16:10:59 +00:00
mfo
e75c4456e8
Merge pull request #9871 from mfo/US/add-pj-to-explication
ETQ administrateur, je peux ajouter une notice explicative a un champs explication
2023-12-19 10:44:03 +00:00
Martin
e43c2f1407 feat(procedure_revision.compate): track and show diff for TypeDeChamp.explication between draft and published revisions 2023-12-19 10:51:06 +01:00
Martin
37e8772eab feat(type_de_champ_editor.explication): add a Attached::One to TypeDeChamp.explication, named notice_explicative [cf, cerfa wording] 2023-12-19 09:52:27 +01:00
Colin Darie
1a56fe620e feat(correction): make pending corrections blocking by feature flag only 2023-12-18 14:12:45 +01:00
Colin Darie
fa37c6c62b
fix(tags): escape user data tags for emails 2023-12-15 14:05:11 +01:00
Lisa Durand
569d4af6f7
Merge pull request #9706 from demarches-simplifiees/feat/9678
ETQ usager passant par un mandataire, je suis notifié des changements d'état de mon dossier par email
2023-12-14 16:57:07 +00:00
Eric Leroy-Terquem
e40d1107ac chore(conditional): add not_in_departement and not_in_region operators 2023-12-14 17:48:14 +01:00
Eric Leroy-Terquem
3db21b633c chore(conditional): update champs to use in_region operators 2023-12-14 17:48:13 +01:00
Eric Leroy-Terquem
c9676020b4 chore(conditional): add in_departement and in_region operators 2023-12-14 17:48:13 +01:00
Colin Darie
715c800788
Merge pull request #9821 from colinux/en-attente-block-instruction
ETQ instructeur je ne peux pas passer en instruction un dossier en attente de correction
2023-12-13 10:02:32 +00:00
Lisa Durand
f6f18e9c86 send email to tiers if notification by email is set 2023-12-12 22:35:11 +00:00
Kara Diaby
2ac9c13c4a Models 2023-12-12 22:35:11 +00:00
Kara Diaby
6ced107403 Migration 2023-12-12 22:35:11 +00:00
krichtof
246d53fa99
Merge pull request #9754 from demarches-simplifiees/9435-transfer-dossier
En tant que superadmin, je peux transférer un dossier d'un utilistateur à un autre
2023-12-12 14:44:39 +00:00
Christophe Robillard
7cfe0ad2a8 log when support team initiated dossier transfer 2023-12-12 15:25:39 +01:00
Colin Darie
c0771ad903
fix(dossier): passe en instruction with auto-archive even with pending correction 2023-12-12 15:05:46 +01:00
Colin Darie
c26b59722d
feat(instructeur): pending correction blocks passer en instruction
Closes #9731
2023-12-12 15:05:44 +01:00