Commit graph

360 commits

Author SHA1 Message Date
Paul Chavard
2e854f2ac3 Add graph loading scopes to Dossier and Procedure 2019-09-24 10:47:21 +02:00
simon lehericey
faddbc23ef Eager load procedure: :groupe_instructeurs for export 2019-09-19 12:30:12 +02:00
simon lehericey
a2f82ab8be Add groupe_instructeur_label to export v2 2019-09-19 12:30:12 +02:00
simon lehericey
9b16bd2037 Dossier: retrieve all dossiers for a procedure 2019-09-18 15:51:02 +02:00
Paul Chavard
88842918f9 Prepare to drop columns 2019-09-17 12:37:37 +02:00
Paul Chavard
3b8d3b7967 Add Style/CollectionMethods to rubocop 2019-09-12 14:48:18 +02:00
Paul Chavard
3eb3ae001e Rename “Passé en construction le” to 'Déposé le' for clarity 2019-09-10 14:59:10 +02:00
simon lehericey
3cc8f0c792 Link Dossier and GroupeInstructeur 2019-09-03 06:47:02 +02:00
simon lehericey
3fde2a6f70 Rename gestionnaire in code to instructeur 2019-08-12 13:47:01 +02:00
clemkeirua
1e6847bc6f introduce constants for M./Mme 2019-08-01 17:42:32 +02:00
clemkeirua
d7105cb6f8 added spec for dossier#update_with_france_connect 2019-08-01 17:42:32 +02:00
clemkeirua
707e8a0004 dossier_controller#new uses info from FC if any 2019-08-01 17:42:32 +02:00
clemkeirua
f5d3818e3c remove unnecessary retransition methods 2019-08-01 10:40:08 +02:00
clemkeirua
38b48f4217 transition from accepte to instruction as superadmin 2019-08-01 10:29:51 +02:00
Paul Chavard
b266915892 Add repetitions to api 2019-08-01 10:04:35 +02:00
Paul Chavard
fba195c0b5 Add attestation url to dossier on api 2019-07-31 18:30:40 +02:00
Paul Chavard
ab1170bcfc Fix export dossier n+1 query 2019-07-30 17:17:36 +02:00
Pierre de La Morinerie
ea1c8ea7e3 models: remove associations to old pieces justificatives 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
f69f325236 api: remove export of old pieces justificatives 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
e975fe4ade tasks: remove task to migrate old pieces justificatives 2019-07-30 16:11:17 +02:00
clemkeirua
d62740c198 extraction de la taille max des fichiers dans une constante 2019-07-18 17:19:39 +02:00
Pierre de La Morinerie
a8354bd103 dossiers: unify deletion of dossiers between manager and user
The code paths for deleting a dossier were different, depending on
whether the dossier was deleted by the user, or from the Manager.

This commit unifies the two code paths into one.

This has the effect of:

- An operation log is now recorded when an user deletes its own dossier;
- Gestionnaires are now notified even when the dossier is deleted from
  the Manager;
- The `support:delete_user_account` task now requires the email address
  of the author.
2019-07-16 16:22:20 +02:00
clemkeirua
25f81f1d3c download a dossier as zip with all attachments 2019-07-16 09:11:25 +02:00
Pierre de La Morinerie
d5f360c85f manager: fix the deletion email not being sent
When deleting a dossier from the manager, the deletion notification
email was not being sent. This is because the returned object from
`Dossier#hide!` was invalid.
2019-07-15 10:01:16 +02:00
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
fdca7c025a procedure: ignore :expects_multiple_submissions on the correct model 2019-07-11 12:14:25 +02:00
Paul Chavard
3cb39c2840 Refactor message attachements to use active_storage 2019-07-10 15:35:29 +02:00
Pierre de La Morinerie
ecfccae6f0 dossiers: remove support for Dossier#expects_multiple_submissions 2019-07-09 14:50:11 +02:00
Paul Chavard
ad0a74ea7c Fix dates in dossiers export 2019-07-09 10:02:08 +02:00
Paul Chavard
e582ff729c Add aasm to dossiers state 2019-07-03 13:37:27 +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
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
Nicolas Bouilleaud
7e80b8a4dc Enable the Rails/InverseOf cop and add missing inverse_of 2019-06-17 13:44:07 +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
Nicolas Bouilleaud
6b90bc1ea1 Add “previously followed” dossiers and gestionnaires
Using an “inactive” Follow scope, similar to the “active” scope.

(I was tempted to use a default_scope, but this breaks when trying to `unscope` it in associations.)
2019-06-12 17:33:53 +02:00
Nicolas Bouilleaud
be4c575622 Add Follow.unfollowed_at
The active scopes is used indirectly in the dossier<->gestionnaire associations: the existing tests in dossier and gestionnaire just work™.
2019-06-12 17:33:53 +02:00
Paul Chavard
d5911071f8 Return dossiers on api with stable order 2019-06-04 15:34:49 +02:00
Paul Chavard
b8bf662c6d Track dossier demander un avis 2019-05-14 14:31:03 +02:00
Paul Chavard
9c472e6524 Track dossier private annotations modifications 2019-05-14 14:31:03 +02:00
Paul Chavard
dba8d65137 Track dossier operations with author and subject 2019-05-14 14:31:03 +02:00
clemkeirua
afa6711564 refacto suite à simplification virusscan 2019-05-07 08:54:29 +02:00
clemkeirua
b3956bc072 introduce virus scans 2019-05-07 08:54:29 +02:00
clemkeirua
4aab72be68 implementation du systeme de PJ de motivation 2019-05-07 08:54:29 +02:00
Pierre de La Morinerie
ce9c5da6e1 dossier: add a messagerie_available? method 2019-03-20 10:42:57 +01:00
Paul Chavard
01b966ff66 Check demarche ownership on multiple administrateurs 2019-03-12 11:59:01 +01:00
Frederic Merizen
a87e3ac697 [#3477] Make filtering by datetimes a proper scope 2019-03-11 17:14:17 +01:00
simon lehericey
a7e068003a [fix #3427] Administration can soft delete a dossier 2019-02-14 18:09:08 +01:00