Commit graph

4999 commits

Author SHA1 Message Date
Colin Darie
010c9a0dcb feat(procedure): includes read duration of explication/non fillable champs
Long explications can significantly increase global fill duration,
so we can't ignore them.

Closes #7963
2022-10-31 12:17:16 +01:00
Colin Darie
7731c6ad64 feat(procedure): estimate fill duration takes account of libelle & description read time
Sometimes long description on types de champ
significantly increases global fill duration.

140 words per minute is a good estimate of attentive off-voice read time.
(This is independent of characters per word).

Closes #7963
2022-10-31 12:17:16 +01:00
Colin Darie
408f57d2d1 fix(rna): date_creation may be null
Closes #7975
2022-10-31 12:02:37 +01:00
Paul Chavard
2ed26e8699 fix(graphql): properly handle variables json parse errors 2022-10-31 11:32:30 +01:00
Paul Chavard
ac75afb77c fix(graphql): do not load brouillon or deleted linked dossier 2022-10-31 10:53:22 +01:00
Martin
5ced9fb431 chore(create_procedure_presentation): homogénéise l'interface sur les procédure présentation. pas d'objet 'build', sinon les export/filtres deviennent compliqués 2022-10-31 09:29:27 +01:00
Martin
50c43f4819 correct(export): la creation d'archive pour un groupe d'instructeur, avec des filtres differents et identique doit etre consistante 2022-10-31 09:29:27 +01:00
Martin
cf51be85e0 bug(export): la creation d'une archive avec un filtre different devrait etre effective, ce n'est pas le cas 2022-10-31 09:29:27 +01:00
simon lehericey
e7666e274f fix(spec/system): wait for merci page 2022-10-28 14:51:41 +02:00
simon lehericey
d859f1ed0a fix(spec/system): add delay when dealing with pj 2022-10-28 14:51:41 +02:00
simon lehericey
db0fcec019 conf(capybara): make JS_LOG work for head and headless 2022-10-28 14:51:41 +02:00
simon lehericey
091a522cbf conf(capybara): add MAKE_IT_SLOW option to reveal bugs 2022-10-28 14:51:41 +02:00
Colin Darie
9f2fa5ee1c fix(invitation): don't fail when dossier is hidden & user signed on another account
Suite de 45994ff567
Cf https://sentry.io/organizations/demarches-simplifiees/issues/3422144920/events/e1c83ea74dbc410ea22aa17ef29fb329/?project=1429550
2022-10-28 08:56:03 +02:00
Martin
c7c46c9dff design(page de configuration de procedure): passage de la grille au DSFR 2022-10-27 14:00:44 +02:00
simon lehericey
d1a8731bfc refactor(spec): faster service spec 2022-10-25 14:44:43 +02:00
simon lehericey
6af4fe624a refactor(service): explicit call to service job to avoid test side effect 2022-10-25 14:44:43 +02:00
simon lehericey
0a1ab733b6 refactor(spec): stabilize api_particulier_spec 2022-10-25 14:44:43 +02:00
simon lehericey
dbb5b7deec clean(js): remove unused autosave:reset 2022-10-25 14:44:43 +02:00
simon lehericey
e71b7eeee5 refactor(spec): wait for debounce and in flight promise 2022-10-25 14:44:43 +02:00
simon lehericey
00d1552060 clean(spec): remove useless autosave 2022-10-25 14:44:43 +02:00
simon lehericey
4ec13d652a core(capybara): disable_animation 2022-10-25 14:44:43 +02:00
simon lehericey
5d38345478 feat(system-spec): display js console error 2022-10-25 14:44:43 +02:00
simon lehericey
1e88d1a1d7 chore(capybara): use same size in headless or not 2022-10-24 22:13:16 +02:00
Kara Diaby
9529c6ba9c tests 2022-10-21 19:13:12 +02:00
Paul Chavard
f109220df3 fix(dossier): test for non breaking space replacement in champ label 2022-10-21 16:34:19 +02:00
Paul Chavard
f2e8dba8e4 fix(dossier): tag can contain non breaking space 2022-10-21 16:34:19 +02:00
Paul Chavard
d7c5dcf8bb fix(dossier): a tag can be preceded by a - 2022-10-21 16:06:32 +02:00
Paul Chavard
85581e72e9 refactor(turbo): simplify custom actions implementation now that turbo has support for it 2022-10-21 10:24:00 +02:00
Martin
2cd74d1010 amelioration(archives): positionne le fichier des reporting des erreurs en tête de l'arborescence 2022-10-20 15:14:57 +02:00
Colin Darie
45994ff567 fix(invitation): when dossier is not visible anymore
https://sentry.io/organizations/demarches-simplifiees/issues/3422144920/
2022-10-20 09:08:36 +02:00
simon lehericey
5fa5d46d8c fix(admin_merge): a case where 2 admins have the same service 2022-10-19 16:54:34 +02:00
simon lehericey
c6e7db3622 fix(export): bug when combining revision and conditional 2022-10-18 11:53:13 +02:00
simon lehericey
fbf089d60e refactor(dossier): rename check_mandatory_champs -> check_mandatory_and_visible_champs 2022-10-18 11:13:41 +02: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
Paul Chavard
c097f70543 fix(graphql): hide champs based on conditions 2022-10-14 11:33:25 +02:00
simon lehericey
d5d031e15d fix(export): do not export invisible champ 2022-10-14 10:30:27 +02:00
simon lehericey
de875632e6 refactor(spec): use match_array 2022-10-14 09:45:58 +02:00
simon lehericey
40a3fff593 perf(dossiers_controller): do not load pj template in update, -10ms 2022-10-13 22:36:56 +02:00
Eric Leroy-Terquem
2147a1865c add test 2022-10-13 19:49:32 +02:00
Martin
d09c47f5ce correctif(usager.fusion): leve une erreur quand on essaie de fusionner un compte sur lui même 2022-10-13 17:00:20 +02:00
Paul Chavard
d409b6f4ef feat(dossier): do not save dossier on submit 2022-10-13 14:44:46 +02:00
Paul Chavard
dd38fa4458 refactor(spec): add wait_for_autosave helper 2022-10-13 14:44:46 +02:00
Paul Chavard
03c714e86d test(flipper): cleanup flipper calls in tests 2022-10-12 14:14:30 +02:00
Paul Chavard
155c71b169 test(flipper): reset flipper flags before each test 2022-10-12 14:14:30 +02:00
Paul Chavard
36e9b27e8c chore(webdriver): update 2022-10-12 13:17:44 +02:00
Damien Le Thiec
29a97fac43
Merge branch 'main' into feature/add_rna_type_de_champs 2022-10-11 18:59:45 +02:00
simon lehericey
7672ad3fe9 fix(editor champ): do not raise on destroy replay 2022-10-11 16:27:49 +02:00
Damien Le Thiec
f30798eeec Merge branch 'feature/add_rna_type_de_champs' of https://github.com/betagouv/demarches-simplifiees.fr into feature/add_rna_type_de_champs 2022-10-11 16:18:35 +02:00
Damien Le Thiec
3acb0fc3cb Remove test external id 2022-10-11 16:18:15 +02:00
Damien Le Thiec
73f6063c87
Merge branch 'main' into feature/add_rna_type_de_champs 2022-10-11 15:36:46 +02:00
Colin Darie
073656342e fix(api_address): support Adresse BAN without postcode
Des adresses n'ont pas de code postal (dans certains TOM par exemple).
On fallback sur un string vide plutôt que nil pour limiter les effets de bord.
2022-10-11 12:25:12 +02:00
LeSim
1c3990083b
Merge branch 'main' into be_stupid_about_spec_system_logout 2022-10-11 12:08:41 +02:00
simon lehericey
d870d1d848 fix(spec): fix dubious procedure spec 2022-10-11 11:50:41 +02:00
Paul Chavard
a19bf050ef fix(iban): format iban after validation 2022-10-11 10:43:32 +02:00
Colin Darie
10917af523 style: signin button styled accordingly to UX 2022-10-11 09:50:21 +02:00
Colin Darie
5a50383a27 style: download links (notice & template) with expected DSFR design & details
Closes #7829
2022-10-11 09:50:21 +02:00
simon lehericey
7e03f0c825 refactor(dossier_preloader): add load_one api 2022-10-10 12:31:40 +02:00
simon lehericey
5920168077 refactor(dossier_preloader): preload piece_justificative_template 2022-10-10 12:31:40 +02:00
simon lehericey
1f95f68fcc refactor(dossier_preloader): assign champ.parent 2022-10-10 12:31:40 +02:00
simon lehericey
01f6e5a06b spec(dossier_preloader): add spec 2022-10-10 12:31:40 +02:00
Martin
c921e6e1ee fix(ProcedureExportService): downloadable_sorted_batch is scoped by export, no need to re-filter them via downloadablable_sorted_batch otherwise export for supprimes_recemment does not includes dossier.supprimes_recemment 2022-10-10 11:11:21 +02:00
Martin
1f8bf201a2 feat(procedure_serializer): just add an empty string for direction 2022-10-07 18:39:17 +02:00
Martin
6752da40a9 test(procedure.direction): can we drop this column ? 2022-10-07 18:39:17 +02:00
simon lehericey
fa133d03d0 spec(system): try to fix logout 2022-10-07 18:23:41 +02:00
simon lehericey
ceaf8ebbe7 fix: orphan tdc due to reset_draft 2022-10-07 17:44:30 +02:00
krichtof
44018a86de a procedure without zone is finally valid 2022-10-07 16:59:12 +02:00
Christophe Robillard
272c8cae09 cannot publish a procedure if no zones 2022-10-07 10:48:35 +02:00
Christophe Robillard
bdcb451d3c procedure publiee must have one zone at least 2022-10-07 10:48:35 +02:00
Christophe Robillard
4d2c37ffdf extract checkboxes zones to dedicated page 2022-10-07 10:48:35 +02:00
Christophe Robillard
94ca93e130 can choose multiple zones 2022-10-07 10:48:35 +02:00
simon lehericey
ba805a7436 fix: invite_mailer previews 2022-10-06 17:43:09 +02:00
simon lehericey
6cba489a54 fix: send_notifications preview 2022-10-06 17:43:09 +02:00
simon lehericey
878958b23b fix: invite_instructeur preview 2022-10-06 17:43:09 +02:00
simon lehericey
b9ef8c5001 fix: add_instructeur preview 2022-10-06 17:43:09 +02:00
simon lehericey
0e75f9960b fix: send_dossier_decision preview 2022-10-06 17:43:09 +02:00
simon lehericey
ab0392fb36 fix: avis_mailer preview 2022-10-06 17:43:09 +02:00
simon lehericey
6812b35a3d chore: remove dead code 2022-10-06 17:43:09 +02:00
simon lehericey
6841e80414 fix: administrateur_mailer preview 2022-10-06 17:43:09 +02:00
Martin
a256dfbaa0 fix(spec): missed a failed spec previously. sorry 2022-10-06 15:34:29 +02:00
mfo
8a3550cda4
Merge pull request #7860 from mfo/US/procedure-duree-up-to-manager
feat(procedure.max_duree_conservation_dossiers_dans_ds): make it more flexible
2022-10-06 11:36:50 +02:00
Martin
405a885160 feat(procedure.max_duree_conservation_dossiers_dans_ds): make it more flexible 2022-10-05 17:27:09 +02:00
Damien Le Thiec
abbbef1461 Fix tests 2022-10-05 13:07:39 +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
93e89c8968 Fix small bugs rna controller and add tests 2022-10-05 12:31:34 +02:00
Paul Chavard
432c4690b5 feat(tags): replace regexp based parser with a parser combinator 2022-10-05 11:25:37 +02:00
Eric Leroy-Terquem
ff2e9f0816 add feature flag 2022-10-05 09:21:08 +02:00
Eric Leroy-Terquem
acd874ccdf reorder inside categories 2022-10-05 09:21:08 +02:00
Damien Le Thiec
ecd54de854 Extend RNA adapter while keeping depreciated version 2022-10-04 19:59:39 +02:00
Damien Le Thiec
fa1f0fc240 Improve rna champ tests 2022-10-04 17:19:30 +02:00
Martin
91eeb4bf1c fix(spec.flacky): maybe flacky due to css animation not loved by capy 2022-10-04 15:20:22 +02:00
Martin
54a47fadae fix(sentry/3422144920): old email using TargetUserLink creates confusing errors 2022-10-04 11:41:32 +02:00
simon lehericey
6a5a82ce06 fix(instructeur dashboard): dossiers filtered on multiple states 2022-10-03 15:18:46 +02:00
Martin
35c556fc89 bug(multiple_drop_down_list): when their is a coma in label, comas is splitted as an item 2022-09-30 12:24:00 +02:00
Martin
aceb8996c1 feat(instructeur/procedure#show): enhance sort by notifications as planned by UX
Update app/javascript/controllers/checkbox_controller.ts

Co-authored-by: Paul Chavard <github@paul.chavard.net>
2022-09-30 10:29:51 +02:00
Christophe Robillard
da0738c661 unschedule export demarches opendata 2022-09-30 07:26:48 +02:00
simon lehericey
3f0fd506bd fix(system spec): increase timeout for log out 2022-09-29 17:31:38 +02:00
simon lehericey
7a9c5e8d19 refactor(ujs): turbo use an id for turbo_stream.update id not a class 2022-09-29 17:04:15 +02:00
Paul Chavard
b0aa777315 refactor(ujs): france_connect controller to use turbo 2022-09-29 16:51:54 +02:00
Paul Chavard
df47f4a7ab feat(graphql): new tokens should carry administrateur_id 2022-09-29 11:58:58 +02:00
DanteZ5
3826121751 switch from id to class 2022-09-28 17:19:17 +02:00
DanteZ5
7e29fe40f6 fix-ux(issue#7774) : indicateur menu email navbar 2022-09-28 17:19:17 +02:00
Colin Darie
da22c29688 feat(procedure): warn administrator that notice links are not shareable
Closes #7681
2022-09-28 17:01:25 +02:00
Colin Darie
6a943ad13f feat(champ_pj): warn administrators about ephemeral template links
Closes #7681
2022-09-28 17:01:25 +02:00
Martin
d7cce3c982 fix(instructeur/procedures#show): Procedure presentation filterable state field is in conflict with projected state field. quick fix, maybe will refactor both to align them 2022-09-28 15:28:51 +02:00
simon lehericey
6b35155bd8 fix condition_controller_spec 2022-09-28 10:06:32 +02:00
simon lehericey
5129fedac4 add a test 2022-09-28 10:06:32 +02:00
simon lehericey
7e1963865e compatibility from left 2022-09-28 10:06:31 +02:00
simon lehericey
43f926a1de to_s 2022-09-28 10:06:31 +02:00
simon lehericey
f98d1463a6 compatible_type 2022-09-28 10:06:31 +02:00
simon lehericey
cd2b08e39b options 2022-09-28 10:06:31 +02:00
simon lehericey
12b6a0d6d6 errors 2022-09-28 10:06:31 +02:00
simon lehericey
70022450cf type 2022-09-28 10:06:31 +02:00
Martin
17ed80b18a clean(Champs::Engagement): migrate to Champs::Checkbox, some for TypeDeChamp 2022-09-27 19:09:28 +02:00
Martin
ba6c5b4db7 feat(instructeur/procedure#index): enhance filter to support processed_at and state [plus en_instruction_at/since]
feat(filter): enable filter on dossiers.state, dossiers.processed_at(since), dossiers.en_instruction_at(since)
2022-09-27 17:19:54 +02:00
Colin Darie
e18dbb976f fix(graphql/serializer): PersonneMorale#date_creation may be null
Ça fix le passage du dossier dans un dossier "terminé" pour un dossier
dont un champ avec SIRET correspond à un établissement sans date de creation
connue.
2022-09-26 18:05:04 +02:00
Christophe Robillard
ddd5f6ece2 make label method name more explict 2022-09-26 16:58:53 +02:00
Christophe Robillard
f846393ec0 make populate_zones an after_party task 2022-09-26 16:58:53 +02:00
Christophe Robillard
240f1b249f makes the NA label for zone more explicit 2022-09-26 16:58:53 +02:00
Christophe Robillard
9a9330159c choose zone options with correct label
label of the zone is the one available when the procedure has been published (or at the creation if the procedure has not been published)
2022-09-26 16:58:53 +02:00
Christophe Robillard
62f19aba8a get all available zones at specific date 2022-09-26 16:58:53 +02:00
Christophe Robillard
9773977496 know if a zone exist at a specific date 2022-09-26 16:58:53 +02:00
Christophe Robillard
bc5ea8e906 update zones with new government 2022-09-26 16:58:53 +02:00
Christophe Robillard
59cce4203a get zone label at specific date 2022-09-26 16:58:53 +02:00
Christophe Robillard
a504e82021 add zone label 2022-09-26 16:58:53 +02:00
simon lehericey
bae60339a7 fix: wording 2022-09-26 10:21:15 +02:00
simon lehericey
f53e8608ae refactor(conditional): error message system 2022-09-26 10:21:15 +02:00
simon lehericey
fcb9b55bc4 feat(conditional): add include operator 2022-09-26 10:21:15 +02:00
Martin
d9432ccd3b fix(etablissement.as_degraded_mode): backfill missing data via a cron 2022-09-23 15:12:25 +02:00
Damien Le Thiec
bd0df2b60b Clean rna champ_row 2022-09-22 17:14:05 +02:00
Damien Le Thiec
542c5b518f Improve and connect RNA Adapter 2022-09-22 17:13:53 +02:00
Colin Darie
6a4a9c8e03 fix(cron/procedure-declarative): don't auto accept a dossier still in degraded mode 2022-09-22 16:26:14 +02:00
Colin Darie
9b929c86ea
Merge pull request #7760 from betagouv/dsfr-dossier-top-form
DSFR: convert dossier top form elements
2022-09-21 16:44:51 +02:00
Colin Darie
39322e6dff feat(instructeurs): warn about acceptation/reject unavailable due to incomplete etablissement 2022-09-21 16:00:59 +02:00
Colin Darie
fe2b3ec936 feat(instructeurs/dossier): explicit error about impossible transition due to incomplete etablissement 2022-09-21 16:00:59 +02:00
Colin Darie
e7de19b24d fix(dossier): avoir final state if etablissement is still in degraded mode
Maintenant qu'on autorise un dossier pour entreprise a être créé en mode "dégradé",
(avec établissement incomplet suite à API Entreprise/INSEE down…),
on empêche de l'accepter/refuser/classer sans suite tant qu'on a pas
vérifié son SIRET.

Fix https://sentry.io/organizations/demarches-simplifiees/issues/2839832517/?project=1429550&query=is%3Aunresolved
2022-09-21 16:00:59 +02:00
Damien Le Thiec
2791871c9a Clean exports tests 2022-09-21 15:56:01 +02:00
Colin Darie
fcb478eb53 refactor(fc_info): use Dsfr::Notice for france connect informations 2022-09-21 15:47:35 +02:00
Colin Darie
a5e1d8865b style(france_connect_account): convert notice about FC user to DSFR 2022-09-21 15:47:35 +02:00
Damien Le Thiec
d8afe81034 Setup RNA champ 2022-09-21 15:18:08 +02:00
Damien Le Thiec
606ac48964 Add new RNA Type de champ 2022-09-21 15:17:23 +02:00
Colin Darie
7e1c542807 fix: FranceConnect button was not visible anymore, convert to DSFR 2022-09-21 09:28:54 +02:00
Kara Diaby
3e43597440 tests 2022-09-19 13:34:43 +02:00
simon lehericey
9d2d19800d feat(champ siret): save etablissement in degraded mode if api down and allow submission 2022-09-19 12:12:05 +02:00
Martin
eae05b0a6f feat(export.xslx): add code commune to geo_area.label 2022-09-17 08:59:06 +02:00
Colin Darie
95a4e8a907
feat(api_entreprise): create etablissement with fallback when API is down
On créé l'établissement uniquement avec le SIRET, sans que ce soit bloquant
pour compléter le dossier. On demande à l'utilisateur de vérifier
lui-même la concordance du SIRET avec son entreprise.

Cf #7766
2022-09-16 10:43:59 +02:00
Colin Darie
c4f6305b3a fix(dossiers/api_down): specific error when API Entreprise is globally down. 2022-09-15 18:53:41 +02:00
Colin Darie
d1c06aa92e feat(api_entreprise): add service api_up?, connected to their status page 2022-09-15 18:46:53 +02:00
sebastiencarceles
90d795d1e0 fix: remove instructeur when admin is removed 2022-09-13 09:44:49 +02:00
sebastiencarceles
9aaef79a3d review: use salt to generate key 2022-09-13 07:47:30 +02:00
sebastiencarceles
f154bb56e6 confirm adding a new admin to a procedure
For clarity and a better understanding, use a dedicated controller
to allow the current admin to confirm adding an administrateur
to a procedure.
2022-09-13 07:45:07 +02:00
sebastiencarceles
4123709e72 build and render secured URL to invite admin
For clarity and a better understanding, use a dedicated controller to
build and render the confirmation URL to share in order to add a new
administrateur.
2022-09-13 07:45:07 +02:00
simon lehericey
c43bf2e5c9 fix(conditional): only parse user input as int if compared with a number 2022-09-09 11:28:32 +02:00
mfo
44f366d7f4
Merge branch 'main' into helpscout/1987597382 2022-09-08 12:03:01 +02:00
Paul Chavard
d6f5be622c feat(dossier): autosave en construction 2022-09-08 11:26:29 +02:00
Paul Chavard
d35ceb7214 fix(champs): finish EditableChampComponent refactor 2022-09-08 11:26:29 +02:00
Martin
cbe77dd2f6 bug(instructeurs/dossiers#telecharger_pjs): zipline does not play well with not available active storage attachments 2022-09-08 11:05:24 +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
sebastiencarceles
b643660017 'Choix parmi une liste' becomes 'Choix unique'
closes #7374
2022-09-06 11:26:30 +02:00
Martin
df3ef23f7e fix(spec): 1. visit new_user_session_path instead of navigating to it. 2. change way to submit search according to dsfr html. 3. avoid nav without aria label. 4. various lint fixes 2022-09-06 10:09:12 +02:00
Martin
73f94b9635 feat(header): switch to DSFR translate component and dropdown component 2022-09-06 10:09:12 +02:00
Martin
96cdae0dd5 feat(DSFR.header): switch to DSFR header 2022-09-06 10:09:12 +02:00
Martin
549eda6fe3 feat(DSFR.breadcrumb): switch to DSFR breadcrumb style since it is part of new service UI 2022-09-06 10:09:12 +02:00
Colin Darie
3c9b41e233 fix(manager/services): d'ont search in etablissement_adresse (this is not a schema field) 2022-09-06 09:23:52 +02:00
Colin Darie
23fbc9210e test(graphql): don't perform irrelevant & unmocked APIEntreprise::ServiceJob
They would require heavy mocks otherwise
2022-09-06 09:23:52 +02:00
Colin Darie
91c735a219 chore(service): SIRET is required 2022-09-06 09:23:52 +02:00
Colin Darie
9d59a50cd4 chore(manager/services): show etablissement adresse & geopoint 2022-09-06 09:23:52 +02:00
Colin Darie
67cbc61e1e chore(services): update etablissement adresse & geocode when siret changes 2022-09-06 09:23:52 +02:00
Colin Darie
8762acc0b5 chore(services): fetch etablissement adresse from API Entreprise 2022-09-06 09:23:52 +02:00
Colin Darie
7d39cc6b3e chore(schema): +services#etablissement_{infos,geopoint}
- `etablissement_infos` est une représentation partielle en jsonb
de ce qui est renvoyé par l'API Entreprise.
(On ne conserve que l'adresse pour le moment, utilisée pour le geocodage)
- `etablissement_geopoint` est le point (x,y) issu du géocodage de
l'établissement
2022-09-06 09:23:52 +02:00
Colin Darie
f8cf8aaab7 test(api_entreprise): add missing tests for API Entreprises privileges & adapter 2022-09-06 09:23:52 +02:00
Colin Darie
b75cff2fc3 refactor: API Entreprise instancified, more flexible for various input params
En fonction des resources, l'API est appelée :

- dans le contexte d'une Procedure ou non
- avec ou sans token injecté
- avec ou sans siret/siren
- avec ou sans user
2022-09-06 09:23:52 +02:00
Colin Darie
64ce2719ed feat(services): accept an optional SIRET
Closes #7359
2022-09-06 09:23:52 +02:00
Colin Darie
54181bd920 refactor(spec/services): dynamic procedure reference instead of hardcoded id 2022-09-06 09:23:52 +02:00
Colin Darie
54e7a713b4 refactor(spec): service_specs with be_valid syntax 2022-09-06 09:23:52 +02:00
Colin Darie
7f1764fa66 test(support): add contact-admin spec 2022-09-05 17:41:17 +02:00
Colin Darie
be965e4fdd fix(api_entreprise): don't fail with entreprise without date_creation 2022-09-05 15:52:06 +02:00
Colin Darie
4e3b063b87
feat(carte/export): list geo labels 2022-09-05 11:02:51 +02:00
simon lehericey
d612c39438 fix(admin procedure preview): redirect is procedure invalid 2022-09-05 10:18:33 +02:00
Kara Diaby
a52aeb6fdc tests 2022-09-02 16:23:27 +02:00
Martin
289b8f78b8 feat(Administrateur::Services#index): rework list of services 2022-08-31 14:56:00 +02:00
Martin
5f2b290407 feat(Procedure.clone): reset subject.duree_conservation_dossiers_dans_ds when procedure.duree_conservation_etendue_par_ds was extended. only extends it on demand otherwise admin could clone old procedure with higher duree_conservation_dossiers_dans_ds 2022-08-31 14:56:00 +02:00
Martin
51680b11c2 feat(Adminstrateur::Procedures#clone): redirect to home of procedure with special info regarding procedure presentation & service 2022-08-31 14:56:00 +02:00
Martin
6e31decc2d feat(Procedure.clone): stop cloning procedure service which is confusing for some administrateurs 2022-08-31 14:56:00 +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
Martin
c230db1ec4 bug(brouillon.edit.form): when their is a type de champs repetition having a child being mandatory. if the condition is not met, should be able to submit form 2022-08-24 15:18:05 +02:00
Martin
2f5528398f feat(manager#outdated_procedure): allow super admin to enable procedure_expires_when_termine_enabled for old procedure
revew(typo): various typo, tx christophe :-)

fix(spec): due to typo fixes
2022-08-24 13:10:48 +02:00
Martin
e35da17ce8 bug(instructeurs/archives#create): month should not be nil 2022-08-23 15:31:17 +02:00
Christophe Robillard
efbec80af8 update saml controller and views
because of using another gem (saml_idp)
2022-08-23 15:05:20 +02:00
Martin
dc524cf615 fix(spec): broken spec due to TDD and refacto on former code 2022-08-23 13:28:10 +02:00
Martin
711b2ee2e4 feat(ExportComponent): only render it when connected instructeur/administrateur is not from manager 2022-08-23 13:28:10 +02:00
Martin
25c0e91d87 feat(Administrateurs::GroupeInstructeur): ensure admin from super admin can not add an instructeur 2022-08-23 13:28:10 +02:00
Martin
d1544bc4ae feat(Administrateurs::ProcedureAdministrateurs): ensure admin from super admin can not add administrateur 2022-08-23 13:28:10 +02:00
Martin
d1297bc1f5 tech(rubocopify): ... just clean up ... 2022-08-23 13:28:10 +02:00
Martin
5e8210b8f8 feat(Administrateur::ExportsController#*): prevent SuperAdmin to ask/download export 2022-08-23 13:28:10 +02:00
Martin
bfd0f3379f feat(Instructeur::ArchivesController#*): prevent SuperAdmin to index/download archives 2022-08-23 13:28:10 +02:00
Martin
c2e0994e11 feat(Administrateur::ArchivesController#*): prevent SuperAdmin to index/download archives 2022-08-23 13:28:10 +02:00
simon lehericey
6b5f38ce74 spec 2022-08-11 14:03:04 +02:00
Kara Diaby
58f2f6bd9d Manager : permet au super admin de se retirer d'une démarche 2022-08-11 10:58:58 +02:00
simon lehericey
650c36e3e2 feat(conditional): add not eq operator 2022-08-10 11:59:09 +02:00
simon lehericey
00d0813292 ensure the mandatory star hint is always displayed 2022-08-09 10:29:41 +02:00
simon lehericey
898badb579 a champ is mandatory when visible with a mandatory tdc 2022-08-09 10:25:47 +02:00
simon lehericey
ec40836589 spec 2022-08-08 18:02:28 +02:00
simon lehericey
0b90c81c3a wrap existing spec in specific context 2022-08-08 18:02:28 +02:00
Christophe Robillard
e087582f57 Can get dossier vide if procedure is closed 2022-08-05 16:00:08 +02:00
Paul Chavard
a24885c2ee feat(champ): can condition on other option 2022-08-04 15:28:54 +02:00
Paul Chavard
bbca7344e5 fix(conditional): mandatory champs inside hidden repetition should not be validated 2022-08-04 14:48:40 +02:00
Paul Chavard
65e96002b1 refactor(spec): raise if old style factory is used 2022-08-04 12:10:32 +02:00
Paul Chavard
2d7803cd48 refactor(spec): use new procedure.types_de_champ factory 2022-08-04 12:10:32 +02:00
Paul Chavard
5e890cdb36 fix(factory): fix options handling on drop_down_list 2022-08-04 11:37:56 +02:00
Colin Darie
1601a18c34
test(combobox): increase wait time because component may be slow to render
Fix erreur type 'Unable to find css "li[role=\"option\"]'

Ce problème peut-être reproduit en local, en diminuant le wait à 0.001 ;
avec une plus grande valuer il disparaît.
2022-08-03 16:15:40 +02:00
Colin Darie
9ebcbbbd67
test(brouillon_spec): fix random errors due to db champs not yet updated 2022-08-03 16:15:40 +02:00
Colin Darie
e8b088c2c5
test(brouillon_spec): remove unecessary manual sleep, improve "brouillon" feedback testing 2022-08-03 16:15:39 +02:00
Colin Darie
81a9258c8a
test(brouillon_spec): use capybara wait matchers 2022-08-03 16:15:39 +02:00
Colin Darie
983815bfe8
test(brouillon_spec): fix frequent dossier_link error by using an existing dossier 2022-08-03 16:15:39 +02:00
Colin Darie
9e9b429100
test: fix frequent too many open files with webmock & capybara 2022-08-03 16:15:39 +02:00
Colin Darie
bc7cdb6b8e fix(contact): translate captcha honeypot label 2022-08-03 11:57:26 +02:00
Colin Darie
d53aba4d24 fix(dossier_transfer): require a valid email
Cf #7621
2022-08-03 11:44:54 +02:00
Colin Darie
a5d5f4307f fix(dossier_transfer): avoid all transfers without valid email
Cf #7621
2022-08-03 11:44:54 +02:00
Colin Darie
8dc966feb4 fix(dossier_transfer): requires an actual email
Closes #7621
2022-08-03 11:44:54 +02:00
Paul Chavard
f48048179c fix(conditional): enable conditional per procedure 2022-08-03 09:16:10 +02:00
Paul Chavard
a88390c6d3 refactor(types_de_champ): use new types_de_champ factory 2022-08-02 16:21:33 +02:00
Paul Chavard
21d47fa875 test(factory): spec new procedure.types_de_champ factory 2022-08-02 16:21:33 +02:00
Paul Chavard
ee9851091f test(factory): add a new way to build/create types_de_champ 2022-08-02 16:21:33 +02:00
Martin
7f1018c5b0 feat(Users::CommencerController#commencer): ensure to redirect to replaced_by_procedure when it exisits 2022-08-02 13:08:36 +02:00
Colin Darie
4284f14ad8 fix(services): can destroy with discarded procedures
Closes #7626
2022-08-02 11:45:16 +02:00
Kara Diaby
058d6baae6 tests 2022-07-29 11:17:22 +02:00
Paul Chavard
31d80d80bd fix(dossier): prevent users from removing mandatory fiels after submission 2022-07-28 11:19:47 +02:00
Colin Darie
197fa54ea4 fix(archives): purge stuck pending archives
Cf 0cb096b3d6440a4da05ca2902ed6fa72a93e6579
2022-07-27 15:26:59 +02:00
Colin Darie
f1957e51f8 fix(exports): purge stuck (pending) exports, not generated or failed
Avec l'autre PR, ça reproduit le comportement d'avant, c'est à dire
que quoiqu'il arrive un export est purgé :
- soit 16h après sa génération (on a 16h pour le télécharger)
- soit 12h après sa création, et qu'il est bloqué

Auparavant, tous les exports étaient purgés au bout de 3h quelle que soit
le statut.
2022-07-27 15:26:59 +02:00
Christophe Robillard
c8abe092c1 display alert message when no email is given for an invite
no exception is raised anymore in this case
2022-07-27 15:05:00 +02:00
Paul Chavard
8cba80116e fix(types_de_champ): fix exception on validation errors 2022-07-26 18:17:48 +02:00
Colin Darie
6845b2ed08 fix(export): fix PurgeStaledExportsJob regression with stale scope
cc #7547
2022-07-26 14:26:22 +02:00
simon lehericey
369141c7f7 Fix(procedure library): replace infinite list by a basic search 2022-07-26 12:38:05 +02:00
Paul Chavard
4276745338 fix(autosave): morph instead of replace to preserve controller instances 2022-07-26 11:15:10 +02:00
Colin Darie
11cd73b4ac feat(export/csv): list etablisement entreprise_etat_administratif 2022-07-25 10:58:02 +02:00
Colin Darie
22fed3d9de feat: show entreprise etat "en activité" | "fermé in entreprise summary
Closes #7505
2022-07-25 10:58:02 +02:00
Colin Darie
f05e9331a7 chore(entreprises): save etat_administratif from API 2022-07-25 10:58:02 +02:00
Colin Darie
e1d3d1f844 chore(schema): add entreprise_etat_administratif to etablissements 2022-07-25 10:58:02 +02:00
Martin
3e56fdd1d7 fix(export): when it takes more than 3 hours, exports are purge before being generated. make it possible to have an export that takes more than 3 hours and share this behaviour with kind of same class archive 2022-07-25 10:48:54 +02:00
simon lehericey
0d3856e84a fix(conditional): handle incorrect user input 2022-07-22 15:55:43 +02:00
Christophe Robillard
0e3e6eb62a add schedulable? class method to cron jobs 2022-07-21 21:54:15 +02:00
Christophe Robillard
bed6167010 use specific namespace for datagouv cron jobs 2022-07-21 21:54:15 +02:00
Christophe Robillard
b6c96301ef export and publish opendata demarches 2022-07-21 21:54:15 +02:00
Christophe Robillard
77a9a2ba12 can upload file to datagouv 2022-07-21 21:54:15 +02:00
Christophe Robillard
d294feabe3 gzip demarches publiques export 2022-07-21 21:27:27 +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
430365768a test(dossier.pdf): add a test case with piece_justificative inside repetition 2022-07-21 11:46:28 +02:00
simon lehericey
9c73bf1932 batch it 2022-07-20 15:48:16 +02:00
Martin
87af7f3261 feat(exports): implement admin export 2022-07-20 14:08:33 +02:00
simon lehericey
72583f846b champ value return nil if champ is hidden 2022-07-20 11:23:57 +02:00
simon lehericey
d1e3a0d29f spec 2022-07-20 11:23:57 +02:00
simon lehericey
2d26ba3507 fix: binary operator computes false by default 2022-07-19 10:11:24 +02:00
Martin
24c8dc5829 feat(procedure.duree_conservation_dossiers_dans_ds): decrease max duree_conservation_dossiers_dans_ds from 36 to 12 2022-07-18 14:08:53 +02:00
Colin Darie
dea1ce40a9 feat(dossier): allows user to edit identity from a brouillon dossier
Closes #7386
2022-07-18 09:57:19 +02:00
Colin Darie
d3232a28cd chore(api_entreprise): intercept token expiration for a more contextual frontend message
Auparavant le service échouait silencieusement et ne retournait rien,
ce qui dans les implémentations du front aboutissait au message que
l'établissement/l'entreprise n'a pas été trouvé.

Un type d'erreur spécifique sur l'expiration du token permet d'afficher
le message lié à un problème temporaire de récupération d'infos.
2022-07-18 09:57:19 +02:00
Paul Chavard
0adfd92213 refactor(condition): use standard revision change ops 2022-07-13 15:32:25 +02:00
simon lehericey
2cad0e11d3 display condition change between version 2022-07-13 15:10:23 +02:00
Paul Chavard
982e604b07 feat(dossier): test check conditions on en construction dossier 2022-07-12 18:32:03 +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
simon lehericey
53fe3c3dd8 fix: remove condition from annotations and children 2022-07-12 14:17:05 +02:00
simon lehericey
28a18e3912 spec: prove annotation is broken 2022-07-12 14:17:05 +02:00
Paul Chavard
a4681d8832 refactor(autosave): improuve events handling 2022-07-12 11:47:33 +02:00
Colin Darie
d805114a72 Revert "feat(revision): list updated placeholder option for generic type de champ"
This reverts commit fe0282e904.

Continue 2bd33ada45b036f73f3fc78150621092e0667693
2022-07-12 11:37:58 +02:00
Colin Darie
8c08d0295b Revert "feat(champ): customizable placeholders for text & textarea champs"
This reverts commit 9e26ee932e.

Finalement les champs génériques ne doivent pas avoir de placeholder
personnalisable, ce sera uniquement via la description.
2022-07-12 11:37:58 +02:00
simon lehericey
9bd1d97ed7 add feature flag 2022-07-12 10:44:40 +02:00
simon lehericey
0179a0a826 update conditions_controller 2022-07-12 10:44:40 +02:00
simon lehericey
2fee0ddfd4 feature: type_de_champ_controller 2022-07-12 10:44:40 +02:00
simon lehericey
e9cf41a00d add system spec 2022-07-12 10:44:40 +02:00
simon lehericey
3eadff9111 refactor spec 2022-07-12 10:44:40 +02:00
simon lehericey
4a198a4c09 spec 2022-07-12 10:16:22 +02:00
Paul Chavard
b8db929e62 fix(a11y): add id to drop_down_other 2022-07-12 08:43:17 +02:00
Colin Darie
fe0282e904
feat(revision): list updated placeholder option for generic type de champ 2022-07-11 17:16:20 +02:00
Colin Darie
93d18e2f53
fix: better email placeholder 2022-07-11 17:16:20 +02:00
Colin Darie
9e26ee932e
feat(champ): customizable placeholders for text & textarea champs
Closes #7429
2022-07-11 17:16:20 +02:00
Colin Darie
9768f4e1c9
style(champ): add placeholders for email, iban, phone, siret champs
Closes #7428
2022-07-11 17:16:19 +02:00
Martin
4c0aac8e0c fix(linked_dropdown/dropdown): for dropdown_list, drop blank option because rails add it when the field is required. kind of same behaviour for linked_dropdown_list [but requires to manage it on the front too] 2022-07-11 14:47:26 +02:00
Martin
7ad47f3eae bug(linked_dropdown/dropdown): dropdown_list : when mandatory, add an extra blank option. linked_dropdown_list : when mandatory and not filled, add an extra blank option to first list, then when select an element from the first list, another extra blank. 2022-07-11 14:47:26 +02:00
mfo
30c02491eb Update spec/controllers/targeted_user_links_controller_spec.rb
Co-authored-by: LeSim <mail@simon.lehericey.net>
2022-07-11 14:37:01 +02:00
Martin
9f6a8cfe33 bug(targeted_user_link): from invite when user is not created, user check fails 2022-07-11 14:37:01 +02:00
Paul Chavard
4d48055158 feat(tags): expose used_type_de_champ_tags 2022-07-07 23:23:17 +02:00
simon lehericey
0ffa23c259 move under types_de_champ_editor namespace 2022-07-07 11:18:47 +02:00
simon lehericey
d9c3dfa916 add component preview 2022-07-06 20:27:14 +02:00
simon lehericey
1131a5c83e condition component error 2022-07-06 20:27:14 +02:00
simon lehericey
30859774e4 condition component manage invalid target 2022-07-06 20:27:14 +02:00
simon lehericey
e2a236b73d add condition_component 2022-07-06 20:27:14 +02:00
Christophe Robillard
886f595350 [graphql] add dossiersCount field
visible only for admin
2022-07-06 17:59:03 +02:00
Christophe Robillard
7684e97494 export demarches publiques 2022-07-06 17:59:03 +02:00
Paul Chavard
fb37f8c5a8 fix(dossier): fix some reset draft changes edge cases 2022-07-06 16:52:12 +02:00
simon lehericey
1751ddf713 add condition controller 2022-07-06 16:35:23 +02:00
simon lehericey
42488419b5 add condition form model 2022-07-06 16:35:23 +02:00
Paul Chavard
9b45dcea3f feat(demarche): add possibility to reset draft revision 2022-07-06 14:18:01 +02:00
Paul Chavard
e9d0ccbdf9 task(dossier): remove orphan champs 2022-07-06 13:28:00 +02:00
Paul Chavard
adfc4f8cdd test(dossier): improuve destroy spec 2022-07-06 11:12:14 +02:00
simon lehericey
b715d1f495 Revert "Add id to term"
This reverts commit 87385d03fd.
2022-07-06 09:44:54 +02:00
simon lehericey
87385d03fd Add id to term 2022-07-05 14:47:49 +02:00
simon lehericey
d8454d9d47 remove text from managed_type_de_champ 2022-07-05 12:07:06 +02:00
simon lehericey
c631c5cd82 Logic add_empty_condition_to 2022-07-05 12:07:06 +02:00
simon lehericey
df7acf70c8 and empty_operator compute always true 2022-07-05 12:07:06 +02:00
simon lehericey
04965ac35a improve constant and empty to_s 2022-07-05 12:07:06 +02:00
simon lehericey
5ebaf59fdb parent_id -> parent_stable_id 2022-07-05 11:53:18 +02:00
Paul Chavard
9a6a8411d3 feat(export): add déparctement info to commune champ export 2022-07-04 16:30:16 +02:00
Martin
7fb85c97cb feat(Administrateur::ArchivesControllers): add archives #index and #create for admin 2022-07-04 14:18:46 +02:00
simon lehericey
73d5d5c919 fix spec by removing weird include 2022-07-02 16:42:32 +02:00
simon lehericey
f8c7003192 fix drop down other 2022-07-01 16:05:31 +02:00
Martin
4ec61e58ac feat(EditComponent): add max_file_size and content_types to upload buttons inspired by dsfr 2022-06-28 17:44:35 +02:00
Martin
ea71908850 fix(ChampEditor): add missing drop_down_other for type_de_champ.drop_down_list_with_other? 2022-06-27 17:19:10 +02:00
Christophe Robillard
6dd27ec7ed reset opendata to true when procedure is cloned by another admin 2022-06-23 14:11:09 +02:00
Christophe Robillard
ea59f5f260 add opendata boolean attribute for procedure
when opendata is set to true, it means that descriptive's procedure can be
public
when opendata is set to false, ti means that descriptive's can not be
public, because the procedure is only available for public servants, not
citizens.
2022-06-23 14:11:09 +02:00
Martin
ab4d4c83a8 feat(GroupeInstructeurs.closed): add closed option to GroupeInstructeur in order to prevent usagers to submit dossier 2022-06-20 16:32:06 +02:00
Martin
d57530e0f9 fix(spec): including Logic module broke spreadsheet architect 2022-06-20 15:12:43 +02:00
Martin
274b5eab2e feat(invite): wrap invitation with targeted_user_links 2022-06-17 16:44:37 +02:00
simon lehericey
0db27b8718 validate conditions on revision 2022-06-17 14:54:21 +02:00
simon lehericey
758933f6f9 tdc can have condition 2022-06-17 14:53:28 +02:00
simon lehericey
9f49e8c2ea add ensure_compatibility_from_left 2022-06-17 14:53:27 +02:00
simon lehericey
5ac3049033 add champ_value for dropdown 2022-06-17 14:53:27 +02:00
simon lehericey
809d991819 add champ_value 2022-06-17 14:53:27 +02:00
simon lehericey
daaa54b6f0 add n_ary operators 2022-06-17 14:53:27 +02:00
simon lehericey
698eff0a50 add equal operator 2022-06-17 14:53:27 +02:00
simon lehericey
ebe95b83fa add compatibility checks 2022-06-17 14:53:27 +02:00
simon lehericey
a98a6d6d1e add binary operators 2022-06-17 14:53:27 +02:00
simon lehericey
6ebfc505c4 add empty 2022-06-17 14:53:27 +02:00
simon lehericey
58da4805fa add constant 2022-06-17 14:53:27 +02:00
Paul Chavard
350ed3a11a feat(graphql): expose revision on demarche descriptor type 2022-06-17 12:33:35 +02:00
Paul Chavard
bbc44fe339 fix(export): no crash on empty repetitions 2022-06-17 11:33:48 +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
1573d20ee9 types_de_champ controller to use turbo 2022-06-17 11:04:09 +02:00
Paul Chavard
65bd996f2a refactor(types_de_champ_editor): remove old react editor 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
Martin
56f7133799 fix(procedure_presentation): can not present a 'virtual field' like depose_since
fix(data): add migration to remove fields depose_since from existing procedure presentation
2022-06-14 09:02:37 +02:00
Martin
8b487c847b fix(instructeurs/avis#revive): ArgumentError on AvisMailer.avis_invitation 2022-06-14 08:41:09 +02:00
Martin
ab04369c06 bug(DeclarativeProceduresJob.perform_now): fail all next procedure on one dossier failure 2022-06-10 14:59:36 +02:00
Kara Diaby
d58ecb3fcc Lors de la restauration d'une démarche supprimée, met sur les dossiers liés hidden_by_administration_at à nil 2022-06-10 12:33:47 +02:00
Paul Chavard
95a1ea1047 feat(procedure_presentation): add since date filters 2022-06-09 13:01:22 +01:00
Kara Diaby
1f2f148464 tests 2022-06-08 14:38:17 +02:00
Martin
7ed9d586cf fix(drop_down_list): ensure to skip disabled input when sending data via autosave 2022-06-02 09:06:37 +02:00
Martin
d39b3b09ed fix(webhook.perform): ensure to enqueue job with current state/updated_at for consistency reason 2022-06-01 15:54:55 +02:00
Pierre de La Morinerie
c1616adf8c app: remove procedure-estimated-fill-time feature-flag
The feature is now enabled for every procedure.

Ref #7338
2022-06-01 11:11:55 +02:00
Pierre de La Morinerie
2b90d7cc01 helpers: allow champ without persisted dossier
This fixes the /patron page. I also added an end-to-end test
to avoid breaking this page in the future.
2022-05-31 15:12:29 +02:00
Martin
cb890343ff feat(targeted_user_link): add targeted user link to wrap expert invitation in order to avoid access issue when the expert is connected with another account
feat(user.merge): ensure to merge user.targeted_user_link

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

feat(db/create_targeted_user_links): ensure not null with fk
2022-05-31 14:50:31 +02:00
Paul Chavard
c0a253078c fix(revision): fix clone démarches with repetitions 2022-05-31 13:28:56 +02:00
Paul Chavard
02675a104d fix(revision): fix tests to use new revison system 2022-05-31 08:58:53 +02:00
Paul Chavard
a36672239d refactor(revision): rename find_or_clone_type_de_champ 2022-05-31 08:58:53 +02:00
Martin
91f1fa4ffb bug(avis#instruction): fail when claimant had been destroyed during a merge 2022-05-30 15:42:36 +02:00
Kara Diaby
51b8d8f254 tests 2022-05-30 14:40:49 +02:00
Kara Diaby
00c6e152f5 tests 2022-05-26 12:45:05 +02:00
Pierre de La Morinerie
c738d7d07f js: display estimated duration in champ editor 2022-05-25 21:50:49 +02:00
Pierre de La Morinerie
736ef10bb3 spec: cleanup system/types_de_champ_spec.rb 2022-05-25 21:50:49 +02:00
Christophe Robillard
f14cd7b022 remove warning mail for dubious procedures 2022-05-25 14:44:53 +02:00
Christophe Robillard
fd98247b48 [manager] add list of dubious procedures 2022-05-25 14:44:53 +02:00
Pierre de La Morinerie
8936461d5b app: cache the duration estimate for published procedures 2022-05-25 10:39:18 +02:00
Pierre de La Morinerie
3e91a16895 app: display estimated fill duration on procedure description 2022-05-25 10:39:15 +02:00
Pierre de La Morinerie
4fcb85fd65 app: remove procedure_dossier_papertrail feature flag
The feature is now enabled for all procedures.
2022-05-24 17:32:11 +02:00
simon lehericey
8ce080bd3e updated_at pb 2022-05-24 15:38:50 +02:00
simon lehericey
db5d291acd complete spec and alternative implem 2022-05-24 15:38:50 +02:00
simon lehericey
4c19a127d6 add rebase specs 2022-05-24 15:38:50 +02:00
simon lehericey
b3ce124aa8 move rebase spec to its own file 2022-05-24 15:38:50 +02:00
Paul Chavard
0817731d6a refactor(dossier): rebase to use new revisions 2022-05-24 15:38:50 +02:00
Martin
51f0be1034 clean(deadcode): remove dead methods 2022-05-24 14:23:40 +02:00
Martin
d0599dd36b bug(root): test root 2022-05-24 14:23:40 +02:00
Martin
fbc4e1810b bug(expert/avis#instruction): raise when instructeur was merged 2022-05-24 14:23:40 +02:00
Paul Chavard
b635952b2f refactor(revision): types_de_champ for export 2022-05-23 18:36:18 +02:00
Paul Chavard
8c6feb1e1f feat(graphql): expose repasser_en_construction and repasser_en_instruction 2022-05-23 18:12:33 +02:00
Paul Chavard
99a8786dd5 fix(expert): expert should be allowed to delete messages 2022-05-20 15:47:48 +02:00
simon lehericey
c5a0fd4349 use children_of on validation repetition is not empty 2022-05-20 09:24:05 +02:00
Paul Chavard
24d47eb6d3 bug(revision): revising child type de champ create duplicate coordinate 2022-05-18 19:32:56 +02:00
simon lehericey
fd4d543b20 fix test 2022-05-18 15:18:17 +02:00
simon lehericey
633f0d1ce5 remove_repetition 2022-05-18 12:12:25 +02:00
simon lehericey
4d97f6aa8c types_de_champ_for_revision 2022-05-18 11:40:34 +02:00
Paul Chavard
cdd597db19 refactor(dossier): fix champ repetition factories 2022-05-18 11:24:14 +02:00
simon lehericey
0b90f4d30d is the order important ? 2022-05-18 10:11:31 +02:00
simon lehericey
ae86cdcf9e strange test 2022-05-18 10:11:31 +02:00
simon lehericey
5767c9b97e fix test 2022-05-18 10:11:31 +02:00
simon lehericey
7f23449f24 remove set_position 2022-05-18 10:11:31 +02:00
Paul Chavard
e33022ffc7 refactor(dossier): export to use turbo-poll 2022-05-17 16:08:47 +02:00
Paul Chavard
e9b02642c5 refactor(attachment): attachments controller to use turbo 2022-05-17 16:08:47 +02:00
Paul Chavard
7e1c793728 refactor(attachment): add Attachment::ShowComponent 2022-05-17 16:08:47 +02:00
Paul Chavard
d6384caf10 refactor(attachment): add Attachment::EditComponent 2022-05-17 16:08:47 +02:00
Martin
ad5c659f88 bug(instructeurs/dossiers#destroy): redirect on destroyed dossier -> NotFound 2022-05-17 11:42:10 +02:00
Paul Chavard
b6ea44f7e7 refactor(revision): remove type_de_champ#revision_id 2022-05-17 11:31:49 +02:00
Pierre de La Morinerie
0063b68689 mailers: add deposit receipt to initiated_mail
See #6146
2022-05-17 10:25:13 +02:00
Pierre de La Morinerie
e8b6731af8 spec: improve performances of notification_mailer_preview
The time to find the last dossier could be very long for large
procedures.
2022-05-17 10:25:13 +02:00
Paul Chavard
6909337500 fix(spec): try fix dossier expiration spec 2022-05-17 10:14:43 +02:00
simon lehericey
10fff77d69 spec: split cases 2022-05-16 16:51:49 +02:00
simon lehericey
a26a662df4 spec: move one level up 2022-05-16 16:51:49 +02:00
Paul Chavard
95bd13872b refactor(dossier): change state with turbo 2022-05-13 17:38:09 +02:00
Paul Chavard
d7678c4389 Revert "Merge pull request #7295 from tchak/rollback-attempt"
This reverts commit 24b37c230d, reversing
changes made to 08b90b9173.
2022-05-13 17:17:23 +02:00
Martin
da57a1dc9e fix(commencer#commencer): broken due to missing interpolated variable in i18n 2022-05-13 13:15:31 +02:00
Martin
0826baeba3 bug(commencer#commencer): raise when procedure does not have a service
fix(commencer#commencer): use alternate message when procedure does not have a service
2022-05-12 16:41:11 +02:00
Paul Chavard
4c26e34c79 Revert "Merge pull request #7270 from betagouv/remove_type_de_champ_v2"
This reverts commit 41b6f8f51b, reversing
changes made to 79d5946ab6.
2022-05-11 20:03:42 +02:00
Paul Chavard
08caa122dd Revert "Merge pull request #7280 from betagouv/move_type_de_champ_v2"
This reverts commit 08b90b9173, reversing
changes made to bc9a90bd08.
2022-05-11 20:03:33 +02:00
simon lehericey
df91fd1180 move_type_de_champ new style 2022-05-11 16:54:26 +02:00
simon lehericey
795513e093 spec: clean 2022-05-11 16:54:26 +02:00
simon lehericey
58c3b6b16a fix spec : datetime is present in more recent revision 2022-05-11 15:59:17 +02:00
simon lehericey
b6c2aa30f4 reorder the siblings after deletion 2022-05-11 15:59:17 +02:00
simon lehericey
6bf52b1f99 remove children shared between 2 revisions 2022-05-11 15:59:16 +02:00
simon lehericey
285f402483 spec: add test case 2022-05-11 15:59:16 +02:00
simon lehericey
b889d18217 spec: use children_of 2022-05-11 15:59:16 +02:00
Paul Chavard
142e6c032c cleanup(dossier): remove legacy menu 2022-05-11 11:01:25 +02:00
Paul Chavard
c9b8d43acd feat(autosave): use new autosave controller 2022-05-10 18:10:20 +02:00
Kara Diaby
7b73cb239a tests 2022-05-10 17:13:08 +02:00
Martin
bf277d4802 bug(export): expect dossiers_for_export not to include dossiers brouillon
fix(export.dossiers_for_export): add missing visible_by_administration
2022-05-10 16:09:12 +02:00
simon lehericey
d2509e7492 add procedure_revision children_of 2022-05-10 14:52:57 +02:00
Pierre de La Morinerie
41cf700c15 spec: fix avis/instruction view spec
Due to a faulty naming convention, the test was not executed.
2022-05-10 12:51:27 +02:00
Pierre de La Morinerie
1ad807ab6b spec: fix avis/index view spec
Due to a faulty naming convention, the test was not executed.
2022-05-10 12:51:06 +02:00
simon lehericey
cb4c35e797 spec: add special case for repetition_type_de_champ 2022-05-06 12:37:59 +02:00
simon lehericey
45f5cd3f4a spec: split procedure creation 2022-05-06 12:37:59 +02:00
simon lehericey
02fc25af23 spec: more procedure creation split 2022-05-06 11:23:10 +02:00
simon lehericey
6d38a44f1f spec: be clear we talk about draft 2022-05-06 11:23:10 +02:00
simon lehericey
c1d0256687 spec: split procedure creation 2022-05-06 11:23:10 +02:00
simon lehericey
becdd4a0ed spec: refactor 2022-05-06 11:23:10 +02:00
Paul Chavard
9e0b3b642f cleanup(sendinblue): remove sendinblue tracking 2022-05-06 11:14:44 +02:00
simon lehericey
2d42b7d57d spec: fix flaky 2022-05-06 10:34:40 +02:00
simon lehericey
d33e7c8cab spec: another isolated type_de_champ_repetition 2022-05-06 10:34:40 +02:00
simon lehericey
0fc71afc29 spec: fix private type de champ repetition 2022-05-06 10:34:40 +02:00
simon lehericey
64175db4dd link children tdc by ProcedureRevisionTypeDeChamp 2022-05-06 10:34:40 +02:00
Martin
8a6c3bbec0 fixup! bug(type_de_champ.repetition): on repetition, when there is a TypeDeChamp::Commune, champs for export should contain 2 entries [one with commune (postal_code), the other for commune (code_insee)]. 2022-05-06 09:38:45 +02:00
Martin
b1340586de bug(type_de_champ.repetition): on repetition, when there is a TypeDeChamp::Commune, champs for export should contain 2 entries [one with commune (postal_code), the other for commune (code_insee)]. 2022-05-06 09:38:45 +02:00
Kara Diaby
5f6f19871f tests 2022-05-06 09:04:15 +02:00
Martin
3737311390 feat(procedure.procedure_expires_when_termine_enabled): enable by default, allow contributor to choose the default settings of this flag using an env var during migration. ie: DEFAULT_PROCEDURE_EXPIRES_WHEN_TERMINE_ENABLED=true|false
feat(administrateurs/procedures#show): warning/alert when procedure_expires_when_termine_enabled is not true on current procedure

feat(administrateur/procedure#update): after an update redirect to procedure show: suggested by: https://ux.stackexchange.com/questions/55291/after-updating-form-should-redirect-back-to-form-itself-or-to-the-show-page-or-b and confirmed by Olivier

clean(Flipper.archive_zip_globale): no more in use, so remove all occurences

Update app/views/administrateurs/procedures/_suggest_expires_when_termine.html.haml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

Update app/views/administrateurs/procedures/_suggest_expires_when_termine.html.haml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

Update app/views/administrateurs/procedures/_suggest_expires_when_termine.html.haml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

Update spec/views/administrateurs/procedures/show.html.haml_spec.rb

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

fix(review): typo, why ena?, who knows

fix(env.example.optional): add missing DEFAULT_PROCEDURE_EXPIRES_WHEN_TERMINE_ENABLED
2022-05-05 13:07:11 +02:00
Pierre de La Morinerie
59d8479b85 dossiers: fix dossier_vide with drop_down_list
Previously a drop-down list with an ["Autre", "__other__"] value crashed
the PDF generation.
2022-05-04 16:34:37 +02:00
Pierre de La Morinerie
0e60830102 specs: add a test for dossier_vide.pdf.prawn 2022-05-04 16:34:37 +02:00
Paul Chavard
5f1fda1adc fix(graphql): stop crashing on dossiers with deleted users 2022-05-04 16:16:47 +02:00
Pierre de La Morinerie
7109e2d4e6 views: add a link to the deposit receipt 2022-05-04 16:09:52 +02:00
Pierre de La Morinerie
9bc5364ca2 app: add controller and view to generate a deposit receipt 2022-05-04 16:09:52 +02:00
Paul Chavard
4523c0590c fix(dossier): champs repetable in champs private 2022-05-04 15:57:25 +02:00
Paul Chavard
f8e3397f82 refactor(turbo): password complexity check use turbo 2022-05-04 14:11:43 +02:00
Paul Chavard
2db892d876 refactor(turbo): champ siret and dossier_link use turbo 2022-05-04 14:11:43 +02:00
Paul Chavard
1c2bd5543f refactor(turbo): champ carte use turbo 2022-05-04 14:11:43 +02:00
simon lehericey
35ae011b59 remove duplicate test case (see tdc_0) 2022-05-04 13:16:12 +02:00
simon lehericey
96eec7e566 refactor spec 2022-05-04 13:16:12 +02:00
simon lehericey
37e01ea399 re introduce revision_types_de_champ 2022-05-04 13:16:12 +02:00
Paul Chavard
2d1370d123 refactor(champ): simplify repetition champ 2022-05-03 16:14:54 +02:00
Paul Chavard
39ecc669b1 refactor(champ): simplify dossier link champ 2022-05-03 16:14:54 +02:00
Paul Chavard
3384b535c5 refactor(champ): simplify siret champ 2022-05-03 16:14:54 +02:00
simon lehericey
a2947751e2 add scope to query old admins 2022-05-03 12:14:02 +02:00
simon lehericey
ea361643be types_de_champ -> types_de_champs_public 2022-05-03 11:05:24 +02:00
Martin
2529773515 bug(commencer/test): with procedure without service nor organisation, it crashes 2022-04-28 14:19:55 +02:00
Paul Chavard
68ca9efba0 feat(dossier): use persisted dossier for preview 2022-04-28 12:20:41 +02:00
Martin
3c0e3f725d feat(administrateur/procedures#publication): show dubious to administrateur
Update app/views/administrateurs/procedures/publication.html.haml

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
2022-04-27 15:13:22 +02:00
Martin
be090a1bec feat(administrateur/procedure#create): allow admin to add a lien to the DPO, allow user to consult link to dpo. enhance spec on _procedure_footer.html
Update spec/views/users/_procedure_footer.html.haml_spec.rb

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2022-04-27 15:09:02 +02:00
Paul Chavard
d2ab8b5593 feat(message): replace message partial with MessageComponent 2022-04-26 14:54:58 +02:00
Paul Chavard
91879b89ce fix(commentaire): unified destroy commentaire 2022-04-26 14:54:58 +02:00
Paul Chavard
009c44cc20 refactor(avis): remove unused controller action 2022-04-26 14:54:58 +02:00
Paul Chavard
86df16ebda feat(view_components): add view_components 2022-04-26 14:54:58 +02:00
Martin
418d4ede17 test(commencer): test dossier_vide_pdf and dossier_vide_pdf_test 2022-04-25 15:00:48 +02:00
Paul Chavard
23b60c87e9 fix(procedure): cloned procedure should not have auto_archive_on
fix #7149
2022-04-22 10:48:31 +02:00
Martin
79c473ecf9 fix(ProcedureExportService.to_zip): prebatch dossiers only for to_csv,to_xlsx,to_ods. also add spec around to_zip 2022-04-22 05:13:51 +02:00
Martin
a3c5bf58ac bug(ProcedureExportService.to_zip): use in_batches on Array 2022-04-22 05:13:51 +02:00
Paul Chavard
cad63391db refactor(turbo): use turbo in procedure administrateurs controller 2022-04-21 19:41:27 +02:00
Paul Chavard
69d5713c19 fix(turbo): fix anonymous controller RSpec test
https://github.com/hotwired/hotwire-rails/issues/42
2022-04-21 19:41:27 +02:00
Paul Chavard
64c599e208 refactor(stimulus): initiate react components via stimulus 2022-04-20 14:08:47 +02:00
simon lehericey
9fd5219751 fix sort in procedure presentation 2022-04-15 12:21:39 +02:00
simon lehericey
23707d6033 ignore file not found error when cloning procedure 2022-04-14 13:46:16 +02:00
Paul Chavard
c671f25d34 fix(dossier): do not show unwanted closed procedure banners 2022-04-14 12:22:37 +02:00
Paul Chavard
83a8d87e95 i18n(procedure_presentation): translate fields 2022-04-14 11:38:01 +02:00
Paul Chavard
433c01b1e6 Revert "Merge pull request #7137 from betagouv/faster_pdf"
This reverts commit 9da44bd913, reversing
changes made to ebac71796c.
2022-04-12 19:22:07 +02:00
Paul Chavard
38a6b2db63 fix(graphql): fix AddressTypeType 2022-04-12 19:12:50 +02:00
Paul Chavard
d14e132305 feat(export): add zip format support 2022-04-12 14:54:54 +02:00
Paul Chavard
2832ea0286 refactor(export): return blob from to_* methods 2022-04-12 14:54:54 +02:00
Paul Chavard
561b83781e refactor(archive): remove dependencie on archive from ArchiveUploader 2022-04-12 14:54:54 +02:00
Paul Chavard
cf8c084a59 refactor: extract download_and_zip in to a shared service 2022-04-12 14:54:54 +02:00
Paul Chavard
b6bb9552e6 fix(graphql): detect custom champs in fragment definitions 2022-04-12 14:24:15 +02:00
simon lehericey
579578cf0c fix system spec 2022-04-12 12:05:08 +02:00
simon lehericey
4bbe2db668 only export safe pj 2022-04-12 12:05:08 +02:00
simon lehericey
4d3412daf5 batch it 2022-04-12 11:56:56 +02:00
simon lehericey
29dacb4686 remove env dependence in spec 2022-04-11 14:40:02 +02:00
simon lehericey
1dcfb2509f check nonce 2022-04-11 14:40:02 +02:00
simon lehericey
9938586d96 check state 2022-04-11 13:56:27 +02:00
Paul Chavard
90dd5bc9c5 fix(dossiers): dossier extend_conservation actually works 2022-04-08 13:40:28 +02:00
simon lehericey
4f73c6105f remove duplicate spec 2022-04-07 12:06:13 +02:00
simon lehericey
e2130cc2d3 add witness dossier 2022-04-07 12:06:13 +02:00
simon lehericey
951d964701 clean pj_service test 2022-04-07 12:06:13 +02:00
simon lehericey
34b0578d70 pj_and_path only take dossier id 2022-04-07 12:06:13 +02:00
simon lehericey
7ac1288905 pj_service take a dossier collection ! 2022-04-07 12:06:13 +02:00
simon lehericey
51b71aaa01 always call create_list_from_dossiers 2022-04-07 12:06:13 +02:00
Martin
9bac5c65ba feat(instructeurs/dossier#create_avis): only followed dossier receive notifications, so when an instructeur ask for an avis, he follows the dossier
Update app/controllers/concerns/create_avis_concern.rb

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>

Update spec/controllers/instructeurs/dossiers_controller_spec.rb

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
2022-04-07 09:05:23 +02:00
Martin
a9769ae277 fix(instructeur/dossiers#create_avis): as an instructeur, when I ask an avis, i hope to be notified when the expert give his avis 2022-04-07 09:05:23 +02:00
Paul Chavard
e82dc9c8b5 feat(exports): add ability to create exports with filters 2022-04-06 17:08:38 +02:00
Paul Chavard
be1a2f916d feat(exports): add statut and procedure_presentation to exports 2022-04-06 17:08:38 +02:00
Paul Chavard
ec3ed049ef refactor(procedure_presentation): expose filtered_sorted_ids method 2022-04-05 15:50:53 +02:00
simon lehericey
200e8680d5 add uniq index on attestation dossier_id 2022-04-05 15:43:21 +02:00
Martin
9e8807d12a feat(ArchiveUploader.upload_with_chunking_wrapper): retry once on error 2022-04-05 15:11:21 +02:00
Martin
c72ba43c55 feat(ArchiveUploader.upload_with_chunking_wrapper): expect to retry call to wrapper once 2022-04-05 15:11:21 +02:00
Martin
9484c4cdf4 fix(Dossier.processed_in_month): using PG between operator with a date does not play nicely when it is compared to DateTime in postgres. meaning given a Date as 2022/03/31, when compared with a DateTime in postgres, the casting of 2022/03/31 to Datetime becomes 2022/03/31 00:00. So we skiped all dossiers from last date in month 2022-04-05 13:54:36 +02:00
Martin
c1884f231c Revert "Merge pull request #7105 from betagouv/US/fix-dossier.processed_in_month"
This reverts commit a0e144b9a7, reversing
changes made to 49848bd150.
2022-04-05 13:39:37 +02:00
Martin
c07e0fc13e fix(Dossier.processed_in_month): ensure proper usage via method sig instead of defensive programming style 2022-04-05 12:14:07 +02:00
Martin
d6d9db9721 tech(Sorbet): prepare usage of sorbet to avoid defensive programming style [casting date to datetime] 2022-04-05 12:14:07 +02:00
Martin
ab777a790c fix(Dossier.processed_in_month): using PG between operator with a date does not play nicely when it is compared to DateTime in postgres. meaning given a Date as 2022/03/31, when compared with a DateTime in postgres, the casting of 2022/03/31 to Datetime becomes 2022/03/31 00:00. So we skiped all dossiers from last date in month 2022-04-05 12:14:07 +02:00
simon lehericey
1f98f75ccc remove unused method 2022-04-05 11:55:14 +02:00
simon lehericey
4c3b9979e9 fix test 2022-04-05 11:55:14 +02:00
Paul Chavard
0daae815d8 refactor(dossier): use by_statut 2022-04-05 09:42:23 +02:00
Paul Chavard
6da54936b7 refactor(procedure_presentation): use internal reference to instructeur 2022-04-05 09:42:23 +02:00
Paul Chavard
f71c89aa91 refactor(procedure): cleanup tests 2022-04-05 09:42:23 +02:00
Paul Chavard
706c648be8 refactor(procedure): remove unused code 2022-04-05 09:42:23 +02:00
simon lehericey
57f9e5bac3 always allow dossier pjs download (-9 queries) 2022-04-04 17:26:49 +02:00
Martin
1d99e21a27 tech(bug): identify 2022-04-04 16:28:25 +02:00
Kara Diaby
b2bcc34cfd tests 2022-03-31 15:48:18 +02:00
Martin
dbcf21a555 feat(archive): extract archive status management within job to simplify the main service as well as to isolate this part for a merge with exports csv/xslx [maybe?]
Update app/dashboards/archive_dashboard.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>
2022-03-31 13:35:49 +02:00
Martin
ab2caaa5f7 fix(ProcedureArchiveService.zip_root_folder): should take archive instance otherwise when we generate many archive for the same procedure, errors may occures 2022-03-30 16:29:54 +02:00
Martin
ab0a172488 feat(Archive.prepare_broader_reach): activate by default the archive button in the export dropdown. add a call to action to contact our support to enable the feature. increase estimated file size limit up to 100.gigabytes 2022-03-30 16:21:07 +02:00
Kara Diaby
71614d4ba3 tests 2022-03-29 12:30:52 +02:00
simon lehericey
7ecf20ce75 harden email validation 2022-03-24 13:00:54 +01:00
Paul Chavard
7aacb7565c fix(dossiers): mark as read dossier on update_annotations 2022-03-22 09:19:24 +01:00
Pierre de La Morinerie
31bd05f835 models: inverse the direction of the User role associations 2022-03-22 07:58:44 +01:00
Pierre de La Morinerie
56edba37bc specs: make the ProcedurePresentation#sorted_ids test more robust
Before the Dossiers were already created in the correct order, so the
sorting wasn't really tested.
2022-03-22 07:58:44 +01:00
Martin
98c1fb8abc feat(archive): drop old feature 2022-03-18 14:26:09 +01:00
Kara Diaby
4bfcf4f9d9 tests 2022-03-17 13:57:49 +01:00
Martin
5739150f15 feat(service/archive_uploader): add an archive uploader class to upload files thru a custom script which handle file encryption of massive file (bigger than 4Go)
Update doc/object-storange-and-data-encryption.md

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update app/services/archive_uploader.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update doc/object-storange-and-data-encryption.md

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

clean(doc): align document file name and document h1

clean(review): refactore based on various comments

clean(review): refactore based on various comments
2022-03-16 14:56:21 +01:00
Pierre de La Morinerie
1eebc2f1e1 specs: make test migrations safer
This will avoid strong_migrations to flag them as dangerous.
2022-03-16 10:30:25 +01:00
simon lehericey
0a3eb4a909 reinforce preview testing 2022-03-15 11:15:28 +01:00
Paul Chavard
ec2f2dc78c feat(graphql): expose more dossier informations 2022-03-14 15:58:02 +01:00
Paul Chavard
a50d07400e refactor(instructeur): cleanup destroy / restore routes 2022-03-11 14:06:34 +01:00
Paul Chavard
78bf1147d0 refactor(instructeur): use better fallback location 2022-03-11 13:55:36 +01:00
Paul Chavard
c60a8970f1 perf(dossier): memoize champ.sections on dossier 2022-03-11 00:15:53 +01:00
Paul Chavard
51d7fd6190 test(dossier): update spec to use visible_by_administration 2022-03-10 14:29:40 +01:00
Pierre de La Morinerie
3a16235868 db: Add a delete_orphans db helper 2022-03-08 14:47:43 +01:00
Paul Chavard
91caef0bfe fix(dossier): ensure submitted dossiers always have groupe instructeur 2022-03-02 16:57:12 +00:00
Pierre de La Morinerie
087e438eb6 models: delete AdministrateursInstructeur when destroying Instructeur
By default, `has_and_belongs_to_many` properly deletes the record in
the join table.

However, as the association is declared manually with a
`has_many / through`, it doesn't delete the joined record automatically.

As we also lack a foreign-key contraint on the join table, that means
a dangling record remains in the join table.

To fix this, let's declare it a proper `has_and_belongs_to_many`
association, which will let the join record be deleted automatically
on destroy.
2022-03-02 11:26:53 +01:00
Pierre de La Morinerie
e32c9a9f94 models: don't attempt to format invalid phone numbers
This is a defensive-programming measure, because formatting an
invalid phone number may truncate some leading numbers.
2022-03-02 09:57:03 +00:00
Pierre de La Morinerie
f35d18cd5c models: stop truncating DROM phone numbers
Fix #6996
2022-03-02 09:57:03 +00:00
Pierre de La Morinerie
5150e33212 models: ensure DROM phone numbers are valid
They were accepted before, because they were 'possible' – but now
they are explicitely considered as valid.
2022-03-02 09:57:03 +00:00
Pierre de La Morinerie
71e1b6c973 models: delete AdministrateursProcedure when destroying Administrateur
By default, `has_and_belongs_to_many` properly deletes the record in
the join table.

However, as the association is declared manually with a
`has_many / through`, it doesn't delete the joined record automatically.

As we also lack a foreign-key contraint on the join table, that means
a dangling record remains in the join table.

To fix this, let's declare it a proper `has_and_belongs_to_many`
association, which will let the join record be deleted automatically
on destroy.
2022-03-01 16:58:04 +01:00
mfo
4346775169
Merge branch 'main' into US/fix-avis 2022-02-28 15:08:25 +01:00
Martin
48612028f4 fix(avis_controller#*): missing ACL 2022-02-28 14:24:41 +01:00
Martin
b808b4db00 fix(relation): avoid double association between procedure/procedure_revision/dossier_submitted_message 2022-02-25 14:01:18 +01:00
Martin
85a588541b feat(dossier_submitted_message): add a new system to customize the standby page (/merci) after an user created his folder. this is a basic feature that will come with more options asap
wip(dossier_created_hook): add tile to administrateurs/procedure#show in order to crud dossier_created_hook

refactor(css.utilities): remove merge helpers.scss within utils.scss (same purpose). use scss each for spacer modifiers

refactor(dossiers/_merci.html): extract partial _merci so we can re-use it in preview of dossier_created_hook.

feat(wip): current progress
2022-02-25 14:01:18 +01:00
Pierre de La Morinerie
30d7cf634a tasks: restore older after_party tasks
Turns out deleting the tasks after 6 months only may not be enough for instances deploying
only once a year, for instance.

This reverts commit 77b65f3aa0.
2022-02-22 15:39:16 +01:00
Paul Chavard
2d396fcfb7 feat(dossier): rebase dossiers en construction and en instruction 2022-02-18 17:08:38 +01:00
Paul Chavard
50f095a5c6 test(user): fix unstable spec 2022-02-17 14:45:53 +01:00
Pierre de La Morinerie
c9f1a2b8ea mailer: improve notify_new_answer wording
And also insert the reply email address directly in the email body.
2022-02-16 18:35:30 +01:00
Pierre de La Morinerie
17c83b1ce2 mailer: fix notify_new_answer mailer preview 2022-02-16 18:26:45 +01:00
Pierre de La Morinerie
8786b60285 specs: fix flaky "dossier brouillon" spec
When filling all the champs of a dossier, we skip the "Address"
champ (because it would attempt to request a blocked URL).

But that means the "Yes/No" radio buttons may be under the sticky
bottom bar, and thus not register the click – which makes the test fail.

Fix the issue by manually scrolling to the radio buttons.
2022-02-15 15:04:49 +01:00
Jon
97feca6305 feat(ClamAV): add config to disable clamav usage 2022-02-15 09:15:47 +01:00
Martin
f84b69276e fix(expiration_banner.message): miss match when procedure was not expirable ; always showing expiration message 2022-02-11 15:49:37 +01:00
Paul Chavard
fac77d97ef task(attestation_template): reassign_redundant_attestation_templates 2022-02-11 11:30:24 +01:00
Paul Chavard
08030bcdb7 fix(attestation_template): handle attestation changes on procedures without revisions 2022-02-11 11:12:10 +01:00
Paul Chavard
76b1b85fa7 fix(attestation_template): add revision diff support 2022-02-11 08:45:32 +01:00
Paul Chavard
e269077c40 refactor(attestation_template): cleanup relationships 2022-02-11 08:45:32 +01:00
Paul Chavard
88e80e9e32
Merge pull request #6901 from adullact/feature/6859-jwt-token-expiration
[API Entreprise] Ajout du support des jetons JWT sans clé d'expiration
2022-02-10 11:48:39 +01:00
Kara Diaby
24ff41d2c0 tests 2022-02-09 14:43:36 +01:00
Paul Chavard
77e42dd0e2 Update spec/lib/tasks/deployment/20220112184331_revise_attestation_templates_spec.rb
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2022-02-08 16:22:59 +01:00
Paul Chavard
1fc7db2562 fix(attestation_template): fix migration task 2022-02-08 16:22:59 +01:00
Paul Chavard
12151acb99 Revert "Revert "feat(attestation): revise attestations""
This reverts commit 4e7733e571.
2022-02-08 16:22:59 +01:00
François Vantomme
b9d6c32af7 Test (Universign): mock API URL constant
Addressable::URI::InvalidURIError:
 Absolute URI missing hierarchical segment: 'http://'
2022-02-08 15:59:50 +01:00
Pierre de La Morinerie
847abca122 config: simplify mailer configuration again
Move everything to initializers, and replace the email settings
interceptor by a BalancerDeliveryMethod.

It has the advantage that it can be configured entirely from the
`config/environment.rb` file, without an extra file to look at.
2022-02-08 12:44:43 +01:00
François Vantomme
2bdf58cb79 style(rubocop): fix Layout/SpaceInsideBlockBraces offense 2022-02-08 12:35:08 +01:00
Paul Chavard
e87e8b2c26
Merge pull request #6899 from adullact/feature/6857-no-sandbox
ETQ développeur, je voudrais pouvoir influer sur l'option --no-sandbox du pilote Selenium Chrome lors des tests
2022-02-08 12:29:51 +01:00
Paul Chavard
dad17ec2f8
Merge pull request #6906 from adullact/fix/6864-franceconnect-application-name
[FranceConnect] les tests échouent quand la variable d'env APPLICATION_NAME a une autre valeur que celle par défaut
2022-02-08 11:53:16 +01:00
Paul Chavard
5b147e6d81
Merge pull request #6903 from adullact/fix/6861-feature-test-emails
Les feature tests touchant aux emails échouent de manière aléatoire
2022-02-08 11:52:28 +01:00
Paul Chavard
2773e065ed
Merge pull request #6907 from adullact/fix/6865-instructeur-random-test
Des tests sur les instructeurs échouent aléatoirement
2022-02-08 11:45:36 +01:00
Paul Chavard
0268511264 fix(manager): remove admins added for a day
fix #6855
2022-02-08 11:18:44 +01:00
François Vantomme
eba9a87123
refactor(API Entreprise): raise an error on blank token 2022-02-07 15:18:16 +01:00
François Vantomme
dacc1dca68
fix(groupe instructeur): avoid false-negative tests due to array ordering 2022-02-04 17:43:08 +01:00
François Vantomme
27ccf6bbdd
fix(france connect): stub application name in tests 2022-02-04 17:42:02 +01:00
François Vantomme
9ff7fa73e4
Fix (Expert): clear emails before feature tests
Failures:

  1) Inviting an expert: as an Instructeur I can invite an expert
     Failure/Error: invitation_email = open_email(expert.email.to_s)

Diff:
  -/procedures/2/avis/2/sign_up/email/expert1@expert.com
  +/procedures/1/avis/1/sign_up/email/expert1@expert.com
2022-02-04 17:40:03 +01:00
François Vantomme
2032eb8144
Test (Capybara): add no-sandbox option to headless chrome driver
Activating this option fix the 'DevToolsActivePort file doesn't exist'
error.

https://stackoverflow.com/questions/50642308/webdriverexception-unknown-error-devtoolsactiveport-file-doesnt-exist-while-t
2022-02-04 17:34:10 +01:00
Christophe Robillard
447612abdf fix a11y-8.9.1
no p tag when Champ text with no value
2022-02-02 19:03:40 +01:00
Pierre de La Morinerie
e6cf07b810 stats: move date formatting out of the Stat model
Before this commit, the monthly dossiers count was serialized into the
Stat record using human-formatted dates, as:

```ruby
s.dossiers_in_the_last_4_months = {
  "octobre 2021"=>409592,
  "novembre 2021"=>497823,
  "décembre 2021"=>38170,
  "janvier 2022"=>0
}
```

Turns out the ordering of keys in a serialized hash is not guaranteed.
After a round-trip to the database, the keys will be wrongly sorted.

Instead we want to save raw Date objects, which will preserve the
ordering. The date formatting can be applied at display-time by the
controller.

Fix #6848
2022-02-02 14:13:53 +01:00
Pierre de La Morinerie
ca58e60dc0 validators: rename revisions namespace to types_de_champ 2022-02-01 12:37:16 +01:00
Pierre de La Morinerie
d680602c84 models: validate private types_de_champ 2022-02-01 12:37:16 +01:00
Pierre de La Morinerie
e8e37cce15 models: refactor the types_de_champ validators
Context: we want to validate public and private types_de_champ
separately.

Before we validated the whole revision (and then validators themselves
enumerated all champs, public and private).

Now we validate the actual public types_de_champ, which will let us
validate separately the private types_de_champ.
2022-02-01 12:37:16 +01:00
Kara Diaby
842cc11689 tests 2022-01-31 10:03:44 +01:00
Kara Diaby
96556ca4b3 locales 2022-01-31 10:03:44 +01:00
Paul Chavard
4e7733e571 Revert "feat(attestation): revise attestations"
This reverts commit e413872530.
2022-01-25 18:26:34 +01:00
Kara Diaby
c9f402aa5b tests 2022-01-25 11:46:05 +01:00
Kara Diaby
2eb35065f8 fix dossier deletion mailers 2022-01-25 11:46:05 +01:00
Kara Diaby
7a49985e2c tests 2022-01-24 16:47:47 +01:00
Martin
47fa95a577 feat(MonAvisEmbedValidator): allow mon avis button without title 2022-01-24 15:56:29 +01:00
Paul Chavard
e413872530 feat(attestation): revise attestations 2022-01-19 18:00:37 +01:00
Paul Chavard
c1cb89bb44 fix(revision): changed? conflicts with rails method 2022-01-19 18:00:37 +01:00
Paul Chavard
3d8471e064 fix(dossier): do not send notification on expiration when dossier is already deleted 2022-01-19 17:52:53 +01:00
Paul Chavard
403e71b41f feat(procedure): only purge procedures without dossiers 2022-01-18 11:22:04 +01:00
Paul Chavard
7937e58caa fix(archives): only export dossiers in archive groupe_instructeurs
fix #6793
2022-01-18 11:16:20 +01:00
Paul Chavard
7e81b257b1 test(system): simplify select menu selector 2022-01-13 17:49:16 +01:00
Kara Diaby
bdcb0ca0e9 tests 2022-01-12 15:49:38 +01:00
Pierre de La Morinerie
062f52feb9 Fix ProcedureAdministrateursController#destroy
- The "no remove oneself" rule wasn't actually enforced
- `flash.error` is not a flash category
2022-01-07 15:39:58 +01:00
Pierre de La Morinerie
fb75a55b89 Add specs for Administrateurs::ProcedureAdministrateursController 2022-01-07 15:39:58 +01:00
Martin
383a92bcd9 fix(parallel_download_queue): tophoeus does not like raise from a request handler [crash straight to first frame] 2022-01-07 14:24:37 +01:00
Pierre de La Morinerie
2e1a3c32cb helpers: handle flash[:error]
Errors generated by the `invisible-catcha` gem are reported as
`flash[:error]` (which differs from Rail's usual `flash[:alert]`).

We probably shouldn't use flash[:error] in our own codebase; but we can
handle its use in third-party libraries.
2022-01-06 14:09:31 +01:00
Pierre de La Morinerie
68b112e00a helpers: don't crash on unknown flash level
Errors generated by the `invisible-catcha` gem are reported as
`flash[:error]` (which differs from Rail's usual `flash[:alert]`).

Avoid crashing when the flash level passed to this helper is not known.
2022-01-06 14:09:26 +01:00
Martin
f770ac4907 fix(users/champs/piece_justificative#update): ensure to bump dossier.last_champ_updated_at otherwise instructeurs are not notified when user update their piece_justificative 2022-01-06 13:09:57 +01:00
Martin
a9ffaf942e feat(attestation): can enable/disable attestation no matter the state of the procedure 2022-01-05 18:20:11 +01:00
Paul Chavard
cb66348916 a11y(select): cleanup select helpers in specs 2022-01-05 12:33:40 +01:00
Paul Chavard
968384952a a11y(capybara): enable use of aria-label in spec 2022-01-05 12:33:40 +01:00
Paul Chavard
28c1763701 a11y(champs): generalize describedby and update to use new Combo props 2022-01-05 12:33:40 +01:00
simon lehericey
00871cfe13 Fix ping controller in dev
For an unknown reason, ActiveRecord::Base.connected? does not work anymore in dev. It returns false negative.

This simple workaround can timeout. The caller has to monitor the response time.
2022-01-05 11:44:32 +01:00
Martin
3eb1c1a421 feat(async_backend): switch to typhoeus 2022-01-04 16:27:23 +01:00
Martin
ce1b189dcd refactor(DownloadManager): extract parallel download in dedicated class. move error management in custom class for procedure exports using the didicated class 2022-01-04 16:17:03 +01:00
Martin
2ed9cccba0 extract download all attachments in dedicated class using async/async-http for better perf 2022-01-04 16:17:03 +01:00
Martin
252eee272b feat(support#create): block with invisible captcha [avoid painful captcha] 2022-01-04 14:49:00 +01:00
Paul Chavard
7f0dde9be4 fix(a11y): add aria to tabs 2022-01-04 09:44:32 +01:00
Kara Diaby
1ca553e088 rename hidden_by_instructeur by hidden_by_administration 2022-01-03 11:51:25 +01:00
Kara Diaby
598cb09c6d tests 2021-12-29 17:37:58 +01:00
Martin
d0ab1711ff fix(profil_controller#update_email): ensure we are not merging same account
fix(profil_controller#update_email): changing email from current_user.email to current_user.email destroy current user. whoops ☠️'

Update config/locales/en.yml

Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>

Update config/locales/fr.yml

Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>

Update spec/controllers/users/profil_controller_spec.rb

Update config/locales/fr.yml

Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>

Update spec/controllers/users/profil_controller_spec.rb

fix(spec): broken due to typo
2021-12-29 13:36:47 +01:00
Paul Chavard
4e779f445d fix(instructeur): copy notifications settings from previous groupe instructeur
fix #6763
2021-12-23 13:55:25 +01:00
Christophe Robillard
f9609b0b0b fix zone specs
by reenabling task before the next spec is run
2021-12-23 09:58:31 +01:00
Pierre de La Morinerie
4efc1053f9 specs: make dossiers deletion specs more robust
It would fail when ran on some dates, like "21 Dec. 2021".
2021-12-21 17:20:32 +01:00
Christophe Robillard
822c754581 add namespace for populate_zones task 2021-12-16 17:20:06 +01:00
Christophe Robillard
882f92268c update zone to procedures 2021-12-16 17:20:06 +01:00
François Vantomme
14e0c68266 feat(api particulier): add MESRI field 2021-12-16 16:45:18 +01:00
François Vantomme
3d81d4b541 feat(api particulier): add MESRI adapter 2021-12-16 16:45:17 +01:00
François Vantomme
66a9109cd7 feat(api particulier): add MESRI support to sources service 2021-12-16 16:45:17 +01:00
Martin
b9d13df483 fix(spec): avoid flacky test. 15.days ago is not always on the previous month. eg: this spec failed on 16 of december, stats is still in december 2021-12-16 15:02:17 +01:00
Christophe Robillard
84c648eef0 manual task for populating zones 2021-12-15 19:37:32 +01:00
simon lehericey
c7f7855f14 avoid phishing 2021-12-15 13:51:49 +01:00
Pierre de La Morinerie
be1ddb59ec views: localize the stats partial
Also rename 'procédure' to 'démarches'.
2021-12-14 15:03:22 +01:00
Martin
5ad0ee8ca9 fix(spec.flacky): try to use extractor in a more conventional way to extract file content 2021-12-14 14:18:59 +01:00
maatinito
0a31c8bc79 refactor date_trunc queries using groupdate gem 2021-12-14 08:50:11 +01:00
Martin
f7bc387e44 feat(flipper): use new way of generating archive only on some procedure flipped with new actor :zip_using_binary 2021-12-13 16:37:04 +01:00
simon lehericey
f0b0e7fd9a Switch to usage of zip unix binary to create archive. Also use a dedicated queue for DelayedJob
use dedicated archives queue

As the used disk space will increase, we want a fined grain control

move zip logic in dedicated method

zip

wip

wip

fix(spec): pass spec in green

tech(improvements): avoid File.delete(folder), favor FileUtils.remove_entry_secure which is safer. Also wrap most of code that open file within blocks so it is cleaned when the block ends. Lastly use  attachement.download to avoid big memory pressure [download in chunk, write in chunk] otherwise big file [124>1GO] are loaded in memory. what if we run multiple jobs/download in parallel ?

fix(spec): try to retry with grace

clean(procedure_archive_service_spec.rb): better retry [avoid to rewrite on open file]

lint(things): everything
2021-12-13 16:37:04 +01:00
Martin
4b2e858a1a fix(mon_avis_embed_validator): enhance regexp 2021-12-13 14:49:40 +01:00
Paul Chavard
c7b1dc7f87 fix(bulk_messages): destroy bulk messages with procedures 2021-12-09 16:16:40 +01:00
Paul Chavard
b67818e425 feat(helpscout): add a tag to messages submited through contact form 2021-12-09 11:47:13 +01:00
Paul Chavard
efd8ddb99e fix(graphql): do not crash if attestation is nil 2021-12-08 13:12:42 +01:00
simon lehericey
3bdf6b63d9 small wording fixes 2021-12-08 11:19:30 +01:00
François Vantomme
6ab8ac0662 feat (api particulier): add Pole emploi field 2021-12-08 10:36:25 +01:00
François Vantomme
4cfc9f7d86 feat(api particulier): add Pole Emploi adapter 2021-12-08 10:36:11 +01:00
François Vantomme
a24cf18c9d feat (api particulier): add Pole Emploi support to sources service 2021-12-08 10:36:11 +01:00
François Vantomme
2110ef072c feat(api particulier): add DGFiP field 2021-12-07 11:03:05 +01:00
François Vantomme
08405226b7 style(api particulier): fix a typo in CNAF tests 2021-12-07 11:03:05 +01:00
François Vantomme
f0913edebd feat(api particulier): add DGFiP adapter 2021-12-07 11:03:05 +01:00
François Vantomme
97de7c197d feat(api particulier): add DGFIP support to sources service 2021-12-07 11:03:05 +01:00
Paul Chavard
5e0f8a5816 task(type_de_champ): migrate type_de_champ parent_id 2021-12-06 21:45:54 +01:00
Paul Chavard
2ba05bfb4f fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
Martin
a9413f9b12 feat(manager): add procedure_expires_when_termine_enabled to administrate 2021-12-06 07:49:59 +01:00
Martin
2778b42f1a feat(instructeurs/procedures#show): re-align tabs at the start of the container. re-align demander cell content verticaly 2021-12-06 07:20:01 +01:00
Martin
081d5094a9 feat(instructeurs/procedure/dossiers#extend_conservation): add extends duree conservation in action button list, also rewire this action for user [extend by procedure.duree_conservation_dans_ds by default] but force 1.month for instructeur. add new icon for standby based on https://en.wikipedia.org/wiki/Power_symbol 2021-12-06 07:20:01 +01:00
Martin
d8a8d1fdab feat(instructeur/dossier/header/_expiration_banner): split trads and add dedicated expiration banner for instructeur. also enhance wording to include duree conservation + extension_conservation
feat(expiration_banner): enhance wording of expiration

feat(dossiers/expiration_banner): enhance wording regarding expiration to include duree_conservation_dossiers_dans_ds + extension_conservation, also add spec on expiration_banner for instructeur
2021-12-06 07:05:17 +01:00
Martin
22531560d8 feat(tabs.expirants): re-order so it comes before deleted dossiers 2021-12-06 07:05:17 +01:00
Martin
8e9b15aef4 clean(expiration_banner): dedicated to user not shared 2021-12-06 07:05:17 +01:00
Martin
1bb868714c fix(spec/lint/review): lint and fix spec of previous commits, also fix based on tchak feedback 2021-12-06 07:05:17 +01:00
Martin
d87f8b57cc feat(instructeurs/procedures#show): add dossier experiant in procedure#show 2021-12-06 07:05:17 +01:00
Martin
2dfbc70d41 feat(instructeur#dossiers_count_summary): add counter for expirants. ignore brouillon 2021-12-06 07:05:17 +01:00
Martin
ce87878ff0 refactor(traitement.process_expired): move process expired to procedure 2021-12-03 16:32:36 +01:00
Christophe Robillard
9341c787a1 administrateur can add zone to procedure 2021-12-02 19:24:26 +01:00
Christophe Robillard
561f6fb274 add belongs_to zone for procedure 2021-12-02 19:23:05 +01:00
Christophe Robillard
5b8d872b6e populate zones 2021-12-02 19:16:11 +01:00
Pierre de La Morinerie
b7d17b0989 models: validate that no drop-downs are empty on publishing
Disallow publishing a procedure containing drop-downs with no selectable
values.
2021-12-02 09:00:37 +01:00
Pierre de La Morinerie
8b3d31980a specs: use Instructeur.bypass_email_login_token in the tests 2021-12-02 08:51:52 +01:00
Pierre de La Morinerie
ac07f05771 app: use Instructeur.bypass_email_login_token 2021-12-02 08:51:52 +01:00
Paul Chavard
46e2e34b89 fix(stats): remove super admin stats 2021-12-01 18:10:05 +01:00
François Vantomme
8fc14faa2a
fix(stat): enforce time travel when dealing with relative dates 2021-12-01 17:09:30 +01:00
Martin
725521c3a1 fix(expiration_banner): only show expirations info when flip is enabled
fix(lint): lint haml

fix(spec): enable flipper and allow procedure to receive flipper check when checking banner presence

fix(doc): add missing documentation on readme regarding system testing with a visual feedback

fix(typo): add missing accent

clean(PR): feedback from Tchak, better to wrap feature check for expirability by procedure within dossier.expirable? helper
2021-11-30 16:05:32 +01:00
Kara Diaby
9d9ac54689 tests 2021-11-30 14:27:58 +01:00
Pierre de La Morinerie
99c77046d2 models: improve error message for invalid champs
Avoid prepending the message with 'Draft revision '
2021-11-30 13:34:41 +01:00
Pierre de La Morinerie
b86dec8251 views: prevent procedure publication on validation error 2021-11-30 13:34:41 +01:00
Pierre de La Morinerie
9db62178d2 views: display revision errors on the procedure dashboard 2021-11-30 13:34:41 +01:00
Pierre de La Morinerie
52b0fbf9b7 models: validate repetitions on publishing 2021-11-30 13:34:41 +01:00
Pierre de La Morinerie
93124195fc specs: refactor procedure_creation_spec.rb
- Improve wording of specs description
- Remove publication test (duplicate of procedure_publish_spec.rb)
2021-11-30 13:34:41 +01:00
Pierre de La Morinerie
8e69a9883b specs: avoid using french in procedure_publish_spec.rb 2021-11-30 13:34:41 +01:00
simon lehericey
5a0fb6237f 😭 AASM does not support keyword arguments
https://github.com/aasm/aasm/issues/672
2021-11-30 09:42:45 +01:00
Pierre de La Morinerie
184a401182 app: rename new_administrateur to administrateurs 2021-11-30 08:49:38 +01:00
simon lehericey
a0c0520502 avoid redirection to a deleted user 2021-11-29 15:27:17 +01:00
Kara Diaby
c75a9b6271 tests 2021-11-29 14:30:17 +01:00
Martin
970e43efb8 feat(stats#index): update Stat model to also query DossierDeleted in stats computation
tech(question): discard_and_keep_track! ; are we really keeping track with default_scope { kept } ?

feat(stats): add DeletedDossier in Stat computations

Revert "tech(question): discard_and_keep_track! ; are we really keeping track with default_scope { kept } ?"

This reverts commit d1155b7eeaaf1a9f80189e59667e109541fcb089.

feat(stats): support deleted_dossiers for last_four_months_hash and cumulative_hash. extract sanitize query & merge hashes in methdos

clean(rubocop): lint with rubocop

Update db/migrate/20211126080118_add_index_to_deleted_at_to_deleted_dossiers.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

fix(rubocop): avoid uneeded allocation

fix(migration): add concurrent index with expected synthax

fix(brakeman): add ignore message since group date_trunc evaluation is used by only ourself
2021-11-26 13:29:40 +01:00
kara Diaby
06540c1b93 tests 2021-11-26 09:45:13 +01:00
Martin
fdf0f18fda fix(i18n): wrap text under i18n.t
i18n(france_connect/*): replace wording with i18n

fix(lint): i18n key issue

secu(views/france_connect/particulier/merge.html.haml): sanitize france_connect_email just in case

fix(brakeman): sanitize FCI.email_france_connect when used with html_safe via an I18n.t, also add exception to brakeman
2021-11-25 17:34:37 +01:00
Martin
8a315a4ac1 feat(UserMailer.france_connect_merge_confirmation): in addition to distance_of_time_in_words, add exact expiration date 2021-11-25 17:34:37 +01:00
Martin
21894d0a0a feat(france_connect/particulier#callback): in case the FC email exists as an DC account which is an instructor or and administrator, returns early to new_session_path so he can connect with this existing account 2021-11-25 17:34:36 +01:00
Martin
ff073f8884 Add confirmation by email when merging DC/FC accounts
feat(fci.confirmation_code): add confirmation code to france_connect_informations

feat(user_mailer.france_connect_confirmation_code): add confirmation by email mail method/preview/spec, pointing to merge_mail_with_existing_account (reuse existing method)

feat(mail_merge): mail merge

feat(merge.cannot_use_france_connect): same behaviour as callback

clean(fci.confirmation_code): use same token for mail validation as merge

feat(resend_france_connect/particulier/merge_confirmation): resend email with link. also enhance some trads, cleanup halfy finished refacto

clean(tech): finalize story by plugging merge_with_new_account to email validation

fix(deadspec): was removed

fix(spec): broken after last refactoring

lint(rubocop): space before parenthesis

lint(haml-lint): yoohoooo space before =

fix(lint): scss now :D

Update app/assets/stylesheets/buttons.scss

cleanup

feat(france_connect): re-add confirm by email, with an option for confirmation by email instead of only confirmation by email

fixup! Add confirmation by email when merging DC/FC accounts

fix(lint): haml_spec failure
2021-11-25 17:34:34 +01:00
Paul Chavard
d847775c68 feat(traitements): add depose_at to dossiers 2021-11-25 12:57:55 +03:00
Pierre de La Morinerie
e5f5440663 models: explicitely save procedure's new revision
Deep-cloned objects have all their relationships stale. Thus, for a
newly deep-cloned revision, `revision.types_de_champs` returns `[]`,
even when it actually has associated types de champ.

This causes consecutive champs creations and re-ordering to fail in
subtle ways, like:

```
procedure.draft_revision.add_type_de_champ(…)
procedure.publish_revision!
procedure.draft_revision.add_type_de_champ(…)
procedure.draft_revision.move_type_de_champ(…) # this will fail
```

As `publish_revision!` created a new stale revision, moving the type
de champ fails because not all existing champs are found until the
object is refreshed.

We don't hit this path in production, because usually only a single
operation is made in a request.

To fix this, save the new revision before associating it as the draft
procedure.

(Another option would be to `reload` the revision after creation, but
this seems better contained and matches the name of the method.)
2021-11-25 08:49:17 +01:00
mfo
e7d9d047fe
Merge branch 'main' into 6649-etq-usager-instructeur-rendre-la-suppression-plus-visible 2021-11-24 14:07:32 +01:00
Paul Chavard
758e7d68e6 fix(graphql): fix and improuve query parsing for logs 2021-11-24 13:23:05 +03:00
simon lehericey
4efd15377c spec 2021-11-23 14:17:59 +01:00
Pierre de La Morinerie
997c197980 specs: simplify the syntax of some factories 2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
2203a7762f specs: create dossier revision and individual declaratively 2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
f2233300b6 specs: assign the default groupe instructeur declaratively 2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
0e809ac1a2 specs: build the default groupe instructeur before the create callback
This allows for better ergonomics, by having the default groupe
instructeur available even before the procedure is saved.
2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
032e3e2cb1 specs: create the procedure administrateur declaratively
It seems better to create associations in an declarative fashion, rather
than using imperative code. This also makes the attribute compatible
with build_stubbed.
2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
970c3e4b2b specs: avoid executing business logic in Procedure factory
Calling business logic in a factory is a code-smell, because it
usually requires the object to be saved into database, and may have
unintended consequences when the business logic is changed.

Also, this allows to just build a published procedure, without saving it
to the database.
2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
d8fbcfe2e2 specs: explicitely pass the dossier to champs factories
Otherwise the factory will not know in avance which procedure this
champs belongs to.
2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
ef2d9a3e86 specs: fix :champ_siret factory not using the procedure
Unlike all other champs factories, :champ_siret would attempt to build
a champ with a `nil` procedure (instead of using the dossier's one).
2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
774ef00f8e specs: improve dossier_spec#build_default_individual 2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
8d89ae366b specs: minor cleanups 2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
09ca70eef0 specs: improve search controller specs 2021-11-23 08:07:07 +01:00
Martin
b6adf5fc72 feat(dossiers/show): enhance header with expirations message/banner. also ensure consistent design between dossier states
fix(spec): broken due to last refactoring

spec(dossier.extend_conservation): add system spec

lint(ruby): still not yet ready for auto lint in IDE...
2021-11-23 05:50:25 +01:00
Martin
8368d62ed3 fix(spec): broken due to new view var 2021-11-19 15:53:15 +01:00
Martin
3d1533dee9 feat(users/dossiers?statut=dossiers-expirant): add dossiers-expirant tab 2021-11-19 15:14:39 +01:00
Martin
eecc0c38b6 lint(rubocop): come on, maybe i will find the inspiration to setup it up in my ide 2021-11-19 14:36:21 +01:00
Martin
608a85148f feat(Dossier.close_to_expiration): add method to find any kind of dossier close to expiration [reuse previous scopes], add missing spec to termine_close_to_expiration, complement spec for each kind of expiration scope with general close_to_expiration spec 2021-11-19 14:28:54 +01:00
mfo
82b23b92c0
Merge branch 'main' into 6624/etq-instructeur-je-souhaite-supprimer-des-messages-envoyes-par-erreur 2021-11-17 05:41:56 +01:00
Paul Chavard
e74d599042 feat(procedure): remove duree_conservation_dossiers_hors_ds 2021-11-16 19:55:56 +03:00
mfo
1d174df2ec
Merge branch 'main' into 6624/etq-instructeur-je-souhaite-supprimer-des-messages-envoyes-par-erreur 2021-11-16 16:37:15 +01:00
Martin
f0950b592b clean(CommentaireService): extract soft delete within controller. returning an instance with an error[:base] is not persisted with validation : avoid poluting stuff 2021-11-16 16:13:11 +01:00
Martin
8bbd77f89f refactor(mail.delay): use simplier implementation using after_action to prevent email delivery with delay 2021-11-16 15:12:05 +01:00
Martin
e48b6e0c1f tech(lint): rubocop 2021-11-16 14:30:06 +01:00
Martin
0aecc301c9 refactor(Commentarie.soft_delete): use discard 2021-11-16 14:28:38 +01:00
Martin
988fe34d0a fix(spec): add missing double 2021-11-16 03:42:31 +01:00
simon lehericey
e3c1e19424 include hidden dossier in merge 2021-11-15 23:14:41 +01:00
Martin
c68fa2d7f3 feat(Commentaire.notify_user): wait 5 minutes before sending email to user when instructor write a commentaire. leaving some space for instructor to destroy his message 2021-11-15 15:38:57 +01:00
Martin
f8783c9f00 fix(spec): stop doing time comparisson, ensure it is not more nil 2021-11-15 15:23:57 +01:00
Martin
a74ca8ad39 fix(spec): scope out time as reference for time comparission, hope not a matter of precision 2021-11-15 14:55:35 +01:00
Martin
f1293814a3 fix(spec): apparently we do store time with zone 2021-11-15 14:35:43 +01:00
Martin
4042d51d1a tech(lint): rubocopify 2021-11-15 14:17:57 +01:00
Martin
d4c74b5621 feat(rc.1): refine with better translations, better design 2021-11-15 14:15:05 +01:00
Martin
3b78a9d81a feat(rc): first stable 2021-11-15 13:53:32 +01:00
Martin
8b931a57d4 feat(CommentairesController#destroy): implement destroy endpoint using CommentaireService 2021-11-15 13:18:10 +01:00
Martin
c7bfd1af04 feat(CommentaireService.soft_delete): ensure it purge piece_jointe later 2021-11-15 12:59:38 +01:00
Martin
9a8ec1087c feat(commentaire.soft_delete): wrap deletion behaviour in service 2021-11-15 12:43:53 +01:00
Martin
5b72bdec7e fix(Commentaire.sent_by?): &.email compared to nil could sent by true when nil==nil, avoid this one 2021-11-15 12:01:56 +01:00
Martin
b03dc6ad5d wip(dossiers/messages/_message): poc destroy button with expected ACL support 2021-11-15 11:30:41 +01:00
Paul Chavard
da47f491b3 fix(dossier): nullify close to expiration notice timestamps when changing state 2021-11-11 12:52:58 +01:00
Paul Chavard
71939c650b fix(export): remove wrong columns from repetition spreadsheets
This fix prevent repetition children types de champ from being pulled from cloned procedures. stable_id is stable across revisions but also across cloned procedures.
2021-11-10 20:45:32 +01:00
Pierre de La Morinerie
9dd7806ae5 specs: add two missing fields to the brouillon spec 2021-11-09 15:22:20 +01:00
Pierre de La Morinerie
5dbb9f9e3c specs: fix flaky "dossier brouillon" spec
The previous fix (scrolling to the viewport) didn't actually worked,
because the code tried to scroll the checkbox itself.
2021-11-09 15:21:59 +01:00
kara Diaby
1b27ab5aff tests 2021-11-05 13:32:21 +01:00
simon lehericey
d1162d7493 add e2e spec 2021-11-04 16:10:09 +01:00
simon lehericey
9041e201e8 one merge at a time 2021-11-04 16:10:09 +01:00
simon lehericey
b160086cc5 update update_email to allow merge 2021-11-04 16:10:09 +01:00
simon lehericey
652b8367be accept or refuse merge 2021-11-04 16:10:09 +01:00
Paul Chavard
ba0211ba52 feat(champ): ask for departement before asking for commune 2021-11-04 11:55:25 +01:00
Paul Chavard
122cdacbc2 fix(avis): destroy avis for discarded en_construction dossiers 2021-11-04 10:12:44 +01:00
Pierre de La Morinerie
0a541d678d graphql_controller_spec: create several dossiers only when required
Creating dossiers is faster than creating a procedure, but still slow.
We can create a single dossier in the default case, and only create
several others when the example requires it.

Speeds up this spec from 0m 57s to 0m 49s.
2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
f0e045ad25 graphql_controller_spec: create all types de champs only when required
Creating a procedure with all available types de champ is slow. We can
create a simpler procedure in the default case, and only create all
types de champs when the example requires it.

Speeds up this spec from 1m 55s to 0m 57s.
2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
e02251c0e5 graphql_controller_spec: populate all champs only when required
Creating a dossier with available champs populated is slow. We can
create simpler dossiers in the default case, and only populate all
champs when the example requires it.

Speeds up this spec from 2mn 20s to 1m 55s.
2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
bb1bc9140d graphql_controller_spec: remove unused line 2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
04159056af specs: clarify spec by replacing some context by describe 2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
b06183d7bf specs: rename Dossier's with_all_champs to with_populated_champs
This better reflects what the trait is used for, and disambiguate it
from the similarly named trait in the Procedure factory.
2021-11-03 19:38:01 +01:00
Paul Chavard
f6b8689a97 fix(revisions): fix repetitions export with revisions 2021-11-03 18:20:48 +01:00
Paul Chavard
da49a6447f refactor(repetition): optimize and add a transaction around repetition add row 2021-10-28 14:54:33 +02:00
Paul Chavard
c4b93f8d4a fix(groupe_instructeur): unfollow dossiers when removed from groupe instructeur 2021-10-28 14:45:52 +02:00
simon lehericey
7935e42109 Add merge log 2021-10-28 14:39:13 +02:00
simon lehericey
3328c9a132 merge move invite as well 2021-10-28 14:39:13 +02:00
simon lehericey
f2ccb39912 merge destroys the old role and account 2021-10-28 14:39:13 +02:00
simon lehericey
c725999582 move merge method to user 2021-10-28 14:39:13 +02:00
simon lehericey
3d524e9488 Change factory user password to be compatible with admin pass constraint 2021-10-28 14:39:13 +02:00
Paul Chavard
1393b7b07b fix(rebase): fix repetition champ rebase 2021-10-28 13:27:53 +02:00
kara Diaby
71aa13f468 tests 2021-10-27 12:00:39 +02:00
Pierre de La Morinerie
9fd38cae5e specs: migrate from features to system specs
System specs have been available since Rails 5.1, and are better
integrated with the Rails framework.

- Rename `spec/features` to `spec/system`
- Rename `feature do` to `describe do`
- Configure Capybara for system specs

Steps mostly taken from https://medium.com/table-xi/a-quick-guide-to-rails-system-tests-in-rspec-b6e9e8a8b5f6
2021-10-26 12:24:46 +02:00
Pierre de La Morinerie
df9fa258ae specs: remove database_cleaner
This is not needed for integration tests since Rails 5.1.

See https://www.nicholasjacques.io/blog/you-probably-dont-need-databasecleaner/
2021-10-26 12:24:46 +02:00
Pierre de La Morinerie
b1eee27dd7 specs: remove outdated workaround for silencing puma logs 2021-10-26 12:24:46 +02:00
Pierre de La Morinerie
cedbd31d39 specs: only build an admin when building a procedure
This should slighly be faster than doing a create in the middle of the
build.
2021-10-26 12:03:30 +02:00
Pierre de La Morinerie
a2b91c8ec6 factories: cleanup Administrateur, Instructeur and Expert factories
This changes:

- avoids relying on application code to create mock objects,
- allows to build Administrateur or Instructeurs without saving them.
2021-10-26 12:03:30 +02:00
Pierre de La Morinerie
0ff95df221 specs: improve speed of phone_champ_spec
Re-use the same champ for each test. This is safe, and makes the test
go from 4s to 1s.
2021-10-26 12:03:30 +02:00
Pierre de La Morinerie
fccf75710a specs: avoid creating uneeded champs on geo_area
It makes the test much faster.
2021-10-26 12:03:30 +02:00
Pierre de La Morinerie
d0e87a08cf services: cache zxcvbn dictionaries per-thread
Before, every time a password was tested, the dictionaries were parsed
again by zxcvbn.

Parsing dictionaries is slow: it may take up to ~1s. This doesn't matter
that much in production, but it makes tests very slow (because we tend
to create a lot of User records).

With this changes, the initializer tester is shared between calls, class
instances and threads. It is lazily loaded on first use, in order not to
slow down the application boot sequence.

This uses ~20 Mo of memory (only once for all threads), but makes tests
more that twice faster.

For instance, model tests go from **8m 21s** to **3m 26s**.

NB:
An additionnal optimization could be to preload the tester on
boot, before workers are forked, to take advantage of Puma copy-on-write
mechanism. In this way all forked workers would use the same cached
instance.

But:

- We're not actually sure this would work properly. What if Ruby updates
  an interval ivar on the class, and this forces the OS to copy the
  whole data structure in each fork?
- Puma phased restarts are not compatible with copy-on-write anyway.

So we're avoiding this optimisation for now, and take the extra 20 Mo
per worker.
2021-10-25 12:04:56 +02:00
Paul Chavard
1561ea82f6 fix(transfer): manually nullify staled transfers references 2021-10-21 13:54:26 +02:00
Paul Chavard
2a3a9dd822 feat(revisions): rebase dossiers brouillons 2021-10-20 17:26:09 +02:00
Paul Chavard
67e98f79c9 feat(revisions): add stable_id to changes 2021-10-20 17:25:34 +02:00
Pierre de La Morinerie
7b6420d427 specs: set i18n cookie before running browser specs
Otherwise the browser specs use the dault browser language, which may
be English depending on the system language.
2021-10-19 16:41:36 +02:00
Pierre de La Morinerie
0de8fd23c7 specs: remove invalid js: true specifier
Views specs cant't run Javascript.
2021-10-19 16:41:36 +02:00
simon lehericey
d19ad2840c rename preexisting to targeted, remove duplicated test 2021-10-19 16:12:42 +02:00
simon lehericey
52b7e85954 merge administrateur in user_controller 2021-10-19 16:12:42 +02:00
simon lehericey
866df74706 merge admin 2021-10-19 16:12:42 +02:00
simon lehericey
44c880adc4 allow instructeur and administrateur to change their email to legit domain (#6550) 2021-10-19 15:54:57 +02:00
simon lehericey
f54dfe6ead Do not raise error if user is nil
I do not get when it happens
2021-10-19 11:21:24 +02:00
simon lehericey
46fd15416b add end to end test 2021-10-14 14:47:50 +02:00
simon lehericey
933d7b8c8d merge with another preexisting account 2021-10-14 14:47:50 +02:00
simon lehericey
ce40e1127d merge with another new account 2021-10-14 14:47:50 +02:00
simon lehericey
19f81b594b merge with an existing account by using the password 2021-10-14 14:47:50 +02:00
simon lehericey
218e4633a9 securely retrieve fci 2021-10-14 14:47:50 +02:00
simon lehericey
f7299da1e7 launch merge process if an unlinked DS account with the same email exists 2021-10-14 14:47:50 +02:00
simon lehericey
f6879eba60 associate_user take a target email 2021-10-14 14:47:50 +02:00
simon lehericey
09f828a6a2 create_merge_token! 2021-10-14 14:47:50 +02:00
simon lehericey
34862f41e0 Add fci valid_for_merge 2021-10-14 14:47:50 +02:00
simon lehericey
6826bf03b0 Sign in with a user linked by france connect sub (openid)
instead of looking linked user by email because :

- follows FC recommendation to fetch ds account by openid
- the email is not a valid key as many user can share the same FCI email.

The following scenario is now working

A user A (email: 1@mail.com) uses FC to connect to DS
=> It is connected as 1@mail.com

Another user B (email: generic@mail.com) uses FC to connect
=> It is connected as generic@mail.com

The first user A change its FC email to generic@mail.com and connect to DS
=> It is still connected as 1@mail.com
2021-10-14 14:47:50 +02:00
simon lehericey
2f470b25aa spec cleaning 2021-10-14 14:47:50 +02:00
simon lehericey
87de9e38c6 allow draft to be saved with invalid cnaf champ 2021-10-12 14:27:20 +02:00
simon lehericey
cd7bafaa0d clean log_out spec helper 2021-10-12 14:27:20 +02:00
simon lehericey
35c7f05a0a source service supports unknown scope 2021-10-12 14:27:20 +02:00
simon lehericey
ac60d6c5a1 homogennize api particulier endpoint test url 2021-10-12 14:27:20 +02:00
simon lehericey
ecc26897e2 add end to end spec 2021-10-12 14:27:20 +02:00
simon lehericey
40d0cfcdc4 add champ validation 2021-10-12 14:27:20 +02:00
simon lehericey
c76d1043fa add cnaf champ 2021-10-12 14:27:20 +02:00
simon lehericey
d68129b34d add cnaf type de champ 2021-10-12 14:26:40 +02:00
simon lehericey
b69dafc3d4 CNAF in lowercase 2021-10-12 14:26:40 +02:00
simon lehericey
7c65571fca add case when the old_expert or old_instructeur is nil 2021-10-12 11:04:06 +02:00
simon lehericey
ec8ccad465 typo 2021-10-12 11:03:34 +02:00
simon lehericey
d7e621d167 beef up the merge methods 2021-10-07 15:51:31 +02:00
simon lehericey
77d14d4a60 forbid admin merge yet 2021-10-07 15:51:31 +02:00
simon lehericey
5009c583ea Add notice when merging account 2021-10-07 15:51:31 +02:00
simon lehericey
a480b31eb5 merge expert 2021-10-07 15:51:31 +02:00
simon lehericey
136f29524e merge instructeur 2021-10-07 15:51:31 +02:00
simon lehericey
9a6a53349f simple cases when the preexisting targeted account does not have instructeur or profile profile 2021-10-07 15:51:31 +02:00
simon lehericey
c56199e8f7 spec cleaning 2021-10-07 15:51:31 +02:00
simon lehericey
195583c0bd Enable manager specs 2021-10-07 15:51:31 +02:00
Paul Chavard
9d5c5447c2 fix(dossier): do not attempt to destroy transfers when a dossier is destroyed
we had a dependent option on both sides of a relationship which created race conditions
2021-10-06 17:51:09 +02:00
kara Diaby
919d708ec4 tests 2021-10-05 15:37:30 +02:00
kara Diaby
cbedef996b tests 2021-10-05 15:00:21 +02:00
simon lehericey
1000417bc9 update notifications_for_dossier used in dossier show 2021-10-05 12:05:43 +02:00
simon lehericey
65911b7680 update with_notifications dossiers scope (used in procedure index and show) 2021-10-05 12:05:43 +02:00
simon lehericey
f662b28baf update identity_updated_at column when user identity change 2021-10-05 12:05:43 +02:00
Peng-Fei DONG
dee536fca1 app: localize CSV import for groupe instructeurs 2021-10-05 10:58:15 +02:00
simon lehericey
9679e233cd [Fix #6512] admin preview in new tab 2021-10-05 10:47:58 +02:00
simon lehericey
64351d0287 [Fix #6504] Fix exception raised when deleting a transfer 2021-10-01 12:11:03 +02:00
Pierre de La Morinerie
b466fa7878 spec: ensure checkbox is visible before clicking it
There's a random failure in this spec, where the CI triggers this error:

> Failure/Error: check('checkbox')
>     
>     Selenium::WebDriver::Error::ElementClickInterceptedError:
>       element click intercepted: Element <input required="required" type="checkbox" value="on" name="dossier[champs_attributes][7][value]" id="dossier_champs_attributes_7_value"> is not clickable at point (205, 892). Other element would receive the click: <div class="send-dossier-actions-bar">...</div>

That's because the checkbox is partially overlapped by the sticky
action bar at the bottom of the screen – but only _some of the time_.

This commit attempts to fix the issue by manually scrolling the checkbox
at the center of the screen before clicking it.
2021-10-01 00:33:57 +02:00
simon lehericey
0cd9bcb1ab fix #6495 2021-09-28 15:53:18 +02:00
Paul Chavard
5933194149 feat(log): stop logging user emails
fix #6485
2021-09-27 14:56:00 +02:00
simon lehericey
57604b9c89 add schema validations 2021-09-22 12:08:24 +02:00
simon lehericey
75043070da add CNAFAdapter 2021-09-22 12:08:24 +02:00
simon lehericey
07962cc2c7 service: match remote keys 2021-09-22 12:08:24 +02:00
Ismael MOUSSA S
bdbb4deb87 ADD FILE_MAX_SIZE constant to set allow file size limit 2021-09-21 12:04:56 -05:00
simon lehericey
1446660ca3 an api_particulier_token change erases previous api_particulier_sources 2021-09-21 11:21:10 -05:00
simon lehericey
c87f3f7fb6 faster jeton_particulier_controller_spec 2021-09-21 11:21:10 -05:00
simon lehericey
2e1bed8748 an admin can save its sources 2021-09-21 11:21:10 -05:00
simon lehericey
8d747ff16e add sanitize method to service 2021-09-21 11:21:10 -05:00
Pierre de La Morinerie
eef90efd49 app: fix exception during password reset when the token has expired 2021-09-21 10:30:09 -05:00
simon lehericey
a7ec77f0a8 do not display the action for instructeur 2021-09-20 13:58:11 +02:00
simon lehericey
7239657a75 [Fix #6481] a user see its waiting transfers 2021-09-20 13:58:11 +02:00
simon lehericey
c34476a766 a user can transfer all its dossier 2021-09-20 13:58:11 +02:00
Paul Chavard
a8d04d6fc8 test(routing): fix routing feature spec 2021-09-18 11:22:35 +02:00
Paul Chavard
ad5279f4ab test(groupe_instructeur): fix groupe_instructeur controller spec 2021-09-18 11:22:35 +02:00
Paul Chavard
eea6b961d7 refactor(routage): remove administrateur_routage feature flag 2021-09-18 11:21:26 +02:00
simon lehericey
5dbd81ebeb show api particulier sources 2021-09-17 13:50:23 +02:00
simon lehericey
8327c6fd0c add ApiParticulier::Service::Sources 2021-09-17 13:50:23 +02:00
simon lehericey
1d06c15ac0 save api particulier scopes 2021-09-16 09:49:16 +02:00
simon lehericey
6c6205e188 a cloned procedure to a different admin does not keep api_particulier token and scopes 2021-09-16 09:30:11 +02:00
simon lehericey
7ee360df30 add logic to detect empty scopes 2021-09-16 09:09:34 +02:00
simon lehericey
ee6d19e3ee an admin can save it's api particulier token
Co-authored-by: François VANTOMME <akarzim@gmail.com>
2021-09-15 14:56:42 +02:00
simon lehericey
4c0dd43055 add jetons particulier index page
Co-authored-by: François VANTOMME <akarzim@gmail.com>
2021-09-15 14:37:04 +02:00
simon lehericey
87cb16093f fetch token introspection
Co-authored-by: François VANTOMME <akarzim@gmail.com>
2021-09-15 14:37:04 +02:00
Paul Chavard
4850c3b02d fix(i18n): enable locale for email previews 2021-09-09 13:06:51 -05:00
Pierre de La Morinerie
407f46b7de gems: remove smart_listing
It was only used in the old design, which we recently removed
completely.
2021-09-09 09:58:41 -05:00
Pierre de La Morinerie
5cbf939911 spec: fix syntax of get requests in archives_controller_spec
Those were generating Ruby warnings:

> warning: Using the last argument as keyword parameters is deprecated
2021-09-09 09:58:41 -05:00
Pierre de La Morinerie
e5f449b595 devise: unify password reset views
By default, Devise will look for views:

1. First in `views/resource/passwords/…`,
2. Then in `views/devise/passwords/…` if not found.

By moving the views to `views/devise`, we avoid having a partial in
`views/shared` that we need to include manually, and instead let Devise
do the job automatically.
2021-09-09 09:40:40 -05:00
Pierre de La Morinerie
80f9d4adc0 devise: use password_strength component in SuperAdmin::PasswordsController 2021-09-09 09:40:39 -05:00
Pierre de La Morinerie
62e4f7ee32 devise: use password_complexity in User::PasswordsController
This fixes the password strength meter no longer being displayed when
an admin changes their password.
2021-09-09 09:40:39 -05:00
Pierre de La Morinerie
ed8b19d2eb app: use password_complexity in Administrateurs::ActivateController 2021-09-09 09:40:39 -05:00
Pierre de La Morinerie
428ca8755f app: add a password_complexity component
This component will replace the previous `password_field` component.
2021-09-09 09:40:39 -05:00
Pierre de La Morinerie
586f8ec543 models: improve password complexity specs 2021-09-09 09:40:39 -05:00
Paul Chavard
00c7c7c419 test(dossier): test dossier transfer 2021-09-08 15:49:04 +02:00
Paul Chavard
3235f42a63 feat(dossier): add dossier transfers UI 2021-09-08 15:10:43 +02:00
Paul Chavard
d6cbdf2a48 feat(dossier): add dossier transfer models 2021-09-08 14:39:46 +02:00
simon lehericey
9fc195f0e5 add test to dossier_projection_service 2021-09-07 15:17:06 +02:00
Paul Chavard
74e277d0a2 feat(graphql): add an option to dossier state change mutations to disable notifications 2021-09-07 14:21:48 +02:00
Paul Chavard
9e30d5fc22 fix(virus scan): prevent virus scans in specs 2021-09-07 14:21:48 +02:00
simon lehericey
367f508e2e linked_drop_down_list: empty primary => empty secondary 2021-09-07 10:09:18 +02:00
Paul Chavard
6a5a8233b5 feat(i18n): send dossier emails with its user locale and improuve translations 2021-09-07 09:51:23 +02:00
Pierre de La Morinerie
8bb283d977 app: delete old Admin::ProceduresController 2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
a004ac59df app: move archive to NewAdministrateur::ProceduresController 2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
e7c8a9fff5 app: move clone to NewAdministrateur::ProceduresController 2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
56fa7e7cd6 app: move destroy to NewAdministrateur::ProceduresController
The code was already moved; only the route and tests were not.
2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
3e83ad454f app: move new_from_existing to NewAdministrateur::ProceduresController 2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
7729385d89 controllers: remove dead code on Admin::ProceduresController
This code has been migrated to NewAdministrateur::ProceduresController.
2021-09-02 14:51:26 -05:00
Pierre de La Morinerie
0f9d7d6b8c app: remove old Admin::InstructeursController
It was only hosting the deprecated "Instructeurs globally attached to
this admin", which wasn't used anywhere in the app anymore.
2021-09-02 14:40:36 -05:00
Paul Chavard
a3cc072bbd feat(i18n): translate countries selector 2021-08-31 13:15:26 +02:00
Pierre de La Morinerie
b80f6a9f1b spec: fix some manager tests not running 2021-08-26 11:44:47 -05:00
Paul Chavard
8e1bfb469f fix(dossier): send expiration notifications 2 weeks prior to supression instead of a month 2021-08-26 11:28:57 +02:00
Paul Chavard
1399d9bba9 feat(graphql): expose demarche descriptor on dossier type
We don't want to expose full demarche type on dossiers because it would open the door for recursive queries that we want to avoid. DemarcheDescriptorType is a lightweight representation of demarche metadata.
2021-08-25 11:12:24 +02:00
Pierre de La Morinerie
47e1555dce i18n: properly translate the locale dropdown title 2021-08-24 12:57:51 -05:00
Pierre de La Morinerie
9741108094 lib: remove the 'migrated' key on filters
In a9a4f6e2a8, a task to migrate
ProcedurePresentation's filters was added.

This task added a "migrated: true" key to all migrated filters.

Now that this task has run, we can safely remove the extra key.

In a previous version of this commit, the migration would fail for
invalid ProcedurePresentation records. This is now fixed.
2021-08-24 08:42:22 -05:00
Christophe Robillard
83b6c5d7c7 replace deprecated axe-matchers by axe-core-spec 2021-08-24 08:09:17 -05:00
Paul Chavard
3b6528decf feat(i18n): enable localization by query param
Providing a query param ("locale") will enable localization. A language picker will be shown once
localization is activated. Locale is stored in a cookie "locale".
2021-08-24 12:42:40 +02:00
Ismael MOUSSA S. (T0194673)
330333aac4 6407 - Fix flash message typo in new administrateur/groupe instructeurs controller and its related spec 2021-08-20 20:10:44 +02:00
Christophe Robillard
8f2e0660d3 add spec for dossier with commune 2021-08-19 08:04:47 +02:00
Christophe Robillard
e06f11f33f add code insee libelle for commune export 2021-08-19 08:04:47 +02:00
Christophe Robillard
4a6c22d6a6 export code insee for commune champ 2021-08-19 08:04:47 +02:00
Paul Chavard
ffa8c0c80a feat(dossiers): enable dossiers termine expiration behind feature flag
feature flag "procedure_process_expired_dossiers_termine" controls if a procedure has expiration
enabled on dossiers termine

re #3796
2021-08-18 16:11:35 +01:00
Christophe Robillard
031b74759f archives: move bugreport 2021-08-05 09:24:20 +02:00
Christophe Robillard
38e3469e9a add bug report to archive 2021-08-03 14:51:41 +02:00
simon lehericey
b29bae4707 a procedure has an encrypted api_particulier_token
Co-authored-by: François VANTOMME <akarzim@gmail.com>
2021-07-30 11:18:44 +02:00
François Vantomme
17b659539f Feat (API Particulier): new encryption service 2021-07-30 11:18:44 +02:00
kara Diaby
69393c2921 modify groupe instructeur controller 2021-07-27 19:38:22 +02:00
kara Diaby
9c976c6b71 fixup! tests 2021-07-27 19:38:21 +02:00
Paul Chavard
64cfb4d64e Fix sort with revisions 2021-07-23 10:57:04 +02:00
Pierre de La Morinerie
6475cdff7a
Revert "Suppression de la clef "migrated": true sur les filtres des ProcedurePresentation" 2021-07-23 09:26:13 +02:00
Pierre de La Morinerie
e1909ed29f brouillon: redirect to sign-in when disconnected
There are two cases where the draft auto-save might fail because the
user is no longer authenticated:

- The user signed-out in another tab,
- The brower quit and re-opened, so the Session cookie expired.

In both cases, the auto-save will never succeed until the user
authenticates again, so displaying a "Retry" button is cruel.

Moreover, in plus of all auto-save requests failing with a small error,
the actual hard failure only occurs after filling all the form and
trying to submit it. Then the user is redirected to the sign-in page –
but all their changes are lost.

Instead, we now redirect to the sign-in page on the first 401 error
during the auto-save, let the user sign-in, and then redirect back to
the form.
2021-07-22 11:58:02 +02:00
Paul Chavard
388fb39eb5 Fix false positive blank champ warnings 2021-07-22 10:45:25 +02:00
Paul Chavard
ac0f50b488 Improuve champ blank check 2021-07-22 10:45:25 +02:00
Pierre de La Morinerie
fd74d9a062 lib: remove the 'migrated' key on filters
In a9a4f6e2a8, a task to migrate
ProcedurePresentation's filters was added.

This task added a "migrated: true" key to all migrated filters.

Now that this task has run, we can safely remove the extra key.
2021-07-20 16:51:32 +02:00
Pierre de La Morinerie
fda59c9231 lib: remove outdated tasks 2021-07-20 15:34:31 +02:00
Pierre de La Morinerie
32ab2f0a80 instructeur: limit the maximum size of a filter value
This prevents the URL from exceeding the max size, and
causing '414: Request-URI too large' errors.
2021-07-20 14:49:48 +02:00
Pierre de La Morinerie
831672391e app: use a long-lived cookie for CSRF token
See the ADR document for rationale.
2021-07-20 11:11:52 +02:00
Pierre de La Morinerie
446c57ed63 specs: add a feature test for forgery protection 2021-07-20 11:11:52 +02:00
Pierre de La Morinerie
71741c5f98 views: fix checkbox wrongly selected in multiple_drop_down_list
The check for whether the checkbox should be checked or not was made by
matching the whole string. Thus, given two options 'valid' and
'invalid', the check for the presence of 'valid' would succeed even when
only 'invalid' was present in the values (because
`'valid'.includes?('invalid')`.

The code now checks against the list of items in the selected_options.
2021-07-20 09:01:07 +02:00
kara Diaby
0b6c7dace7 tests 2021-07-15 16:32:07 +02:00
Pierre de La Morinerie
40b3ea8ad6
Revert "Instructeurs : limitation de la valeur d'un filtre à 100 caractères" 2021-07-13 18:19:46 +02:00
kara Diaby
d2d046a39d fix encoding problems with cherlock Holmes gem 2021-07-13 10:58:41 +02:00
Pierre de La Morinerie
3c8a88a660 instructeur: limit the maximum size of a filter value
This prevents the URL from exceeding the max size, and
causing '414: Request-URI too large' errors.
2021-07-08 16:17:22 +02:00
Paul Chavard
527db7631e Add a point on map from coordinates input 2021-07-07 13:33:28 +02:00
Paul Chavard
ab31087f23 Hide cadastres if there is none 2021-07-07 12:28:27 +02:00
Pierre de La Morinerie
37c62ac0a3 app: display standard error page when no cookies are present
This occurs mostly when Safari attempts to perform a POST request
again (without sending any of the cookies).

In that case, our custom `422.html` page is more helpful to the user
(because it has a link to the previous page) than a "No cookies" blank
text.
2021-07-06 16:29:22 +02:00
Christophe Robillard
bc07a875eb integrate a mininum weight for the average dossier weight
before this commit, the average dossier weight took account only pieces
justificatives. With this commit, we add a minimum weight for other
files included in an archive like pdf_export, log operations,
attachments added to traitements. This minimum weight is set arbitrary,
from the observation of some random procedures in production
2021-07-06 15:58:45 +02:00
Pierre de La Morinerie
09933454ff app: improve InvalidAuthenticityToken logging
- Log on all controllers
- Improve description of the controller action involved
- Ignore Safari bogus requests
2021-07-06 12:42:01 +02:00
Christophe Robillard
54d91335f2 remove the ability to download an 'everything' archive
there are sometimes an error that happen when building an everything
archive. The error explanation is not understood at the moment.
To deliver the archive feature quickly, we remove the 'everything' archive for
the moment
2021-07-05 11:05:07 +02:00
Paul Chavard
280e54b59d Enable test revisions 2021-07-01 15:59:07 +02:00
Pierre de La Morinerie
1faf91bdbe experts: protect password update as well as sign-up 2021-06-30 10:46:42 +02:00
Pierre de La Morinerie
6f7a2fde57 experts: fix saving password on sign-in 2021-06-30 10:46:42 +02:00
Pierre de La Morinerie
4f5c5e26ae spec: cleanup spec for Experts::AvisController 2021-06-30 10:46:42 +02:00
Christophe Robillard
66cc0dd08d Revert "Revert "Expose dossier PDF export as IO""
This reverts commit 362093eff0.
2021-06-24 21:01:59 +02:00
krichtof
362093eff0
Revert "Expose dossier PDF export as IO" 2021-06-24 19:21:37 +02:00
Paul Chavard
b73d504f8d Expose dossier PDF export as IO
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-24 17:49:24 +02:00
Paul Chavard
a4482233b8 [GraphQL] expose deleted dossiers 2021-06-24 11:51:37 +02:00
Paul Chavard
0ca5e1abe2 Preview should reflect revision changes 2021-06-24 11:39:49 +02:00
Paul Chavard
8b2c2c6466 Handle carte layers changes 2021-06-24 11:39:49 +02:00
Paul Chavard
35eccb5630 Show separate blocks for types de champ and annotation changes 2021-06-23 09:40:07 +02:00
Paul Chavard
19195008e8 Expose removed types_de_champ in exports 2021-06-23 09:40:07 +02:00
simon lehericey
eadae7af6b show all available tdc for procedure presentation 2021-06-23 09:40:07 +02:00
Paul Chavard
8d49b5556a test revision changes 2021-06-23 09:40:07 +02:00
Paul Chavard
f238710044 Add last_month export 2021-06-23 09:23:10 +02:00
kara Diaby
bcc23ae7a6 test file 2021-06-22 16:33:38 +02:00
kara Diaby
309b3414d6 tests 2021-06-22 16:33:38 +02:00
Pierre de La Morinerie
5908b8019a specs: properly use xhr: true in javascript requests
This avoids an unexpected `ActionController::InvalidCrossOriginRequest`
exception to be raised when the forgery protection is disabled.
2021-06-22 13:21:55 +02:00
Paul Chavard
1f7d86d5a5 Add delete dossier action to dossiers list 2021-06-18 11:35:00 +02:00
Christophe Robillard
fdec9b2fd5 archives: don't update dossiers
this fix avoid to touch dossier after attaching pdf_export_for_instructeur
2021-06-18 11:00:57 +02:00
Christophe Robillard
7851d6b1cc archives: count archived dossiers 2021-06-18 08:59:13 +02:00
Pierre de La Morinerie
12d17bc245 spec: fix Timecop.freeze without Timecop.return
Time was frozen without being un-frozen at the end of the spec.

This caused a spec in `Procedure#publish_or_reopen!` to fail randomly.

Fixed by using the `Timecop.freeze do` form, which unfreezes after the
execution of the block.
2021-06-17 17:36:43 +02:00
Christophe Robillard
896190b91e return nil when no traitement time 2021-06-17 16:31:53 +02:00
Christophe Robillard
887c5cb4a9 correct rubocop offenses 2021-06-17 16:31:53 +02:00
Christophe Robillard
a5ae5af56a extract NB_DAYS_RECENT_DOSSIERS and PERCENTILE 2021-06-17 16:31:53 +02:00
Christophe Robillard
bdf2f47eb9 fix specs for procedure stats 2021-06-17 16:31:53 +02:00
Christophe Robillard
a8840faadb move stats methods to appropriate concern class 2021-06-17 16:31:53 +02:00
Christophe Robillard
701b72494d compute usual traitement time for specific month 2021-06-17 16:31:53 +02:00
Pierre de La Morinerie
b5bde6608c routes: replace the email param in the Avis URLs by a query param 2021-06-17 11:15:51 +02:00
kara Diaby
cd030fd975 add csv fixture file 2021-06-15 19:36:47 +02:00
kara Diaby
6ebd57640c tests 2021-06-15 19:36:46 +02:00
simon lehericey
6be0bbaa9c Change bottom champs editor button from enregistrer to continuer 2021-06-15 09:54:32 +02:00
Paul Chavard
a2c53ce7ea format phone numbers 2021-06-15 09:14:55 +02:00
François Vantomme
c9b1095d1e Refactor (Rubocop): replace map{ … }.compact by filter_map
In Ruby 2.7, Enumerable#filter_map has been added.
This cop identifies places where map { … }.compact can be replaced by filter_map.

See: https://docs.rubocop.org/rubocop-performance/cops_performance.html#performancemapcompact
2021-06-11 15:38:09 +02:00
Christophe Robillard
aee8db99d0 add spec for dossier weight estimation 2021-06-09 10:52:38 +02:00
Christophe Robillard
4fd0ad71c3 add spec for archive weight estimation 2021-06-09 10:52:38 +02:00
Christophe Robillard
f0b2327ec6 add spec for count dossiers termines by month 2021-06-09 10:52:38 +02:00
Christophe Robillard
41569efe9d extract estimate_weight
and rename nb_dossiers by nb_dossiers_termines
2021-06-09 10:52:38 +02:00
Paul Chavard
44ebd0e8a5 Fix api education wrong data type 2021-06-08 12:25:24 +02:00
kara Diaby
fab4a41c57 add tests regarding /users/statistiques view 2021-06-07 15:09:39 +02:00
Paul Chavard
1888f74b10 Prevent double processing of declarative dossiers 2021-06-04 17:55:40 +02:00
Paul Chavard
9819a5ff77 Update spec/models/procedure_spec.rb
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-06-03 13:11:16 +02:00
Paul Chavard
a0d4c9d54c Fix published revisions 2021-06-03 13:11:16 +02:00
Paul Chavard
990ae10399 GraphQL byte_size should be BigInt 2021-06-03 10:53:17 +02:00
Paul Chavard
f076fa803e Handle GeoJSON validation errors 2021-06-02 12:43:24 +02:00
Paul Chavard
05380b9520 Fix destoying discarded procedures 2021-05-27 18:48:56 +02:00
Pierre de La Morinerie
929a556f9f i18n: add feature spec for changing the language 2021-05-27 11:01:26 +02:00
François Vantomme
99086a63be Fix (Instructeur): deal nicely with non-guaranteed elements order in arrays
Use of one-dimension arrays comparison & `contain_exactly` RSpec matcher
to avoid this behaviour:

Failures:
  1) InstructeursImportService#import when an email is malformed ignores or corrects
     Failure/Error:
       expect(procedure_groupes).to match_array([
         ["Occitanie", ["paul@mccartney.uk", "ringo@starr.uk"]],
         ["défaut", []]
       ])
       expected collection contained:  [["Occitanie", ["paul@mccartney.uk", "ringo@starr.uk"]], ["défaut", []]]
       actual collection contained:    [["Occitanie", ["ringo@starr.uk", "paul@mccartney.uk"]], ["défaut", []]]
       the missing elements were:      [["Occitanie", ["paul@mccartney.uk", "ringo@starr.uk"]]]
       the extra elements were:        [["Occitanie", ["ringo@starr.uk", "paul@mccartney.uk"]]]
     # ./spec/services/instructeurs_import_service_spec.rb:70:in `block (4 levels) in <main>'
2021-05-27 08:33:52 +02:00
Paul Chavard
9b0dae4cc2 Fix apostrophes ‘ -> ’ 2021-05-26 18:05:14 +02:00
Paul Chavard
4922bc88d6 Do not crash when properties is nil 2021-05-26 12:40:07 +02:00
Paul Chavard
21ee79669d Better labels in test 2021-05-25 11:43:38 +02:00
Paul Chavard
179bb5a9fe Apply suggestions from code review
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-05-25 11:43:38 +02:00
Paul Chavard
acb277e650 Use stable_id when replacing tags 2021-05-25 11:43:38 +02:00
kara Diaby
4b6196e6f6 verify avis privacy 2021-05-25 11:24:15 +02:00
Paul Chavard
c5f2faa3d2 add tests for backward compatibility of geo_areas 2021-05-24 11:57:00 +02:00
Paul Chavard
3b85ade440 Add compatibility cadsatre layer with old API GEO 2021-05-24 11:57:00 +02:00
Paul Chavard
01c558953b Remove API GEO legacy adapter 2021-05-24 11:50:16 +02:00
simon lehericey
b620888597 show only dossier avis 2021-05-20 16:18:04 +02:00
kara Diaby
aaf943569a rename avis confidential test 2021-05-20 11:13:24 +02:00
simon lehericey
17617fba43 address champ needs the data column 2021-05-19 15:59:18 +02:00
simon lehericey
a46000dc1f ensure to_s is used on specialized champ 2021-05-19 09:39:20 +02:00
Paul Chavard
e043645a88 cleanup tests 2021-05-18 11:42:10 +02:00
kara Diaby
468e9e849a tests 2021-05-18 11:42:10 +02:00
Paul Chavard
5f419954b4 Fix dossier deleted user display 2021-05-13 10:43:55 +02:00
Paul Chavard
3f7a2bea9b Dossier without user should be valid 2021-05-11 17:50:10 +02:00
Paul Chavard
8a74438dc1 Use conservation_extension instead of en_construction_conservation_extension 2021-05-11 17:33:53 +02:00
simon lehericey
c5f6c9ae1e fix missing state translation 2021-05-10 11:17:34 +02:00
François Vantomme
99ce5195bc Fix (API Entreprise): test fails randomly
Don't assume array order, just check that all values are present
2021-05-07 17:42:15 +02:00
Pierre de La Morinerie
77b65f3aa0 tasks: remove older after_party tasks 2021-05-06 15:19:37 +02:00
simon lehericey
55b80df29d display count before text in tabs 2021-05-06 09:13:20 +02:00
simon lehericey
5124e08ccd disable faulty manager spec 2021-05-05 21:34:57 +02:00
simon lehericey
ccce724976 refactor as created fci must have an user_id 2021-05-05 14:36:34 +02:00