Commit graph

394 commits

Author SHA1 Message Date
Colin Darie
f6ebfe0e47
fix(dossier): sync search_terms after merge
Use a job instead of a lot of reloads
2023-05-09 18:49:52 +02:00
Paul Chavard
71cfe094aa
fix(groupe_instructeur): always use assign_to_groupe_instructeur method 2023-05-09 17:23:23 +02:00
Martin
c8ab1e8e03 amelioration(dossier#submit_brouillon): ETQ usager, je souhaite pouvoir acceder aux champs en erreur facilement 2023-05-03 07:36:42 +02:00
Lisa Durand
26ff82dbe4 Merge branch 'main' of github.com:betagouv/demarches-simplifiees.fr into user-dashboard/add-alert-WIP-last-dossier 2023-04-25 13:01:40 +02:00
Lisa Durand
c565ed415b change scope and alert location after UI modification 2023-04-18 12:03:10 +02:00
Paul Chavard
5abb6a8f12 chore(spec): remove memory store cache from tests 2023-04-13 13:10:23 +02:00
Lisa Durand
bc3e67ab94 add alert on user dashboard to edit last editable dossier 2023-04-11 15:50:17 +02:00
Paul Chavard
2a48228552 fix(dossier): improuve commune champ rendering in pdf 2023-04-04 16:01:16 +02:00
Paul Chavard
00fc2f519f chore(spec): fix commune spec 2023-03-29 15:42:33 +02:00
Martin
401ead47f0 bug(dossier.export.pdf): l'export au format pdf d'un dossier ayant un champ de type repetition contenant un titre est bizarre 2023-03-07 07:00:28 +01:00
Damien Le Thiec
731cd56594 Merge branch 'main' into feature/prefill_repetible 2023-02-22 19:49:06 +01:00
Christophe Robillard
c5acd82e6e update dossiers count when passing to construction 2023-02-21 10:06:07 +01:00
Damien Le Thiec
4876d583b6 Merge branch 'main' into feature/prefill_repetible 2023-02-15 17:39:19 +01:00
Paul Chavard
8b74a6f39b fix(geometry): implement our own bbox to replace rgeo 2023-02-15 11:58:59 +01:00
Damien Le Thiec
63e7c17fda First tests for prefill repetition 2023-02-03 12:14:18 +01:00
Damien Le Thiec
d7b01255fe Merge branch 'main' into feature/prefill_repetible 2023-01-31 16:39:00 +01:00
Paul Chavard
298721f90d fix(dossier): fix clone with data 2023-01-30 10:58:26 +01:00
Colin Darie
923ee59e92 refactor(instructeurs/perf): don't load anymore geo areas for each champ because of header
Economise 1 requête par champ sur chaque page instructeur d'un dossier
à cause du header juste pour savoir s'il faut afficher
le bouton d'export GeoJSON.
2023-01-26 14:57:45 +01:00
Sébastien Carceles
49ce255e29
feat(dossier): prefill region champ (#8442)
* make regions champ prefillable

* add possible and example value

* add external_id and value validation
2023-01-24 11:25:17 +00:00
Colin Darie
428dd9bf1a fix(dossier): we can't terminer any dossier having etablissements in degraded mode
Closes #8449
2023-01-18 19:23:25 +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
Martin
186d4e6539 correctif(ChampDepartement): gere les departement a 3 codes 2022-12-27 14:55:57 +01:00
Paul Chavard
4a4ce67ef6 fix(dossier): explicitly send draft notification email 2022-12-26 22:02:33 +00:00
Paul Chavard
243a8301bb fix(dossier): authorize passage en instruction if auto archive is on and is in the past 2022-12-14 22:16:13 +01:00
sebastiencarceles
1e21a3d3e1 review: query the db only once 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
bb47e8d2ab fix(dossier): dossier.repasser_en_construction! should take disable_notification 2022-12-07 13:14:59 +01:00
Martin
61f4cded75 poc(batch_operation): just the model and some specs and a poc for archive them without async 2022-12-06 11:28:48 +01:00
Colin Darie
7cbe6bbaa4 fix(attachment): clone piece justificatives with multiple attachments 2022-12-05 10:47:10 +01:00
Paul Chavard
c5901fbb95 clean(type_de_champ): remove magic factory 2022-12-01 16:36:59 +01:00
simon lehericey
f96a7f432c clean(dossier): useless method 2022-11-29 15:33:10 +01:00
Paul Chavard
cafda4f6f0 refactor(attestation_template): move to procedure 2022-11-23 12:26:26 +01:00
Paul Chavard
c0fd080d0e refactor(operation_log): store data in jsonb instead of files 2022-11-22 18:06:05 +01:00
Paul Chavard
0c0618aa79 feat(export): add GeoJSON export 2022-11-18 10:04:35 +01:00
Paul Chavard
29bdd82b59 refactor(procedure): types_de_champ -> active_revision.types_de_champ_public 2022-11-17 13:54:14 +01:00
Martin
18b7f4e4fa remaniement(dossier.clone): simplifications, pas de callback/after, pas d'heritage, mm interface pour cloner les champs public/prive, clonage des PJs avec le nouveau service de clone, ajoute une cle etrangere sur la colonne parent_dossier_id 2022-11-14 09:53:19 +01:00
Martin
90f7d265c6 amelioration(clone.piece_justificative): gestion du clonage des piece justificative dans une tache asynchrone 2022-11-14 09:13:54 +01:00
Martin
844004818a amelioration(dossier.clone): dossier.clone, permet de cloner un dossier 2022-11-14 09:13:52 +01:00
Paul Chavard
e6288c39f2 refactor(dossier): champs -> champs_public 2022-11-10 22:44:39 +00:00
Martin
1b1568b2c2 remaniement(Administrateurs::ArchivesController): ne passe pas par la table des traitement pour compter le nombre de dossier traites par mois. Depuis que nous avons redescendu la colonne processed_at sur la table dossiers, ce n'\est plus necessaire et le code est compliqué a comprendre 2022-11-01 12:43:49 +01: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
d5d031e15d fix(export): do not export invisible champ 2022-10-14 10:30:27 +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
Christophe Robillard
bdcb451d3c procedure publiee must have one zone at least 2022-10-07 10:48:35 +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
Paul Chavard
bbca7344e5 fix(conditional): mandatory champs inside hidden repetition should not be validated 2022-08-04 14:48:40 +02:00
Paul Chavard
2d7803cd48 refactor(spec): use new procedure.types_de_champ factory 2022-08-04 12:10:32 +02:00
Paul Chavard
adfc4f8cdd test(dossier): improuve destroy spec 2022-07-06 11:12:14 +02:00
simon lehericey
5ebaf59fdb parent_id -> parent_stable_id 2022-07-05 11:53:18 +02:00