Commit graph

1649 commits

Author SHA1 Message Date
Colin Darie
21a829ec1e fix(conditionel): error when using operator eq/not_eq with a multi dropdown 2023-04-26 09:58:00 +02:00
Lisa Durand
26ff82dbe4 Merge branch 'main' of github.com:betagouv/demarches-simplifiees.fr into user-dashboard/add-alert-WIP-last-dossier 2023-04-25 13:01:40 +02:00
Colin Darie
25956c5141
fix(geoarea): geometry must not be nil 2023-04-22 16:23:39 +02:00
simon lehericey
a202a57988 fix: defaut_groupe_instructeur_id for a cloned procedure 2023-04-21 12:20:50 +02:00
Lisa Durand
b52a2ca972 fix spec 2023-04-21 10:21:54 +02:00
krichtof
c2461f230c validate value for email champ 2023-04-20 18:27:02 +02:00
Paul Chavard
88f680a265
Merge pull request #8930 from tchak/fix-champ-commune-spaces
ETQ usager, je voudrai pouvoir remplir un code postal avec des espaces
2023-04-20 08:40:38 +00:00
Paul Chavard
586286cb08
Merge pull request #8916 from demarches-simplifiees/can-update-defaut-groupe-instructeur-2
feat(routage): permet de changer le groupe par défaut
2023-04-20 08:28:46 +00:00
Paul Chavard
4a2e499679 fix(commune): should accept postal codes with spaces 2023-04-20 10:16:48 +02:00
simon lehericey
e64ac79f05 tech(refactor): much nicer code, thx LeSim
root -> rooted_tree

depth_cach -> walk

smal refactor

comment

remove form for header_section

remove seen_at from header section

header_section: champ -> header_section

champ_subree: remove if not

remove root_depth use header_section_level_value instead

remove unused include

remove ChampTreeComponent

rename ChampsSubtreeComponent to SectionComponent

use TreeableConcern only in section component

remove fields_for_champ_component

champs -> tail

add split_section_champ helper

refactor(editable_champ::header_section): keep same interface everywhere

