Commit graph

2177 commits

Author SHA1 Message Date
Pierre de La Morinerie
35c3795f56 dossier: make messagerie available on archived procedures
An Admin may archive a procedure to make it unavailable to
the general public, but before all dossiers are handled. In this case,
the messagerie needs to be available.

Fix #4089
2019-07-11 15:37:04 +02:00
Pierre de La Morinerie
10065df8ce champs: put champ label in numeric fields validation messages
Replaces

> La valeur du champ doit être un nombre entier (sans chiffres après
> la virgule)

by

> La valeur du champ « Nombre de parents » doit être un nombre entier
> (sans chiffres après la virgule)
2019-07-11 15:12:48 +02:00
simon lehericey
768a298c2d Same for go back in instruction 2019-07-11 12:50:15 +02:00
simon lehericey
5f39d3eac8 Fix bug when instruction repasse en construction twice 2019-07-11 12:50:15 +02:00
simon lehericey
6de1e2ec58 Fix bug when an instructeur closes a dossier already closed 2019-07-11 12:50:15 +02:00
Pierre de La Morinerie
c2c9b19b3b procedure: remove individual_with_siret
It isn't used anymore (see #3077)
2019-07-11 11:58:21 +02:00
Pierre de La Morinerie
7ca3d5fce2 procedure: select for_individual by default 2019-07-10 18:47:34 +02:00
simon lehericey
7b63ddfabb Better champs factories 2019-07-10 16:41:34 +02:00
Paul Chavard
be3283a9a8 Add commentaire pj migration task 2019-07-10 15:35:29 +02:00
Paul Chavard
3cb39c2840 Refactor message attachements to use active_storage 2019-07-10 15:35:29 +02:00
Pierre de La Morinerie
03fc555edf profile: send an email when the account is already taken 2019-07-10 11:31:09 +02:00
Pierre de La Morinerie
2b2493b0e6 profile: improve spec 2019-07-10 11:31:09 +02:00
Pierre de La Morinerie
58a8d017f2 spec: cleanup dossier spec 2019-07-10 11:31:09 +02:00
Pierre de La Morinerie
56bc06cfbf dossier: fix flaky spec for nearing_end_of_retention
If the spec takes longer than 1s to run, the test would fail.
2019-07-10 11:00:49 +02:00
Pierre de La Morinerie
6b27ac8514 france_connect: make existing user lookup case-insensitive
Fix #4053
2019-07-09 15:50:28 +02:00
Pierre de La Morinerie
d05bab3df3 france_connect: refactor specs 2019-07-09 15:50:28 +02:00
Pierre de La Morinerie
b5ed74c09d dossiers: always allow to create a new dossier
Turns out this is confusing for users (some UI elements are present for
some procedures, but not for others).

