Commit graph

285 commits

Author SHA1 Message Date
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
Colin Darie
c95f4ab700
refactor(correction): preload corrections for exports 2023-07-03 09:53:24 +02:00
Martin
c52c0e4573 correctif(dossier.en_construction): ETQ usager, je souhaite pouvoir modifier un dossier ayant des repetition ayant des enfants 2023-06-30 12:09:54 +02:00
Colin Darie
cf1285dd42 fix(rebase): ensure dossier.champs is up to date after creating a child 2023-06-23 01:01:39 +02:00
Colin Darie
8501fbadbb fix(dossier): can merge fork after rebase adding a champ in repetition 2023-06-23 00:22:32 +02:00
Colin Darie
acc6456b08
Merge pull request #9201 from demarches-simplifiees/user-dashboard/add-filter-a-corriger
[refonte usager] Tableau de bord - remonter les dossiers à corriger
2023-06-19 19:21:32 +00:00
Lisa Durand
52bbd47ebe add constant for 'à_corriger' 2023-06-19 16:16:44 +02:00
Lisa Durand
bcc37f4130 change states filter from checkbox to select and add 'a_corriger' 2023-06-15 18:17:36 +02:00
Paul Chavard
c1afc985e4 fix(prefill): allow private annotations prefill 2023-06-15 10:07:25 +01:00
Paul Chavard
10524643fb fix(hack): fix and test hack for procedures using groupe instructeur api 2023-06-14 19:24:58 +01:00
Colin Darie
52c8553576
fix(dossier_correction): don't allow to save with a missing (invalid) commentaire 2023-06-02 16:18:33 +02:00
Colin Darie
b495e0aff0
feat(user): dossier résumé with commentaire about corrections 2023-06-02 16:18:32 +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
ca3b127942
feat(instructeur): can flag a dossier as "pending corrections" 2023-06-02 16:16:12 +02:00
Colin Darie
d73b96ea40
feat(dossier): pending resolution state 2023-06-02 16:13:16 +02:00
Colin Darie
2c79ca94f5
chore(schema): create dossier_corrections 2023-06-02 16:13:15 +02:00
Colin Darie
795e0ca471
fix(fork): can fork a dossier having invalid champs so it can be fixed in brouillon 2023-05-24 12:15:43 +02:00
Colin Darie
d16b81e09c fix(rebase): don't fail on force rebased when procedure is still in draft 2023-05-22 13:50:58 +02:00
Colin Darie
0d21450f8a
fix(fork): don't let active storage override our champ#updated_at after a transaction 2023-05-15 11:08:07 +02:00
Paul Chavard
b4a299c326 fix(user): always rebase original dossier before merge 2023-05-12 20:42:02 +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
218c7d08c2
feat(fork): mark a fork as stale for future deletion, so it can't be reused 2023-05-09 18:49:53 +02:00
Colin Darie
c35176703f
feat(dossier): inform dossier en_construction having not submitted changes 2023-05-09 18:49:52 +02: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
LeSim
d0bb759d3d
Merge pull request #8997 from demarches-simplifiees/add_defaut_procedure_for_new_admin
ETQ admin, je veux avoir une première démarche pré remplie lorsque j'arrive sur ds
2023-05-09 16:38:55 +00:00
Paul Chavard
025bd5beaf
feat(dossier): dossier can be forked for editing 2023-05-09 15:34:10 +02:00
simon lehericey
9c8020b05c feat(admin): add initiation procedure for a new admin 2023-05-03 15:08:21 +02:00
Nicolas Cavigneaux
388ccca263
fix redefinition of signed_id Rails method by supporting options as arg 2023-05-03 11:35:28 +02:00
simon lehericey
e64ac79f05 tech(refactor): much nicer code, thx LeSim
root -> rooted_tree

depth_cach -> walk

smal refactor

comment

remove form for header_section

remove seen_at from header section

header_section: champ -> header_section

champ_subree: remove if not

remove root_depth use header_section_level_value instead

remove unused include

remove ChampTreeComponent

rename ChampsSubtreeComponent to SectionComponent

use TreeableConcern only in section component

remove fields_for_champ_component

champs -> tail

add split_section_champ helper

refactor(editable_champ::header_section): keep same interface everywhere

