Commit graph

2650 commits

Author SHA1 Message Date
Colin Darie
c673950e56 fix(instructeurs): behavior of sort by notifications checkbox (updated_at desc) 2022-12-20 15:51:47 +01:00
Damien Le Thiec
c4e427642f Allow prefill civility 2022-12-20 14:38:05 +01:00
Sébastien Carceles
e4a7a4c391
hide values and examples for unprefillable champs (#8309)
* hide values and examples for unprefillable champs

*  put prefillable champs first
2022-12-20 13:37:25 +00:00
Sébastien Carceles
dd0a05c1d8
feat(prefill): add possible values (#8299)
* update layout in order to show possible values

* filter out non fillable types de champ
2022-12-20 11:04:42 +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
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
Christophe Robillard
f1595d1f50 wrap resultset tuples in ProcedureDetail 2022-12-16 15:51:49 +01:00
Christophe Robillard
3a660349ad export all demarches 2022-12-16 15:51:49 +01:00
Eric Leroy-Terquem
2645ac85f7 update wording and order in types de champ select 2022-12-16 09:30:36 +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
Colin Darie
7ff04c1a05
style(instructeurs): human/i18n value for state filter 2022-12-15 09:34:10 +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
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
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
ece70efbea refactor(dossier): improuve dossiers_safe_scope on batch operation 2022-12-14 09:45:53 +01:00
Paul Chavard
9510142cd8 fix(dossier): parent_dossiers is really cloned_dossiers 2022-12-14 09:44:19 +01:00
Paul Chavard
7929b7d0d7 clean(api_token): remove administrateur token support 2022-12-08 17:35:21 +01:00
sebastiencarceles
69d61913f5 review: unauthorize complex champs 2022-12-08 15:27:39 +01:00
sebastiencarceles
bf03e3b35a review: prefix typed ids with 'champ_' 2022-12-08 15:27:39 +01:00
sebastiencarceles
11fed2c934 review: champs exist because stable ids exist 2022-12-08 15:27:39 +01:00
sebastiencarceles
a5c1c68a91 review: style 2022-12-08 15:27:39 +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
Damien Le Thiec
006a1257b5 Refacto prefill_params construction (remove merge) 2022-12-08 15:27:39 +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
f4e1a09e73 prepare prefilled values from ctrl params 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
simon lehericey
86cda6a0b9 fix(timestamp spec): rewind io after before_save check 2022-12-07 19:28:01 +01:00
Paul Chavard
ebbada752f feat(api_token): add APIToken model 2022-12-07 18:19:37 +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
f4d403a81c fix(apiv1): piece_justificative continue to returns a single attachment 2022-12-06 15:47:06 +01:00
Martin
2eaa06b22b correctif(export.pjs): sur l'export, les champs de type piece justificative renvoyent un tableau de la meme dimension quelque soit le nombre de pj joint 2022-12-06 15:22:53 +01:00
Paul Chavard
b8a9b7223c refactor(groupe_instructeur): improuve controller 2022-12-06 12:01:54 +01:00
Paul Chavard
9fe93ded7f refactor(groupe_instructeur): add instructeur.find_or_invite 2022-12-06 12:01:54 +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
91ef618a42 clean(code): stick to usage of present?/empty? instead of count zero etc 2022-12-06 11:28:48 +01:00
Martin
b5f69c8961 review(dossier.reload): evite de recharger le batch qui peut etre confusant 2022-12-06 11:28:48 +01:00
Martin
7c65af3be0 poc(batch_operation_alert): simplier wording 2022-12-06 11:28:48 +01:00
Martin
ea8bd13bcf poc(batch_operation.purge): nettoie les batch terminé ou inutiles 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
4266ab93c5 poc(batch_operation): track dossier processed safely 2022-12-06 11:28:48 +01:00
Martin
beb39027d0 poc(batch_operation.ui): implement simple ui to trigger a batch of current page 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
Martin
b11dbafc59 poc(batch_operation_job): implement archive dossiers with async behaviour, lock, run_at, finished_at, failed_dossier_ids, success_dossier_ids 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
b13c5e56f6 refactor(piece_justificative): UX follows mockups 2022-12-05 10:47:10 +01:00
Colin Darie
0014ce4b91 chore(schema): +procedures#piece_justificative_multiple 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
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
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
Paul Chavard
06f43f99d0 fix(dossier): excluded deleted dossiers from demarche overview 2022-11-29 16:41:31 +01:00
simon lehericey
dcae06ae84 fix(avis_controller): index do not linked to revoked avis 2022-11-29 16:21:06 +01:00
simon lehericey
f96a7f432c clean(dossier): useless method 2022-11-29 15:33:10 +01:00
Paul Chavard
53eb3e6ad0 chore(dossier): cleanup champs nested attributes 2022-11-29 11:10:59 +01:00
Paul Chavard
a760e0a698 feat(demarche): enable revisions for all 2022-11-24 17:35:33 +01:00
Paul Chavard
7a35a253a0 chore(dossier): cleanup clone champ 2022-11-24 16:25:27 +01:00
Christophe Robillard
1003a24711 remove useless spaces 2022-11-24 15:05:46 +01:00
Christophe Robillard
3539b00652 search admins by email 2022-11-24 15:05:46 +01:00
Paul Chavard
234975b806 feat(graphql): expose groupe_instructeur state and update mutation 2022-11-24 14:33:29 +01:00
Paul Chavard
405d2a695f refactor(attestation_template): remove from revisions 2022-11-23 12:26:26 +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
c0fd080d0e refactor(operation_log): store data in jsonb instead of files 2022-11-22 18:06:05 +01:00
Paul Chavard
e4bf1bd2db feat(dossier): add data to DossierOperationLog 2022-11-22 18:06:05 +01:00
Christophe Robillard
8e95c6a2ba search procedures by libelle 2022-11-22 17:08:17 +01:00
simon lehericey
4babee2591 fix(admin): ignore active column
the attribut should be retrieve from the user model as the administrateur is no more a devise model
2022-11-22 16:41:20 +01:00
simon lehericey
fe35a8a6e7 fix(cni): only allow jpg and png because of buggy pdf watermarking 2022-11-21 17:53:29 +01:00
Lisa Durand
3953470c78 remove change on api V1 and update graphql for sensitive data 2022-11-18 11:15:16 +01:00
Lisa Durand
f34c890278 add a label for api and export for sensitive data as titre_identite_champ 2022-11-18 11:15:16 +01:00
Paul Chavard
0c0618aa79 feat(export): add GeoJSON export 2022-11-18 10:04:35 +01:00
simon lehericey
66e9b74121 feat(manager): select team_user base on attribute 2022-11-17 16:29:08 +01:00
Paul Chavard
29bdd82b59 refactor(procedure): types_de_champ -> active_revision.types_de_champ_public 2022-11-17 13:54:14 +01:00
simon lehericey
9ed42b316f refactor(user): administration -> super_admin
delete_and_keep_track_dossier_also_delete_user is only called by super admin
2022-11-16 17:52:48 +01:00
simon lehericey
99871b6ba6 refactor(user): introduce method to only delete dossier 2022-11-16 17:52:47 +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
Paul Chavard
c1ae9d03be feat(export): show refresh button sooner 2022-11-16 08:49:37 +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
Christophe Robillard
cc35788d26 extract computation to controller 2022-11-10 18:02:20 +01:00
Christophe Robillard
5f5b6bf7c7 use specific route for all admins 2022-11-10 18:02:20 +01:00
Christophe Robillard
c96781cfad list all admins 2022-11-10 18:02:20 +01: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
Christophe Robillard
87832f6eb2 fix pagination bug 2022-11-09 10:41:06 +01:00
Christophe Robillard
a5fa21ca1b add from_publication_date filter 2022-11-09 10:41:06 +01:00
Martin
b3f80dc5f9 amelioration(Procedure.revision_changes): ajout du support pour les texte complementaire affichable au clique des champs de type explication
Co-authored-by: Paul Chavard <github@paul.chavard.net>
2022-11-08 17:49:24 +01:00
Martin
df54dc04a4 amelioration(champ.explication): ajout du support pour avoir un menu depliant avec plus d'information sur un champs explication
amelioration(champ.explication): ajout du support pour avoir un menu depliant avec plus d'information sur un champs explication
2022-11-08 17:49:24 +01:00
Martin
fe0411203f amelioration(types_de_champ/editor): en mode edition d'un champ de type explication, permet de choisir d'afficher ou pas cette explication derriere un collapse 2022-11-08 17:49:24 +01:00
Martin
0d675d4ee5 amelioration(Champ.titre-d-identite): ajout du support pour les .pdf 2022-11-08 16:27:06 +01:00
Christophe Robillard
c0231dffa2 extract ProceduresFilter class 2022-11-08 12:14:26 +01:00
Martin
bd28c29856 amelioration(manager): ajout de la visualisation des comptes marqués comme membre de l'equipe 2022-11-08 09:55:21 +01:00
Martin
c9292e7ba8 amelioration(bdd): mise en place d'un flag pour identifier les anciens comptes d'admin de DS 2022-11-08 09:55:21 +01:00
simon lehericey
1760ccbc01 fix(merge): transfers hidden procedures 2022-11-07 14:11:05 +01:00
Paul Chavard
1e8a440166 feat(graphql): expose deleted dossiers on groupe instructeur 2022-11-04 11:49:27 +00:00
Eric Leroy-Terquem
aca2775874 remove routee? method 2022-11-04 12:03:44 +01:00
Eric Leroy-Terquem
b51770c151 toggle routing after groupe instructeur update 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
Eric Leroy-Terquem
63ae328bee update wording and cards order 2022-11-04 12:03:43 +01:00
Eric Leroy-Terquem
b419c48262 toggle routing when adding or deleting groupe_instructeurs 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
Paul Chavard
91a662fdb9 fix(graphql): make sure dossiers are always loaded with appropriate scope 2022-11-02 11:25:26 +01:00
Kara Diaby
661e5f78ac model 2022-11-02 10:19:43 +01:00
Martin
ef2064a603 nettoyage(Traitement): supprime une methode morte 2022-11-01 12:43:49 +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
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
Christophe Robillard
9abf1c4af3 list all demarches, filtered by zones 2022-10-31 16:12:02 +01:00
Christophe Robillard
f9f31b721a get zones of an admin 2022-10-31 16:12:02 +01:00
Martin
60dc6a3912 correctif(export.global): Export.find_for_groupe_instructeurs remonte les exports globaux même lorsqu'il y a une procedure presentation 2022-10-31 14:32:17 +01:00
Colin Darie
3a06e7e0b3 refactor(tdc): convert fill duration in Duration objects 2022-10-31 12:17:16 +01:00
Colin Darie
010c9a0dcb feat(procedure): includes read duration of explication/non fillable champs
Long explications can significantly increase global fill duration,
so we can't ignore them.

Closes #7963
2022-10-31 12:17:16 +01:00
Colin Darie
7731c6ad64 feat(procedure): estimate fill duration takes account of libelle & description read time
Sometimes long description on types de champ
significantly increases global fill duration.

140 words per minute is a good estimate of attentive off-voice read time.
(This is independent of characters per word).

Closes #7963
2022-10-31 12:17:16 +01:00
Martin
5ced9fb431 chore(create_procedure_presentation): homogénéise l'interface sur les procédure présentation. pas d'objet 'build', sinon les export/filtres deviennent compliqués 2022-10-31 09:29:27 +01:00
Martin
50c43f4819 correct(export): la creation d'archive pour un groupe d'instructeur, avec des filtres differents et identique doit etre consistante 2022-10-31 09:29:27 +01:00
Colin Darie
9f2fa5ee1c fix(invitation): don't fail when dossier is hidden & user signed on another account
Suite de 45994ff567
Cf https://sentry.io/organizations/demarches-simplifiees/issues/3422144920/events/e1c83ea74dbc410ea22aa17ef29fb329/?project=1429550
2022-10-28 08:56:03 +02:00
simon lehericey
4c98b8f01c fix(merge): ensure service transfert always works 2022-10-27 12:44:02 +02:00
simon lehericey
44aff1a293 fix(silent_error_in_merge): raise if merge update fail 2022-10-26 23:27:53 +02:00
simon lehericey
6af4fe624a refactor(service): explicit call to service job to avoid test side effect 2022-10-25 14:44:43 +02:00
Kara Diaby
492c7f377f migration 2022-10-21 19:13:12 +02: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
Colin Darie
45994ff567 fix(invitation): when dossier is not visible anymore
https://sentry.io/organizations/demarches-simplifiees/issues/3422144920/
2022-10-20 09:08:36 +02:00
Martin
576aa2c1e0 amelioration(export): augment la duree de conservation des exports en cours de generation passant de 12 a 16h. augment la duree de conservation des exports generés passant de 16 à 32h 2022-10-20 06:32:41 +02:00
simon lehericey
5fa5d46d8c fix(admin_merge): a case where 2 admins have the same service 2022-10-19 16:54:34 +02:00
Paul Chavard
5be8810da4 fix(dossier): nullify instructeur and expert id on messages when they are deleted
we keep email on the message so it will be used when instructeur or expert are not available
2022-10-19 11:53:10 +02: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
9bba2093be refactor(champ): mandatory_blank_and_visible? -> mandatory_blank?
As the method does not check visibility
2022-10-18 11:13:41 +02:00