Better enable it for everyone.
2019-07-09 14:44:30 +02:00
simon lehericey
d36f6ebcd7 [fix #1709] A user can change its email 2019-07-09 11:55:17 +02:00
simon lehericey
0f9fdf3f75 Activate device email change confirmation 2019-07-09 11:55:17 +02:00
simon lehericey
d68d2be798 Profil: accessible to all roles 2019-07-09 11:55:17 +02:00
Paul Chavard
ad0a74ea7c Fix dates in dossiers export 2019-07-09 10:02:08 +02:00
Pierre de La Morinerie
422f4b9cdb dossiers_controller: warn properly when instructing a dossier twice
Fix #4055
2019-07-08 17:58:45 +02:00
Nicolas Bouilleaud
fac20ed190 Fix Commentaire factory so that the default case creates a valid object 2019-07-08 16:13:43 +02:00
Nicolas Bouilleaud
930fd345de Validate messagerie_available? when creating a new Commentaire
Commentaires bu Users and Gestionnaire need the messagerie to be available; Automatic system Commentaires can be created anytime.

This reintroduces Commentaire validation that was introduced in #3979 and disabled in #4018
2019-07-08 16:13:43 +02:00
Nicolas Bouilleaud
3f439ac07a Add Commentaire.is_sent_by_system? and .is_sent_by(someone)
And use it in CommentaireHelper and in the _message_icon and _message_issuer partials
2019-07-08 16:06:44 +02:00
Nicolas Bouilleaud
2abd93d360 Display the full User email in Commentaires
* Only redact gestionnaires’ emails
* Also, rename Commentaire.sender to Commentaire.redacted_email
2019-07-08 16:06:44 +02:00
Chaïb Martinez
39a2eb77e8 test fix
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-07-08 14:58:32 +02:00
Paul Chavard
e582ff729c Add aasm to dossiers state 2019-07-03 13:37:27 +02:00
Mathieu Magnin
10d3ba10f2 Before save copy body in rich_body 2019-07-03 13:15:49 +02:00
Mathieu Magnin
d13b7f953f Migrate mail body to ActionText 2019-07-03 13:15:49 +02:00
simon lehericey
b2c987ff0d [fix #3683] Dossier: add repasser_en_instruction! 2019-07-02 18:40:20 +02:00
Paul Chavard
fb0ef15e3c Export dossiers v2 2019-07-02 14:20:29 +02:00
Paul Chavard
46c1bbbc6f Official support for declarative demarches 2019-07-02 14:12:26 +02:00
simon lehericey
92bd382c64 [fix #4008] secured login for all gestionnaires 2019-07-01 15:06:39 +02:00
Chaïb Martinez
36114c07a9 Add some test to admin roi calculation
[fix #3986]

Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-07-01 11:13:36 +02:00
Nicolas Bouilleaud
bd47bf2691 Disable Messagerie in archived Dossiers and procedures
* Use the existing Dossier#messagerie_available? method
* Raise when attempting to build a Commentaire if not messagerie_available?
* Disable the Messagerie form if not messagerie_available?
* Add tests :)
* Tweak the Horaires formatting while we’re here.
2019-07-01 09:39:39 +02:00
Paul Chavard
0d80c48b7e Add avis to api 2019-06-27 14:40:17 +02:00
Paul Chavard
c5704fa22f Remove unused code from Commentaire 2019-06-25 17:04:29 +02:00
Pierre de La Morinerie
50cf6059e6 tasks: ensure creating an empty champ doesn’t display a notification 2019-06-24 15:49:02 +02:00
Paul Chavard
1781a49932 Add order param to API 2019-06-20 15:28:16 +02:00
Pierre de La Morinerie
9ce92d5c3b champs: show attachment actions only when the atachment is persisted
Fix #3961
2019-06-20 11:03:08 +02:00
Pierre de La Morinerie
d561936863 task: ensure that hidden dossiers are rolled back 2019-06-20 10:48:56 +02:00
Pierre de La Morinerie
f8dda3ae45 tasks: don't abort rollback when a dossier fails
Instead print a warning, and continue rolling back the other dossiers.
2019-06-20 10:31:23 +02:00
Christian Lautier
2393fa86be Mailer preview correction: procedure has now multiple administrators 2019-06-20 10:17:55 +02:00
Nicolas Bouilleaud
c606644902 Tweak codestyle in specs, following review 2019-06-17 16:16:28 +02:00
Nicolas Bouilleaud
ad3553f0be Add BillSignature Service 2019-06-17 16:16:28 +02:00
Nicolas Bouilleaud
f355f849a6 Add BillSignature Model 2019-06-17 16:16:28 +02:00
Nicolas Bouilleaud
dace9a53d3 Add Universign timestamp API query 2019-06-17 16:16:28 +02:00
Nicolas Bouilleaud
e16cb731c5 Add poor man’s ASN1 parsing 2019-06-17 16:16:28 +02:00
Pierre de La Morinerie
51aacabf13 models: fix touch not propagating when using nested attributes
Sometimes, when using nested attributes, touch doesn’t propagate to
parent relationships. (see https://github.com/rails/rails/issues/26726)

Specifically, this happens in our app when updating a dossier with
only new attachements (but without changing the value of any fields).

To work around this, we need to define the parent relationship
explicitely. This is good practice anyway.

Fix #3906
2019-06-17 13:44:07 +02:00