fix(repetition): add spec for SectionComponent on repetitions
2023-04-20 08:22:02 +02:00
Martin
3b5d1bd55b tech(remaniement): extraction du passage d'une liste de champs a un simili arbre 2023-04-20 08:22:02 +02:00
Colin Darie
e9649b667e
chore(rubocop): fix Rails/IgnoredColumnsAssignment 2023-04-19 12:55:14 +02:00
Colin Darie
7aba5ccc3e
chore(rubocop): fix Rails/DurationArithmetic 2023-04-19 12:55:13 +02:00
Paul Chavard
ee1df3f05f fix(dossier): fix rebasing submitted dossiers private champs type changes 2023-03-22 11:43:08 +01:00
Colin Darie
954652fcf5
fix(champ): may fix pg deadlocks: autosave already saves value at the same time 2023-03-20 14:32:14 +01:00
Colin Darie
f33d192142 fix(dossier): don't auto-number header sections in repetitions 2023-03-09 16:15:56 +01:00
Martin
5e24c0e19a correctif(dossier.export.pdf): l'export au format pdf d'un dossier ayant un champ de type repetition contenant un titre est bien sous-sectionné 2023-03-07 07:00:28 +01:00
Colin Darie
ae93d3927e refactor(dossier): extract sections logic in a concern 2023-02-27 17:29:22 +01:00
sebastiencarceles
39545671f3 refacto: better error management 2023-02-27 14:35:11 +01:00
sebastiencarceles
33fa40eda2 don't clean the rna champ value
Cleaning the value is useless, when fetching the association,
as the value will be re-written by the dossier update, when the user
fills in the dossier.

