Commit graph

502 commits

Author SHA1 Message Date
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
Christophe Robillard
11a18516b2 remove feature flag zonage 2022-12-21 09:02:16 +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
Paul Chavard
9149e0fcd7 feat(revision): allow more dossiers to rebase 2022-12-14 17:42:27 +01:00
Paul Chavard
ed4d5cb36a refactor(demarche): make declarative demarche processing syncroneous 2022-12-06 11:41:25 +01:00
Colin Darie
0014ce4b91 chore(schema): +procedures#piece_justificative_multiple 2022-12-05 10:47:10 +01:00
Colin Darie
91f4971df2 feat(champ): has_one_attached => has_many_attached piece_justificative_file 2022-12-05 10:47:10 +01:00
Paul Chavard
1fb051c3cc refactor(attestation_template): remove unused code 2022-11-29 19:36:56 +01:00
Paul Chavard
a760e0a698 feat(demarche): enable revisions for all 2022-11-24 17:35:33 +01:00
Paul Chavard
234975b806 feat(graphql): expose groupe_instructeur state and update mutation 2022-11-24 14:33:29 +01:00
Paul Chavard
c73b650f85 feat(attestation): validate attestation tags 2022-11-23 12:26:26 +01:00
Paul Chavard
cafda4f6f0 refactor(attestation_template): move to procedure 2022-11-23 12:26:26 +01:00
Paul Chavard
29bdd82b59 refactor(procedure): types_de_champ -> active_revision.types_de_champ_public 2022-11-17 13:54:14 +01:00
Paul Chavard
e6288c39f2 refactor(dossier): champs -> champs_public 2022-11-10 22:44:39 +00:00
Paul Chavard
95f65900d3 refactor(active_storage): no download on clone 2022-11-10 12:25:55 +00:00
Paul Chavard
5e87539d6d fix(groupe_instructeur): add explicit order to groupe_instructeurs 2022-11-09 10:56:40 +00:00
Eric Leroy-Terquem
aca2775874 remove routee? method 2022-11-04 12:03:44 +01:00
Eric Leroy-Terquem
5578115acf update routee? method 2022-11-04 12:03:43 +01:00
Eric Leroy-Terquem
110953e450 constraint logic to active groups 2022-11-04 12:03:43 +01:00
Paul Chavard
33fc8a45ab feat(emails): show email errors on procedure page 2022-11-04 09:08:41 +00:00
Paul Chavard
dd4c1f2fac feat(emails): validate tags in notification emails 2022-11-04 09:08:41 +00:00
Kara Diaby
661e5f78ac model 2022-11-02 10:19:43 +01:00
simon lehericey
52b7886961 fix(clone): on procedure clone, discard integrity error 2022-11-01 10:17:24 +01:00
Paul Chavard
8cf9aec0f7 refactor(procedure): expose procedure tags on model 2022-10-31 19:50:25 +01:00
Kara Diaby
492c7f377f migration 2022-10-21 19:13:12 +02:00
Eric Leroy-Terquem
c6082ded09 no select for usager if only one groupe_instructeur 2022-10-13 19:49:32 +02:00
Paul Chavard
7f1dd49bdc chore(flipper): always use feature_enabled? helper 2022-10-12 14:14:30 +02:00
Eric Leroy-Terquem
1177d861f4 add validation on routing_criteria_name 2022-10-10 09:48:11 +02:00
Martin
6752da40a9 test(procedure.direction): can we drop this column ? 2022-10-07 18:39:17 +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
bffd9d61a9 add habtm between procedures and zones 2022-10-07 10:48:34 +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
883ba8717f clean(procedure.columns): :durees_conservation_required, :cerfa_flag, :test_started_at 2022-10-05 18:03:49 +02:00
Martin
405a885160 feat(procedure.max_duree_conservation_dossiers_dans_ds): make it more flexible 2022-10-05 17:27:09 +02:00
Paul Chavard
462cc41caa refactor(block): use block? instead of repetition? 2022-09-29 17:49:14 +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
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
Paul Chavard
c05bc61c99 fix(revisions): improuve changes information display 2022-09-07 13:52:44 +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
6e31decc2d feat(Procedure.clone): stop cloning procedure service which is confusing for some administrateurs 2022-08-31 14:56:00 +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
Paul Chavard
48a4e8bec5 chore(db): remove already dropped ignored columns 2022-08-02 15:24:52 +02:00
Martin
05b6b462b6 feat(new_max_duree_conservation): make it configurable for other instances 2022-07-18 14:08:53 +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
Paul Chavard
4d48055158 feat(tags): expose used_type_de_champ_tags 2022-07-07 23:23:17 +02:00
Christophe Robillard
e2348aa8f1 rename publiques scope to opendata 2022-07-06 17:59:03 +02:00