fix(repetition): add spec for SectionComponent on repetitions
2023-04-20 08:22:02 +02:00
Martin
88abefb370 tech(remaniement): isole la logique de rendu au champs_subtree_component 2023-04-20 08:22:02 +02:00
Martin
3b5d1bd55b tech(remaniement): extraction du passage d'une liste de champs a un simili arbre 2023-04-20 08:22:02 +02:00
Martin
b9faa26560 amelioration(editeur-de-champs): permet de choisir un niveau de titre (de 1 à 3) pour les champs de type Champs::HeaderSectionChamp. Gère les erreurs dans le cas ou un administrateur supprimerait un HeaderSection qui casserait l'ordre des titre [ex: titre 1,2,3. et l'admin supprime le titre 1 et il reste que 2,3]. 2023-04-20 08:22:02 +02:00
Colin Darie
9728493bda
Merge pull request #8924 from colinux/rubocop-upgrades
Tech: update rubocop, active nouveaux cops Rails/*
2023-04-19 13:37:10 +00:00
simon lehericey
79131cc294 fix spec 2023-04-19 13:52:42 +02:00
Colin Darie
7aba5ccc3e
chore(rubocop): fix Rails/DurationArithmetic 2023-04-19 12:55:13 +02:00
Paul Chavard
05cfb4055d fix(dossier): improuve dossier state display 2023-04-19 12:27:16 +02:00
Lisa Durand
c565ed415b change scope and alert location after UI modification 2023-04-18 12:03:10 +02:00
LeSim
c252748833
Merge pull request #8836 from demarches-simplifiees/improve-routing-rules-ux
feat(routing): nicer and safer ?
2023-04-17 08:23:15 +00:00
Paul Chavard
5abb6a8f12 chore(spec): remove memory store cache from tests 2023-04-13 13:10:23 +02:00
Paul Chavard
21b548d32b fix(dossier): delete all champs starting with children 2023-04-13 11:08:10 +02:00
simon lehericey
f6948cfd5e feat(routing): record first groupe as default_groupe_instructeur 2023-04-13 10:36:42 +02:00
Lisa Durand
bc3e67ab94 add alert on user dashboard to edit last editable dossier 2023-04-11 15:50:17 +02:00
Paul Chavard
def32a3615 chore(dossier): remove fallback from commune champ 2023-04-11 10:49:01 +02:00
Colin Darie
a413d2fa9c fix(admin): can delete an admin without published procedure 2023-04-07 16:10:10 +02:00
Paul Chavard
aaae3f461d feat(graphql): expose commune and departement information on address 2023-04-07 12:13:41 +02:00
Paul Chavard
ffb332159f fix(dossier): selecting blank option should not empty selection 2023-04-06 15:24:52 +02:00
Paul Chavard
b8f639721e
Merge pull request #8864 from colinux/fix-date-not-parseable
fix(date): ne crash pas lorsqu'un champ date n'as pas une date standard
2023-04-05 11:48:48 +00:00
Colin Darie
5e62aa7d21 fix(date): don't crash when date value is not parseable 2023-04-05 12:42:28 +02:00
Martin
6039539727 bug(administrateur.merge): la fusion de compte entre admin devrait aussi dissocier les services des procedures supprimées 2023-04-04 16:29:24 +02:00
Paul Chavard
2a48228552 fix(dossier): improuve commune champ rendering in pdf 2023-04-04 16:01:16 +02:00
Paul Chavard
12f0c03bac
Merge pull request #8847 from tchak/feat-improuve-dossier-remove
fix(dossier): an invited user can remove (leave) a dossier
2023-04-04 13:10:18 +00:00
simon lehericey
fd927fd116 fix(condition_check_on_children): give proper upper tdc to child condition check 2023-04-04 10:24:11 +02:00
Paul Chavard
0864666d0a fix(dossier): an invited user can remove (leave) a dossier 2023-04-03 20:10:44 +02:00
Paul Chavard
fce78bbf30 feat(dossier): multiselect without react 2023-04-03 16:54:50 +02:00
mfo
4336184fc8
Merge pull request #8833 from mfo/US/fix-valid-conditions-on-repetition
correctif(revision.validation-des-conditions): les conditions dans un bloc répétable ne remontenpt pas dans le composant ErrorsSummary
2023-03-31 15:03:12 +00:00
Martin
92f5e7663e bug(validation-des-conditions): les conditions dans un bloc repetable ne remontent pas dans la liste des erreurs de la page formulaire ou sur les changements du formulaire 2023-03-31 10:31:34 +02:00
simon lehericey
3cede55d41 feat(routing): add routing engine 2023-03-30 10:51:20 +02:00
simon lehericey
f6738be454 fix(spec): small refactor 2023-03-30 10:51:20 +02:00
Paul Chavard
01602101f1 spec(commune): improuve spec 2023-03-29 15:42:33 +02:00
Paul Chavard
00fc2f519f chore(spec): fix commune spec 2023-03-29 15:42:33 +02:00
Colin Darie
6ddbda34a2 fix(avis): don't list question_answer radios on empty question 2023-03-29 15:42:33 +02:00
Paul Chavard
76da68c3fb feat(commune): prefill by postal code and insee 2023-03-28 16:34:19 +02:00
Paul Chavard
6b8f7a0c73
Merge pull request #8795 from tchak/fix-flaky-test
fix(api_token): improuve flaky test
2023-03-22 11:01:25 +00:00
Paul Chavard
ee1df3f05f fix(dossier): fix rebasing submitted dossiers private champs type changes 2023-03-22 11:43:08 +01:00
Paul Chavard
48733a1d15 fix(api_token): improuve flaky test 2023-03-22 11:18:49 +01:00
Colin Darie
954652fcf5
fix(champ): may fix pg deadlocks: autosave already saves value at the same time 2023-03-20 14:32:14 +01:00
Paul Chavard
8ee13f1719 feat(api_token): add allowed_procedure_ids and write_access 2023-03-15 19:09:49 +01:00
Colin Darie
6a2a7fa2d0
Merge pull request #8753 from colinux/fix-auto-numering-in-repetition
Fix(dossier): ne numérote pas automatiquement les titres de section dans les répétitions
2023-03-09 15:41:57 +00:00
Colin Darie
f33d192142 fix(dossier): don't auto-number header sections in repetitions 2023-03-09 16:15:56 +01:00
Colin Darie
d6887f8aa4 fix(procedure): clone reset estimated_dossiers_count 2023-03-07 19:11:30 +01:00
Martin
401ead47f0 bug(dossier.export.pdf): l'export au format pdf d'un dossier ayant un champ de type repetition contenant un titre est bizarre 2023-03-07 07:00:28 +01:00
Colin Darie
8722ee028d
Merge pull request #8729 from colinux/fix-groupe-instructeur-wrongly-invalid
fix(groupe-instructeur): un groupe instructeur inactif est valide tant qu'il reste un groupe actif
2023-03-06 10:13:16 +00:00
Colin Darie
20d4a8153d
fix(groupe-instructeur): a closed groupe with an active groupe is a valid record 2023-03-02 16:34:18 +01:00
sebastiencarceles
00fa8dc895 transform value to also populate external id 2023-03-01 14:03:54 +01:00
sebastiencarceles
a7b21fcd7c let address champ be prefillable 2023-03-01 14:03:54 +01:00
krichtof
5840c8c7f9
Merge pull request #8711 from demarches-simplifiees/8708-demarches-publiques
Ne pas publier le descriptif de toutes les procedures sur datagouv
2023-03-01 10:09:47 +00:00
Christophe Robillard
9ff88db48c publish only some opendata procedures for datagouv
- only published or closed procedures
- only procedures with flag opendata
- only procedures with 4 or more dossiers
- only procedures without word "mail" in lien_site_web
- only procedures without word "intra" in lien_site_web
2023-02-28 17:02:08 +01:00
sebastiencarceles
f52554b5a3 review: update value with async fetch
1 - spec cover the job which fetches external data

2 - refactor the job with guard clauses

3 - delegate update operation to the champ itself

4 - annuaire education: override the update operation
to let the value be populated by the fetched data

5 - prefilling: don't fetch data synchronously
2023-02-28 14:53:08 +01:00
sebastiencarceles
447ea1b9a8 don't prefill with an incorrect value 2023-02-28 14:23:38 +01:00
sebastiencarceles
d7bfb9dc18 enrich value from education api 2023-02-28 14:23:38 +01:00
sebastiencarceles
71f1e785ab let annuaire education champ be prefillable 2023-02-28 13:26:35 +01:00
sebastiencarceles
a08bb1bddc fix epci: all possible values 2023-02-28 08:37:52 +01:00
sebastiencarceles
2ae2d99e93 fix communes: all possible values 2023-02-28 08:36:43 +01:00
Colin Darie
ae93d3927e refactor(dossier): extract sections logic in a concern 2023-02-27 17:29:22 +01:00
Colin Darie
1981bfc88e feat(tdc): strip libelle so header section titles always start with something 2023-02-27 17:29:22 +01:00
Colin Darie
d7880f7e58 feat(dossier/pdf): header sections numbering 2023-02-27 17:29:22 +01:00
Colin Darie
3de089d6c7 fix(conditional): dynamic title counters using css
Closes #8086
2023-02-27 17:29:22 +01:00
sebastiencarceles
35f4874b69 allow integers only 2023-02-27 15:16:40 +01:00
sebastiencarceles
13229158bd let dossier link champ be prefillable 2023-02-27 15:14:39 +01:00
sebastiencarceles
39545671f3 refacto: better error management 2023-02-27 14:35:11 +01:00
sebastiencarceles
33fa40eda2 don't clean the rna champ value
Cleaning the value is useless, when fetching the association,
as the value will be re-written by the dossier update, when the user
fills in the dossier.

Furthermore we need the value to persist when prefilling the champ.
2023-02-27 14:35:11 +01:00
Sébastien Carceles
7e55aca107 allow rna prefill 2023-02-27 14:35:11 +01:00
sebastiencarceles
7d65a34bc6 rna champ can fetch it's own association 2023-02-27 14:31:58 +01:00
sebastiencarceles
becf4da70a fix raison social fetch 2023-02-27 13:54:35 +01:00
sebastiencarceles
5dce401a14 review: add missing spec 2023-02-27 13:47:56 +01:00
sebastiencarceles
30eef3e128 review: detailled error message 2023-02-27 13:45:16 +01:00
Sébastien Carceles
2ad4e4c01f refacto: better error management 2023-02-27 13:45:16 +01:00
Sébastien Carceles
b6c74b0e83 fetch etablissement when editing the dossier 2023-02-27 13:45:16 +01:00
Sébastien Carceles
df2eaa9542 don't clean the siret champ value
Cleaning the value is useless, when fetching the etablissement,
as the value will be re-written by the dossier update, when the user
fills in the dossier.
2023-02-27 13:45:16 +01:00
Sébastien Carceles
3eb76d8a43 allow siret prefilling 2023-02-27 13:45:16 +01:00
Sébastien Carceles
5876dab096 siret champ can fetch it's own etablissement 2023-02-27 13:39:31 +01:00
sebastiencarceles
da6ce0f528 add example 2023-02-27 12:20:11 +01:00
sebastiencarceles
76c9d1ada5 add possible values 2023-02-27 11:53:25 +01:00
sebastiencarceles
40b7ea3af2 transform the input value to assignable attributes 2023-02-27 11:51:24 +01:00
sebastiencarceles
46091cb6b4 let communes champ be prefillable 2023-02-27 11:50:25 +01:00
Damien Le Thiec
67bbacbb05
Merge pull request #8513 from demarches-simplifiees/feature/prefill_repetible
Prefill repeatable
2023-02-27 09:58:53 +00:00
Paul Chavard
21f47dcb01 feat(procedure): include deleted dossiers in stats 2023-02-23 17:14:25 +01:00
Paul Chavard
eb3039aeca fix(demarche): exclude preview and deleted dossiers from stats 2023-02-23 16:38:40 +01:00
Damien Le Thiec
731cd56594 Merge branch 'main' into feature/prefill_repetible 2023-02-22 19:49:06 +01:00
Damien Le Thiec
ca29079c27 Fix rubocop 2023-02-22 19:40:52 +01:00
Damien Le Thiec
fbe4fe251a Fix format prefill repetition 2023-02-22 19:32:25 +01:00
Sébastien Carceles
28c6fd8cfc
Improve EPCI specs (#8634)
* fix nonsense spec

* refactor spec
2023-02-22 09:16:58 +00:00
Damien Le Thiec
cc2ec995d6 Fix tests 2023-02-21 17:32:24 +01:00
Damien Le Thiec
2052bc7840 Remove dependency type_de_champ -> procedure 2023-02-21 16:00:58 +01:00
Christophe Robillard
c5acd82e6e update dossiers count when passing to construction 2023-02-21 10:06:07 +01:00
Christophe Robillard
bd92291f8a cache dossiers count 2023-02-21 10:06:07 +01:00
Damien Le Thiec
d2452980fe Fix merge conflict spec 2023-02-16 20:17:05 +01:00
Damien Le Thiec
dce4c84f9a Merge branch 'main' into feature/prefill_repetible 2023-02-16 17:08:30 +01:00
Damien Le Thiec
6231c75e07 Fix tests conflicts 2023-02-16 16:58:55 +01:00