Furthermore we need the value to persist when prefilling the champ.
2023-02-27 14:35:11 +01:00
sebastiencarceles
7d65a34bc6 rna champ can fetch it's own association 2023-02-27 14:31:58 +01:00
sebastiencarceles
30eef3e128 review: detailled error message 2023-02-27 13:45:16 +01:00
Sébastien Carceles
2ad4e4c01f refacto: better error management 2023-02-27 13:45:16 +01:00
Sébastien Carceles
df2eaa9542 don't clean the siret champ value
Cleaning the value is useless, when fetching the etablissement,
as the value will be re-written by the dossier update, when the user
fills in the dossier.
2023-02-27 13:45:16 +01:00
Sébastien Carceles
5876dab096 siret champ can fetch it's own etablissement 2023-02-27 13:39:31 +01:00
Damien Le Thiec
67bbacbb05
Merge pull request #8513 from demarches-simplifiees/feature/prefill_repetible
Prefill repeatable
2023-02-27 09:58:53 +00:00
Paul Chavard
21f47dcb01 feat(procedure): include deleted dossiers in stats 2023-02-23 17:14:25 +01:00
Paul Chavard
eb3039aeca fix(demarche): exclude preview and deleted dossiers from stats 2023-02-23 16:38:40 +01:00
Damien Le Thiec
ca29079c27 Fix rubocop 2023-02-22 19:40:52 +01:00
Damien Le Thiec
fbe4fe251a Fix format prefill repetition 2023-02-22 19:32:25 +01:00
Damien Le Thiec
dce4c84f9a Merge branch 'main' into feature/prefill_repetible 2023-02-16 17:08:30 +01:00
Paul Chavard
c0ad7853cb fix(administrateur): procedure page n+1 2023-02-16 11:29:21 +01:00
Damien Le Thiec
2533ca50d4 Merge branch 'main' into feature/prefill_repetible 2023-02-15 11:07:56 +01:00
Damien Le Thiec
dbb92e7fd3 Merge branch 'main' into feature/prefill_repetible 2023-02-11 22:40:56 +01:00
Colin Darie
aeb602a63d fix(mail): default subject fallback when subject template is empty
Closes #8448
2023-02-09 17:49:43 +01:00
Paul Chavard
1693e46acb fix(dossier): prevent crash when updating champs in rebase 2023-02-08 14:56:26 +01:00
Paul Chavard
6924b8e46d feat(dossier): optional repetition champ should not add first row 2023-02-06 11:53:32 +01:00
Damien Le Thiec
63e7c17fda First tests for prefill repetition 2023-02-03 12:14:18 +01:00
Paul Chavard
2971100081 fix(dossier): do not try to rebase if procedure is not published 2023-02-02 10:11:46 +01:00
Paul Chavard
9c83939431 fix(dossier): fix adding repetition in a new revision 2023-02-01 10:36:46 +01:00
Damien Le Thiec
d7b01255fe Merge branch 'main' into feature/prefill_repetible 2023-01-31 16:39:00 +01:00
Damien Le Thiec
20ba96ba3c POST working with prefill query example for repeating fields 2023-01-31 14:54:23 +01:00
Paul Chavard
dcbe16603a fix(dossier): fix parser with dashes 2023-01-31 10:40:48 +01:00
Paul Chavard
6cacfbdf32 refactor(dossier): refactor rebase 2023-01-30 12:01:11 +01:00
Paul Chavard
2f4e85f163 fix(dossier): set rebased_at only on changed champs 2023-01-30 12:01:11 +01:00
Paul Chavard
626b28ca16 perf(tags parser): improuve parser perf 2023-01-30 11:52:35 +01:00
Damien Le Thiec
81df033282 First draft repeatable 2023-01-26 17:57:57 +01:00
Colin Darie
51c1736d00 refactor(conditional): extract in a ChampConditionalConcern with tests 2023-01-26 09:06:30 +01:00
Sébastien Carceles
0046338e6a
fix(prefill): don't mark the dossier as prefilled when it's not (#8464)
A dossier should not be marked as prefilled when it's not, meaning
when no prefill params are given.
2023-01-19 10:51:56 +00:00
Paul Chavard
afc1f12028 feat(graphql): implement add/remove instructeurs via API 2023-01-10 20:33:35 +01:00
Paul Chavard
af33d5d65c refactor(repetition): use row_id instead of row 2023-01-10 19:31:41 +01:00
Paul Chavard
5a4cefc5c5 fix(dossier): fix rebase with drop down options 2023-01-06 14:15:46 +01:00
Paul Chavard
dfe65136be refactor(repetition): add row_id to champs 2023-01-05 18:04:54 +01:00
Paul Chavard
26e02c7173 fix(template): trix will transform double spaces in   2023-01-05 13:23:24 +01:00
Paul Chavard
c4a30084fe refactor(virus_scan): remove lock 2023-01-04 12:12:11 +01:00
Paul Chavard
6e18090fb3 refactor(virus_scan_result): use column instead of metadata on blob 2023-01-04 12:12:11 +01:00
Paul Chavard
d469bca0ae refactor(watermark): use column instead of metadata on blob 2023-01-04 12:07:08 +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
9b3fa4dd3c refactor(revision): changes should be domain objects 2022-12-27 10:58:53 +00:00
Paul Chavard
0b10c73bcf feat(prefill): allow to prefill private annotations 2022-12-26 22:14:17 +00:00
mfo
e3bf0d8fec
Merge pull request #8327 from tchak/feat-rebase-after-repasser-en-instruction
feat(dossier): rebase after repasser en instruction
2022-12-22 13:50:43 +01:00
Paul Chavard
6363206c44 fix(dossier): when rebase creates a champ always push in to champs 2022-12-22 13:44:03 +01:00
Paul Chavard
4c516a6991 feat(dossier): allow to rebase champs with value made mandatory 2022-12-22 13:08:04 +01:00
Martin
dd74834689 amelioration(attestation.et.mail): desactive les tags sur les champs conditionnés et informe l'usager que ca arrivera 2022-12-19 09:28:46 +01:00
Paul Chavard
59bdd4bd92 fix(tags): relax parser roules 2022-12-14 17:53:36 +01:00
Paul Chavard
9149e0fcd7 feat(revision): allow more dossiers to rebase 2022-12-14 17:42:27 +01:00
Sébastien Carceles
9dfb498806 review: prefer if to unless
Co-authored-by: LeSim <mail@simon.lehericey.net>
2022-12-08 15:27:39 +01:00
sebastiencarceles
373e8aeadb review: validate prefilled champs only 2022-12-08 15:27:39 +01:00
sebastiencarceles
ab30af5fe5 review: move Prefillable to concern directory 2022-12-08 15:27:39 +01:00
Colin Darie
b13c5e56f6 refactor(piece_justificative): UX follows mockups 2022-12-05 10:47:10 +01:00
Paul Chavard
405d2a695f refactor(attestation_template): remove from revisions 2022-11-23 12:26:26 +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
Paul Chavard
33fc8a45ab feat(emails): show email errors on procedure page 2022-11-04 09:08:41 +00: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
432c4690b5 feat(tags): replace regexp based parser with a parser combinator 2022-10-05 11:25:37 +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
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
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