Commit graph

4428 commits

Author SHA1 Message Date
simon lehericey
8e75b6ff77 fix(send_dossier): avoid leaking instructeur emails 2023-01-17 16:57:56 +01:00
Colin Darie
ce7e674159 feat(mailer): make errors interceptable by jobs so they will retry
Comme on intercepte chaque `StandardError` pour le monitoring des mails
en erreur, l'erreur n'était plus visible par le job, et les emails
étaient perdus.

A la place on re-raise une autre erreur pour que le job échoue afin de
retry plus tard. Pour ne pas être "avalée" par le rescue_from,
cette erreur doit héritée d'`Exception` plutôt que `StandardError`.

NB: il faudrait parvenir à écrire un test pour vérifier ce comportement.

Pour être vérifié en dev, il faut activer `raise_delivery_errors`
comme en production.
2023-01-17 14:26:11 +01:00
Paul Chavard
44488c7014 feat(dossier): use select in filters bygroupe instructeur 2023-01-16 14:00:08 +01:00
Martin
0aba708b34 correctif(spec): associe le dossier suivis a l'instructeur du batch operation. sinon c'est un autre instructeur qui est crée 2023-01-16 11:14:29 +01:00
Lisa Durand
8fbb866aba fix component spec 2023-01-16 11:14:29 +01:00
Lisa Durand
db3085fa33 design : make filter buttons tertiary and dropdown secondary 2023-01-16 11:14:29 +01:00
Lisa Durand
06c6a4ab0c add action 'unfollow' to page 'suivis' 2023-01-16 11:14:29 +01:00
Lisa Durand
2f666b487e add action 'repasser en construction' to page 'suivis' 2023-01-16 11:14:29 +01:00
Damien Le Thiec
5e26acb0e1
Make date and datetime prefillable (#8304)
* Make date and datetime prefillable

* Format in ISO8601 format
2023-01-12 17:42:02 +01:00
François Vantomme
e794d4f77b
fix(procedure): deal nicely with custom NEW_MAX_DUREE_CONSERVATION 2023-01-12 14:37:54 +01:00
Paul Chavard
289d48f697 refactor(js): use autosubmit controller in filter_component 2023-01-12 11:58:46 +01:00
Paul Chavard
b663939674 feat(graphql): add demarcheCloner mutation 2023-01-11 23:38:12 +01:00
Martin
d535735155 amelioration(devise_mailer): oriente les mails de devise vers un fournisseur quand cela est configuré 2023-01-11 17:13:05 +01:00
Martin
733ba01695 amelioration(balancer_delivery_method): implemente le fait de forcer la methode de delivery au niveau de notre balancer de fournisseur demail 2023-01-11 17:13:05 +01:00
Lisa Durand
8ba13cb685 humanize raison sociale from api_entreprise in adapter 2023-01-11 14:42:38 +01:00
simon lehericey
528b2c2b88 fix(procedure): valid juridique on create and publication 2023-01-11 14:05:17 +01:00
simon lehericey
9043bed3a0 refactor(procedure_presentation): add required tags 2023-01-11 14:05:17 +01:00
Colin Darie
820cb4bd27 fix(rna): some associations don't have date_publication
https://sentry.io/organizations/demarches-simplifiees/issues/3698792231/events/fde901fac5a44129adcafc891d59d086/?project=1429550
2023-01-11 12:30:02 +01:00
François Vantomme
fe518fed8c refactor(links): move FAQ from footer to common scope 2023-01-11 11:28:03 +01:00
François Vantomme
faa5dda761 refactor(links): use FAQ URL locale everywhere 2023-01-11 11:28:03 +01:00
Colin Darie
05b517a847
fix(mailer): observers on balancer and balanced delivery methods
- Les observers doivent être déclarés *avant*
  le chargement de nos delivery methods (Sendinblue & Dolist),
  sinon ils seront ignorés par ces derniers

- dans le balancer, on ne peut pas appeler `.deliver` une seconde fois,
  sinon les observers (et interceptors) sont invoqués deux fois.
2023-01-11 00:57:16 +01: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
Lisa Durand
7abf51ca81 split filter in 2 partials too display filters tags on its own div to have more spaces 2023-01-10 18:05:23 +01:00
François Vantomme
0e3fe055e4
fix(archive): typo on flash notice 2023-01-10 17:23:48 +01:00
Colin Darie
d58e6a2f9c refactor(email): remove pseudonymization, it will be done at dump-time 2023-01-10 16:07:35 +01:00
Colin Darie
b9c1799e60 refactor(mailer): shared error concern 2023-01-10 16:07:35 +01:00
Colin Darie
0a22c1d2f0 chore(email): log smtp errors 2023-01-10 16:07:35 +01:00
Colin Darie
6cb2389eef chore(email): add an observer which log the emails dispatched 2023-01-10 16:07:35 +01:00
Lisa Durand
25a7fa5a34 add bulk action 'follow' 2023-01-09 11:58:51 +01:00
Sébastien Carceles
177dec2bdb
feat(dossier): add dossier id to prefill response (#8382) 2023-01-06 13:46:27 +00:00
Paul Chavard
5a4cefc5c5 fix(dossier): fix rebase with drop down options 2023-01-06 14:15:46 +01:00
Sébastien Carceles
06b8a0f734
feat(dossier): prefill boolean champs (#8381) 2023-01-06 14:01:59 +01:00
Paul Chavard
940f8c0474 fix(graphql): fix departements with alphanumeric codes 2023-01-05 17:33:03 +01:00
Lisa Durand
080747f60b reorganise multiple buttons on top of table from instructeur procedure view 2023-01-05 17:22:53 +01:00
Martin
3918757dc9 correctif(test): desormais l'association batch_operations.groupe_instructeurs passe par le dossier. Mise a jour des tests 2023-01-05 16:20:18 +01:00
Martin
018a94f43b correctif(batch_operation): empeche de changer l'etat d'un dossier en cas d'erreur. et s'assure de delinker le dossier en cas de dossier invalid 2023-01-05 16:20:18 +01:00
Lisa Durand
59468fe351 add justificatif_motivation field to batch operation accepter 2023-01-05 16:20:18 +01:00
Lisa Durand
1bc0609543 add motivation field to batch operation accepter 2023-01-05 16:20:18 +01:00
Lisa Durand
d7ebb67889 implement first step - accepte without motivation and PJ 2023-01-05 16:20:18 +01:00
Paul Chavard
378f3c5fb0 use join table instead of arrays 2023-01-05 16:20:18 +01:00
Sébastien Carceles
1de969915a
rename file to match controller name (#8371) 2023-01-05 14:38:56 +01:00
Paul Chavard
26e02c7173 fix(template): trix will transform double spaces in   2023-01-05 13:23:24 +01:00
Sébastien Carceles
fa6fc077b4
normalize boolean values (#8320)
* extract parent for yes no and checkbox champs

* checkbox stores true / false instead of on / off

* normalize blank value to nil

* normalize invalid value to false

* after party task: normalize checkbox values

* after party task: normalize yes_no values
2023-01-05 11:18:27 +00:00
Colin Darie
a91fc3bbe1 chore(usager/wording): Dossiers => Mes dossiers in main tab 2023-01-04 13:15:10 +01:00
Colin Darie
b89fc16999 style(instructeurs/expiration): convert banner to DSFR 2023-01-04 13:15:10 +01:00
Colin Darie
0b033a7025 refactor(email): improve wording of automatic deletion to user
Closes #7688
2023-01-04 13:15:10 +01:00
Colin Darie
7d16ae83e8 refactor(email): improve wording of near deletion to user
Closes #7688
2023-01-04 13:15:10 +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
456be420fa
feat(demarche): describe dossier prefilling with POST (#8298)
* feat(demarche): describe dossier prefilling with POST

* show response example
2023-01-04 07:31:31 +00:00
Martin
a4d6692bc6 accessibilite(pages-authentification): evolutions des pages de connexion/creation de compte pour respecter le DSFR et supporter une meilleure accessibilite
Update app/components/dsfr/input_component/input_component.html.haml

Co-authored-by: Colin Darie <colin@darie.eu>
2023-01-03 16:26:05 +01:00
Martin
76301d4c32 correctif(api_entreprise_token): les nouveaux tokens stockent les roles dans sous la clé scopes et non plus roles 2023-01-03 15:32:50 +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
mfo
31735e16d8
Merge pull request #8339 from mfo/US/fix-departement-champs
Us/fix departement champs
2022-12-27 16:01:35 +01:00
Martin
186d4e6539 correctif(ChampDepartement): gere les departement a 3 codes 2022-12-27 14:55:57 +01:00
Paul Chavard
9b3fa4dd3c refactor(revision): changes should be domain objects 2022-12-27 10:58:53 +00:00
Martin
48c80e9387 correctif(api/v1): ajoute la methode manquante for_api sur le type de champs departement 2022-12-27 11:45:43 +01:00
mfo
72791bd5b6
Merge pull request #8337 from mfo/US/instructeur#telecharger_pjs
correctif(instructeurs/dossier#telecharger_pjs): ne pas inclure les bills et horodatage quand on telecharge un dossier unitairement
2022-12-27 09:07:48 +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
mfo
99a652c297
Merge pull request #8267 from mfo/a11y/use-alert-for-dossier-state
accessibilite(page#dossiers): utiliser les role=alert sur le status des dossiers
2022-12-26 17:44:59 +01:00
Martin
69aed18b46 correctif(instructeurs/dossier#telecharger_pjs): ne pas inclure les bills et horodatage quand on telecharge un dossier unitairement 2022-12-26 17:11:10 +01:00
Damien Le Thiec
9e083ea3f7
Merge branch 'main' into feature/prefill_civility 2022-12-26 11:31:52 +01:00
Paul Chavard
4c516a6991 feat(dossier): allow to rebase champs with value made mandatory 2022-12-22 13:08:04 +01:00
Paul Chavard
00218fded2 fix(dossier): update spec 2022-12-21 14:03:02 +01:00
Paul Chavard
bd9fe7eb7c feat(export): add pays, region and departement codes 2022-12-21 14:03:02 +01:00
Paul Chavard
3f0f5e381f refactor(regions): champ regions to use simple select 2022-12-21 14:03:02 +01:00
Paul Chavard
e0b0a42bc3 refactor(departements): champ departements to use simple select 2022-12-21 14:03:02 +01:00
Paul Chavard
f7c1dff22a refactor(pays): champ pays to use simple select 2022-12-21 14:03:02 +01:00
Paul Chavard
4d4c378724 feat(api_geo): add api_geo service 2022-12-21 14:03:02 +01:00
Christophe Robillard
00536b949a fix system specs by adding zone for new procedure 2022-12-21 09:02:16 +01:00
Christophe Robillard
f4977f358b fix spec procedure_cloning
add zone to new procedure
2022-12-21 09:02:16 +01:00
Christophe Robillard
11a18516b2 remove feature flag zonage 2022-12-21 09:02:16 +01:00
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
Christophe Robillard
a0da04e83c use config.ds_opendata_enabled
don't use anymore opendata feature flag
2022-12-20 12:52:56 +01:00
Christophe Robillard
edffd0a7a8 extract ds_opendata_enabled 2022-12-20 12:52:56 +01:00
Christophe Robillard
daa4411abe Revert "unschedule export demarches opendata"
This reverts commit da0738c661.
`ExportAndPublishDemarchesPubliqjesJob` is now schedulable
2022-12-20 12:52:56 +01: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
Martin
4e201a245b accessibilite(page#dossiers): utiliser les role=alert sur le status des dossiers 2022-12-19 15:16:57 +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
2be4441a70 amelioration(attestion.et.mail): deduplique les message d'erreur, améliore les messages d'erreur, gère la pluralisation des erreurs lorsque plusieurs tags sont concernés 2022-12-19 09:28:46 +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
Martin
ef389eab41 amelioration(attestation.et.mail): repositionne les messages d'erreur lié à la substitution des balises a proximité du formulaire pour faciliter la comprehension. passage des champs au DSFR 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
Christophe Robillard
cea92c0488 perf: remove n+1 queries to count admin 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
Lisa Durand
2fff6faed6 fix checkbox rendering in all pages 2022-12-15 14:46:05 +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
39a9660df6 remove redundant and failing test 2022-12-15 10:04:25 +01:00
Lisa Durand
eea42aad6b fix linter 2022-12-15 10:04:25 +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
Colin Darie
7ff6455440
style(instructeurs): convert filters to DSFR tags 2022-12-15 09:34: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