Commit graph

744 commits

Author SHA1 Message Date
Eric Leroy-Terquem
7a95846cba feat(DossierAssignment): always add forced_groupe_instructeur when manual assignment 2023-07-18 16:54:00 +02:00
Eric Leroy-Terquem
0e58e10b82 refactor(DossierAssignment): move create_assignment to assign_to_groupe_instructeur 2023-07-18 16:54:00 +02:00
Eric Leroy-Terquem
488a932cd5 refactor(DossierAssignment): extract method create_assignment 2023-07-18 16:54:00 +02:00
Eric Leroy-Terquem
5f5714678c feat(DossierAsignment): create model 2023-07-18 16:54:00 +02:00
Martin
ce9dbed663 amelioration(NotificationMailer): sort la creation des commentaire sur la messagerie du mailer [trop de prob possible sinon: au retry on dupliquait les commenaitres, si le mail foirait, on commentait pas etc...] 2023-07-11 15:11:40 +02:00
Colin Darie
73a28d2eca
fix(sva): don't process dossiers submitted before sva was enabled 2023-07-11 10:02:47 +02:00
Colin Darie
4c46a2f8da
feat(sva): date in pdf 2023-07-11 10:02:47 +02:00
Colin Darie
8c49dcf21e
feat(sva): exports include SVA devision date 2023-07-11 10:02:47 +02:00
Colin Darie
b4e6c20bbd
feat(sva): log operation when instructeur requests a correction 2023-07-11 10:01:49 +02:00
Colin Darie
d70278a534
refactor(sva): dossier can't repasser en construction without pending correction 2023-07-11 10:01:47 +02:00
Colin Darie
4bdd4310ab
feat(sva): calculcate decision date with corrections delays & resume methods 2023-07-11 10:01:47 +02:00
Colin Darie
5db80ee6de
feat(sva): cron accepts dossiers for each sva procedure 2023-07-11 10:01:47 +02:00
Colin Darie
3612eddf79
feat(sva): accepte automatiquement 2023-07-11 10:01:46 +02:00
Colin Darie
afe373c6b4
feat(sva): transition to en_instruction when (re-)submitting a dossier 2023-07-11 10:01:46 +02:00
Colin Darie
c3480f550d
chore(schema): +dossiers#sva_svr_decision_on, sva_svr_decision_triggered_at 2023-07-11 10:01:46 +02:00
Colin Darie
dfbb824dde
Merge pull request #9260 from colinux/export-corrections
ETQ instructeur: intègre les demandes de corrections dans les PDF
2023-07-04 09:58:07 +00:00
Eric Leroy-Terquem
c82727120c feat(DB): ignore migrated_champ_routage_columns 2023-07-03 14:58:45 +02:00
Eric Leroy-Terquem
7598b0a513 remove previous routing sytem code 2023-07-03 14:58:45 +02:00
Colin Darie
c95f4ab700
refactor(correction): preload corrections for exports 2023-07-03 09:53:24 +02:00
Eric Leroy-Terquem
ce1429b850 migration : add forced_group_instructeur_to_dossier 2023-06-15 14:14:47 +02:00
Paul Chavard
c1afc985e4 fix(prefill): allow private annotations prefill 2023-06-15 10:07:25 +01:00
Colin Darie
b1bcc784bb
refactor(messagerie): preload commentaires with corrections & attachments blobs 2023-06-02 16:18:33 +02:00
Colin Darie
62cc9d30d8
chore(correction): passing en_instruction resolve pending corrections 2023-06-02 16:16:14 +02:00
Colin Darie
5ab44fc7a9
chore: rename dossier_resolution => dossier_correction 2023-06-02 16:16:14 +02:00
Colin Darie
2c79ca94f5
chore(schema): create dossier_corrections 2023-06-02 16:13:15 +02:00
Colin Darie
79f450a422
Merge pull request #9021 from colinux/feat-en-construction-fork
ETQ usager, je modifie et soumets à nouveau mon dossier “en construction"
2023-05-10 19:46:40 +00:00
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
Paul Chavard
025bd5beaf
feat(dossier): dossier can be forked for editing 2023-05-09 15:34:10 +02:00
Martin
386523019d amelioration(instructeurs/procedure#show): ETQ instructeur, je souhaite avoir les mêmes compteurs entreles pages listant mes demarches et la page pour visualiser une démarches 2023-05-09 13:59:49 +02:00
mfo
2374ced5d2
Merge pull request #8987 from mfo/US/link-to-errored-champs
amelioration(dossier#submit_brouillon): ETQ usager, je souhaite pouvoir acceder aux champs en erreur facilement
2023-05-09 07:06:36 +00:00
Paul Chavard
11065946ce fix(instructeur): fix dossiers suivis filter (merge behavior change in rails 7) 2023-05-04 18:24:18 +02:00
Colin Darie
d31016973c
chore(schema): model annotations accordingly to schema 2023-05-03 11:35:31 +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
3678015413
remove scope not_archived for brouillon
Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
2023-04-25 10:56:59 +02:00
Colin Darie
1af404c5e7
chore(rubocop): fix Rails/WhereMissing 2023-04-19 12:55:14 +02:00
Colin Darie
8fa5e0dbb8
chore(rubocop): fix Rails/UnusedIgnoredColumns 2023-04-19 12:55:14 +02:00
Colin Darie
160178b8f8
chore(rubocop): fix Rails/ExpandedDateRange 2023-04-19 12:55:13 +02:00
Lisa Durand
c565ed415b change scope and alert location after UI modification 2023-04-18 12:03:10 +02:00
Paul Chavard
21b548d32b fix(dossier): delete all champs starting with children 2023-04-13 11:08:10 +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
a2f7d1df72 fix(graphql): pendingDeletedSince should not crash 2023-04-06 15:07:48 +02:00
Eric Leroy-Terquem
6f6bbd6ca1 feat(routing): put routing logic behind a feature flag 2023-03-30 10:52:53 +02:00
Paul Chavard
275150d727 feat(graphql): expose pendingDeletedDossiers
fix #8785
2023-03-22 19:40:43 +01:00
Paul Chavard
cbaa77fca7 feat(annotations): activate autosave 2023-03-14 15:22:13 +01:00
Colin Darie
9e6d06fd9c fix(job): attempt to fix a pg timeout int Cron::NotifyDraftNotSubmittedJob 2023-03-08 18:45:02 +01:00
Colin Darie
ae93d3927e refactor(dossier): extract sections logic in a concern 2023-02-27 17:29:22 +01:00
Colin Darie
d7880f7e58 feat(dossier/pdf): header sections numbering 2023-02-27 17:29:22 +01:00
Colin Darie
3de089d6c7 fix(conditional): dynamic title counters using css
Closes #8086
2023-02-27 17:29:22 +01:00
Paul Chavard
eb3039aeca fix(demarche): exclude preview and deleted dossiers from stats 2023-02-23 16:38:40 +01:00
Christophe Robillard
c5acd82e6e update dossiers count when passing to construction 2023-02-21 10:06:07 +01:00
Paul Chavard
8b74a6f39b fix(geometry): implement our own bbox to replace rgeo 2023-02-15 11:58:59 +01:00
Colin Darie
0958053c72 chore(dossier): can destroy dossier having dossier_batch_operations
Ça peut arriver lors des démarches en test, avec des dossiers tests
en cours d'instruction.
2023-02-08 14:42:14 +01:00
Paul Chavard
6924b8e46d feat(dossier): optional repetition champ should not add first row 2023-02-06 11:53:32 +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
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
Lisa Durand
06c6a4ab0c add action 'unfollow' to page 'suivis' 2023-01-16 11:14:29 +01:00
Paul Chavard
5641c2b078 fix(groupe_instructeur): only show to administrators the number of visible files 2023-01-11 21:49:08 +01:00
simon lehericey
bd3fbbce49 add schema and annotation 2023-01-11 11:19:24 +01:00
Paul Chavard
378f3c5fb0 use join table instead of arrays 2023-01-05 16:20:18 +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
Paul Chavard
0b10c73bcf feat(prefill): allow to prefill private annotations 2022-12-26 22:14:17 +00:00
Paul Chavard
4a4ce67ef6 fix(dossier): explicitly send draft notification email 2022-12-26 22:02:33 +00:00
Paul Chavard
f4f38982b4 feat(dossier): rebase after repasser en instruction 2022-12-22 13:44:03 +01:00
Paul Chavard
227296682b fix(dossier): clone should include more attachments 2022-12-20 21:30:32 +01:00
mfo
74cd385b35
Merge pull request #8274 from tchak/fix-parent-dossiers
fix(dossier): parent_dossiers is really cloned_dossiers
2022-12-15 09:20:10 +01: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
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
Paul Chavard
9510142cd8 fix(dossier): parent_dossiers is really cloned_dossiers 2022-12-14 09:44:19 +01:00
sebastiencarceles
373e8aeadb review: validate prefilled champs only 2022-12-08 15:27:39 +01:00
sebastiencarceles
1e21a3d3e1 review: query the db only once 2022-12-08 15:27:39 +01:00
sebastiencarceles
ab30af5fe5 review: move Prefillable to concern directory 2022-12-08 15:27:39 +01:00
sebastiencarceles
3939644030 validate prefilled champs when editing brouillon 2022-12-08 15:27:39 +01:00
sebastiencarceles
79ef48cafb make the dossier prefillable 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
52a32051c4 feat(dossier): add dossier.champs_public_all 2022-12-08 09:38:12 +01:00
Paul Chavard
6ce7064ffd feat(dossier): add repetition champs to champs_for_condition 2022-12-08 09:38:12 +01:00
Paul Chavard
4fe081e4be fix(dossier): send notifications on declarative dossiers 2022-12-07 13:14:59 +01:00
Paul Chavard
bb47e8d2ab fix(dossier): dossier.repasser_en_construction! should take disable_notification 2022-12-07 13:14:59 +01:00
Colin Darie
4ba76e6844 fix(api-v1): dossier -> avis -> piece_justificative_file_attachment relation name 2022-12-06 11:48:42 +01:00
Paul Chavard
ed4d5cb36a refactor(demarche): make declarative demarche processing syncroneous 2022-12-06 11:41:25 +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
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
91f4971df2 feat(champ): has_one_attached => has_many_attached piece_justificative_file 2022-12-05 10:47:10 +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
1fb051c3cc refactor(attestation_template): remove unused code 2022-11-29 19:36:56 +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
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
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
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
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
Martin
cb1726366f correctif(administrateur/procedure/archives#index): ne pas utiliser la table des traitement pour la comptabilisation du nombre de dossier dans une archive car si le dossier a ete accepte [mois n-1], repasse en instruction[mois-n1], accepte[mois-narchive], on se retrouve avec le dossier dans plusieurs archives et des compteurs confusant 2022-11-01 12:43:49 +01:00