Commit graph

2506 commits

Author SHA1 Message Date
Paul Chavard
c4a30084fe refactor(virus_scan): remove lock 2023-01-04 12:12:11 +01:00
Sébastien Carceles
20136b7ac8
feat(demarche): create and prefill a dossier with POST request (#8233)
* add base controller for public api

* add dossiers controller with basic checks

* create the dossier

* ensure content-type is json

* prefill dossier with given values

* mark a dossier as prefilled

When a dossier is prefilled, it's allowed not to have a user.

Plus, we add a secure token to the dossier, which we will need later to set a
user after sign in / sign up.

* set user as owner of an orphan prefilled dossier

When a visitor comes from the dossier_url answered by the public api,
the dossier is orphan:
- when the user is already authenticated: they become the owner
- when the user is not authenticated: they can sign in / sign up / france_connect
and then they become the owner

So here is the procedure:
- allow to sign in / sign up / france connect when user is unauthenticated
- set dossier ownership when the dossier is orphan
- check dossier ownership when the dossier is not
- redirect to brouillon path when user is signed in and owner

* mark the dossier as prefilled when it's prefilled
(even with a GET request, because it will be useful later on, for
exmample in order to cleanup the unused prefilled dossiers)

* system spec: prefilling dossier with post request
2023-01-03 14:46:10 +01:00
Kara Diaby
f7cb24ce40 Supprime le feature flag pour que tous les administrateurs puissent ajouter des tags sur les démarches 2023-01-02 11:13:31 +01:00
mfo
72791bd5b6
Merge pull request #8337 from mfo/US/instructeur#telecharger_pjs
correctif(instructeurs/dossier#telecharger_pjs): ne pas inclure les bills et horodatage quand on telecharge un dossier unitairement
2022-12-27 09:07:48 +01:00
Paul Chavard
4a4ce67ef6 fix(dossier): explicitly send draft notification email 2022-12-26 22:02:33 +00:00
Martin
69aed18b46 correctif(instructeurs/dossier#telecharger_pjs): ne pas inclure les bills et horodatage quand on telecharge un dossier unitairement 2022-12-26 17:11:10 +01:00
Paul Chavard
4d4c378724 feat(api_geo): add api_geo service 2022-12-21 14:03:02 +01:00
Kara Diaby
7bdc7c2cad manager procedure controller 2022-12-19 15:28:09 +01:00
Sébastien Carceles
0a10a08c21
feat(demarche): describe procedure prefilling (#8187)
* feat(demarche): description

Show the description of an opendata procedure (published or draft),
with help about how to prefill a dossier for this procedure.

Co-authored-by: Damien Le Thiec <damien.lethiec@gmail.com>
2022-12-19 11:32:09 +00:00
Martin
2be4441a70 amelioration(attestion.et.mail): deduplique les message d'erreur, améliore les messages d'erreur, gère la pluralisation des erreurs lorsque plusieurs tags sont concernés 2022-12-19 09:28:46 +01:00
Martin
ef389eab41 amelioration(attestation.et.mail): repositionne les messages d'erreur lié à la substitution des balises a proximité du formulaire pour faciliter la comprehension. passage des champs au DSFR 2022-12-19 09:28:46 +01:00
Christophe Robillard
f1595d1f50 wrap resultset tuples in ProcedureDetail 2022-12-16 15:51:49 +01:00
Christophe Robillard
5de0c8722e i18n for procedure attributes and values 2022-12-16 15:51:49 +01:00
Christophe Robillard
f3f8bc74c7 fetch procedure info on demand
Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
Co-authored-by: Colin Darie <colin@darie.eu>
Co-authored-by: Martin <martin@sharypic.com>
2022-12-16 15:51:49 +01:00
Christophe Robillard
3a660349ad export all demarches 2022-12-16 15:51:49 +01:00
Christophe Robillard
cea92c0488 perf: remove n+1 queries to count admin 2022-12-16 15:51:49 +01:00
Christophe Robillard
d167a3ec71 fix: select distinct procedures 2022-12-16 15:51:49 +01:00
Paul Chavard
cb5b60ccda Revert "Revert "Merge pull request #7907 from tchak/feat-cond-repetitions""
This reverts commit 0d10d36cb0.

# Conflicts:
#	app/models/dossier.rb
#	app/models/dossier_preloader.rb
2022-12-15 19:09:25 +01:00
Sébastien Carceles
b8ff0ba4a2
feat(demarche): sign up when prefilling a dossier (#8247)
* store prefill params in session

Instead of using query params on /dossier/new, we assume the user comes
from /commencer/:path, which is the new prefill link.

There, we store the prefill params in session, and use them to prefill
the dossier when creating it, in /dossiers/new.

* spec: cover the case

* review: serialize with json instead of yaml

* review: rename method

* review: store only query params

* review: comment why we dont override already stored params
2022-12-15 10:58:17 +01:00
Lisa Durand
89730b485b add bulk action feature for 'passer_en_instruction' 2022-12-15 10:04:25 +01:00
Paul Chavard
5dfb96383a fix(types_de_champ): ensure we always reset dossier after demarche changes 2022-12-14 17:42:27 +01:00
Paul Chavard
1f54986ab8 clean(admin): remove unused code from old controller 2022-12-14 17:42:27 +01:00
Colin Darie
3a9a71079a
Merge branch 'main' into pj-en-construction-replace 2022-12-14 16:59:48 +01:00
Paul Chavard
1b95809f14 refactor(dossier): flatten champ attributes 2022-12-14 13:03:06 +01:00
Paul Chavard
0d10d36cb0 Revert "Merge pull request #7907 from tchak/feat-cond-repetitions"
This reverts commit 1900f8ff4c, reversing
changes made to febffc2d64.

# Conflicts:
#	app/models/dossier.rb
2022-12-14 11:25:45 +01:00
Colin Darie
4049240c2c
feat(piece_justificative): allow user to replace a PJ for dossier en_construction 2022-12-14 09:58:15 +01:00
Colin Darie
4824363879 refactor(attachment): rename user_can_download -> explicit view_as
- link: shows a simple link to open attachment
- download: shows complete DSFR download UI
2022-12-08 20:36:15 +01:00
sebastiencarceles
3939644030 validate prefilled champs when editing brouillon 2022-12-08 15:27:39 +01:00
sebastiencarceles
24802985a2 feat(dossier): prefill dossier from query params 2022-12-08 15:27:39 +01:00
Paul Chavard
d513c364d8 feat(cond): enable conditional on champs in repetitions 2022-12-08 09:38:12 +01:00
Paul Chavard
52c8fc7e8d feat(api_token): api v2 use new token 2022-12-07 18:19:37 +01:00
Paul Chavard
a47a056ee8 feat(api_token): api v1 use new token 2022-12-07 18:19:37 +01:00
Paul Chavard
3c21090a88 feat(api_token): add profile api token card 2022-12-07 18:19:37 +01:00
Paul Chavard
3d1f57df83 feat(api_token): add api token controller 2022-12-07 18:19:37 +01:00
Paul Chavard
bb47e8d2ab fix(dossier): dossier.repasser_en_construction! should take disable_notification 2022-12-07 13:14:59 +01:00
Paul Chavard
b8a9b7223c refactor(groupe_instructeur): improuve controller 2022-12-06 12:01:54 +01:00
Paul Chavard
ed4d5cb36a refactor(demarche): make declarative demarche processing syncroneous 2022-12-06 11:41:25 +01:00
Martin
7c65af3be0 poc(batch_operation_alert): simplier wording 2022-12-06 11:28:48 +01:00
Martin
b0ae2e8a0f clean(spec): rubocopify / fix specs 2022-12-06 11:28:48 +01:00
Lisa Durand
6859882a58 display batch operation alert to instructeur groups not only instructeur 2022-12-06 11:28:48 +01:00
Lisa Durand
c52443f221 change flash alert wording and display message in show if dossier is in batch 2022-12-06 11:28:48 +01:00
Lisa Durand
1beb219fdd display batch operation alerts 2022-12-06 11:28:48 +01:00
Martin
e5944eed34 poc(batch_operation): habtm groupe instructeurs, permettra de visualiser plus facilement les batch en cours pour les instructeurs du meme groupe 2022-12-06 11:28:48 +01:00
Martin
eaf72162da poc(batch_operation): some rewrite to avoid various conflict (when an instructeur try to create a job with an incompatible dossier regarding the current task). also soome cleanup to isole spec in least involved model 2022-12-06 11:28:48 +01:00
Martin
7a51ecec5d poc(batch_operation): quand un dossier est dans un batch, impossible de faire les actions : archive, unarchive, follow, unfollow, passer_en_instruction, repasser_en_construction, repasser_en_instruction, terminer, restore, destroy, extend_conservation 2022-12-06 11:28:48 +01:00
Martin
7df86c50fb poc(batch_operations_controller): implement simple [not yet with procedure_presentation] action to create a batch operation 2022-12-06 11:28:48 +01:00
Colin Darie
a2e80cfcca fix(clone-rescue): when record was invalid 2022-12-05 18:19:17 +01:00
simon lehericey
8771205679 clean(flipper): remove unused expert_not_allowed_to_invite 2022-12-05 12:22:29 +01:00
Colin Darie
b9d6397a9b
fix(pj_template): private proxy template url so their links are non expirable
Closes #7920
2022-12-05 11:30:00 +01:00
Colin Darie
0a114270af refactor(attachment): update Attachment::EditComponent everywhere 2022-12-05 10:47:10 +01:00
Colin Darie
b13c5e56f6 refactor(piece_justificative): UX follows mockups 2022-12-05 10:47:10 +01:00
Colin Darie
636645f686 refactor: minor piece_justificative_multiple? question mark use 2022-12-05 10:47:10 +01:00
Colin Darie
a726350f0d feat(procedure): allow admin to enable multiple uploads for piece justificative on existing procedures 2022-12-05 10:47:10 +01:00
Colin Darie
7ae6efe776 refactor(attachment): remove replace feature 2022-12-05 10:47:10 +01:00
Colin Darie
b8296c6d4d feat(piece_justificative): supports multiple files
Closes #7924
2022-12-05 10:47:10 +01:00
Kara Diaby
f5e4c28fc1 controller 2022-12-02 11:30:48 +01:00
Paul Chavard
886a409abf fix(dossier): fix links to empty pdf templates 2022-12-01 17:35:01 +01:00
Paul Chavard
ece68076a7 feat(dossier): add some metadata to archive and remove operation log 2022-11-30 16:20:13 +01:00
Paul Chavard
a90dada104 fix(patron): dossier should have a procedure and champ should delegate to dossier 2022-11-30 10:54:03 +01:00
Paul Chavard
1fb051c3cc refactor(attestation_template): remove unused code 2022-11-29 19:36:56 +01:00
simon lehericey
bffd8015d8 fix(avis_controller): check revoked avis by default 2022-11-29 16:21:06 +01:00
simon lehericey
801d594efd fix(avis_controller): revoked_acl on telecharger_pjs 2022-11-29 16:21:06 +01:00
simon lehericey
a84269e66e fix(avis_controller): revoked acl on bilans_pdf 2022-11-29 16:21:06 +01:00
simon lehericey
d764959659 fix(avis_controller): revoked acl on create_commentaire 2022-11-29 16:21:06 +01:00
simon lehericey
8929af2767 fix(avis_controller): revoked acl on messagerie 2022-11-29 16:21:06 +01:00
simon lehericey
71dd0b99ab fix(avis_controller): revoked acl on update_expert 2022-11-29 16:21:06 +01:00
simon lehericey
531cbf2612 fix(avis_controller): revoked acl on update 2022-11-29 16:21:06 +01:00
simon lehericey
3be17da70e fix(avis_controller): revoked acl on update 2022-11-29 16:21:06 +01:00
simon lehericey
6aa2ccacd4 fix(avis_controller): fix revoked acl on create_avis 2022-11-29 16:21:06 +01:00
simon lehericey
c17bc50def fix(avis_controller): acl on instruction 2022-11-29 16:21:06 +01:00
simon lehericey
f500cb8dc7 fix(avis_controller): procedure do not show revoked avis 2022-11-29 16:21:06 +01:00
simon lehericey
dcae06ae84 fix(avis_controller): index do not linked to revoked avis 2022-11-29 16:21:06 +01:00
Paul Chavard
53eb3e6ad0 chore(dossier): cleanup champs nested attributes 2022-11-29 11:10:59 +01:00
Paul Chavard
ee30a95847 fix(graphql): check if tokens are revoked 2022-11-25 16:27:11 +01:00
Colin Darie
611120f31f chore(dossier_transfer): notice after transfer invitation sent 2022-11-25 13:34:12 +01:00
Paul Chavard
e3da500614 fix(graphql): variables should be a plain hash 2022-11-24 18:21:33 +01:00
Paul Chavard
a760e0a698 feat(demarche): enable revisions for all 2022-11-24 17:35:33 +01:00
Paul Chavard
b3a35ab3aa fix(graphql): fix playground when admin has no procedures or dossiers 2022-11-24 16:18:08 +01:00
Paul Chavard
6f6f4bc60d fix(stats): exported file should be csv
fix #7040
2022-11-24 15:40:46 +01:00
Christophe Robillard
3539b00652 search admins by email 2022-11-24 15:05:46 +01:00
simon lehericey
8acdf7f5ee feat(team_account): link row to admin view 2022-11-24 14:50:26 +01:00
simon lehericey
18bb26a7f2 feat(team_account): add procedures count 2022-11-24 14:50:26 +01:00
Paul Chavard
234975b806 feat(graphql): expose groupe_instructeur state and update mutation 2022-11-24 14:33:29 +01:00
Martin
bb993d552e amelioration(avis): sur une page listant les avis en attente sur une procedure, on remonte le dernier avis demandé en premier 2022-11-24 14:23:06 +01:00
Paul Chavard
e395ab5c87 fix(invite): do not render menu when invite not found 2022-11-24 09:43:19 +01:00
Paul Chavard
cafda4f6f0 refactor(attestation_template): move to procedure 2022-11-23 12:26:26 +01:00
Christophe Robillard
8e95c6a2ba search procedures by libelle 2022-11-22 17:08:17 +01:00
simon lehericey
30b53ec927 feat(procedure_admins): allow self remove from procedure 2022-11-22 16:41:20 +01:00
simon lehericey
66e9b74121 feat(manager): select team_user base on attribute 2022-11-17 16:29:08 +01:00
simon lehericey
fcfe09f05a refactor(user): rename delete_and_keep_track_dossiers 2022-11-16 17:52:47 +01:00
Paul Chavard
6f6b3896de refactor(export): reduce repetition in export code hopefully making it more readable 2022-11-16 08:49:37 +01:00
Colin Darie
3ea57a0416 chore(bundle): bump pundit 2.1.0 => 2.2.0
Fix administrate autoloading.
2022-11-15 17:28:04 +01:00
Colin Darie
a4ed1d07af chore(manager): disable pagination count on massive tables 2022-11-15 17:28:04 +01:00
Colin Darie
a28e31bd97 chore(bundle): update administrate 0.16 => 0.18 2022-11-15 17:28:04 +01:00
Paul Chavard
6ad057dcee feat(graphql): upgrade playground version 2022-11-15 11:48:29 +01:00
Lisa Durand
c2de73c09d simplify and improve perf by making the feature works only for id search 2022-11-15 10:51:36 +01:00
Lisa Durand
d245e12559 remove render_views in spec and correct the way to retrieve dossiers 2022-11-15 10:51:36 +01:00
Lisa Durand
ba0799b684 it displays a message if instructor is looking for a dossier that is not in his instructor group 2022-11-15 10:51:36 +01:00
Martin
05dcf5e7cf amelioration(usager.liste_des_dossier): ajout du bouton pour cloner un dossier 2022-11-14 09:13:54 +01:00
Paul Chavard
1cac88a621 refactor(dossier): permit old attributes format for smooth migration 2022-11-11 09:17:42 +00:00