Commit graph

84 commits

Author SHA1 Message Date
Paul Chavard
e509ff1717 fix(dossier): do not send notifcations to deleted users 2023-06-21 09:52:38 +01:00
Colin Darie
9565267170
feat(dossier): notify user by email about pending corrections 2023-06-02 16:16:13 +02:00
Colin Darie
ca3b127942
feat(instructeur): can flag a dossier as "pending corrections" 2023-06-02 16:16:12 +02:00
Colin Darie
2c79ca94f5
chore(schema): create dossier_corrections 2023-06-02 16:13:15 +02:00
Colin Darie
8fa5e0dbb8
chore(rubocop): fix Rails/UnusedIgnoredColumns 2023-04-19 12:55:14 +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
Paul Chavard
7f1dd49bdc chore(flipper): always use feature_enabled? helper 2022-10-12 14:14:30 +02:00
Paul Chavard
91879b89ce fix(commentaire): unified destroy commentaire 2022-04-26 14:54:58 +02:00
Kara Diaby
e06215281a modify commentaire model 2022-03-31 15:48:17 +02:00
Kara Diaby
8bcdf59778 change commentaire model 2022-03-17 13:57:49 +01:00
Pierre de La Morinerie
60c2718f29 models: remove custom code for file size validation message
With active_storage_validations 0.9.6, we can use the %{max_size}
variable directly in the error message.
2021-11-24 10:06:45 +01:00
Martin
f0950b592b clean(CommentaireService): extract soft delete within controller. returning an instance with an error[:base] is not persisted with validation : avoid poluting stuff 2021-11-16 16:13:11 +01:00
Martin
8bbd77f89f refactor(mail.delay): use simplier implementation using after_action to prevent email delivery with delay 2021-11-16 15:12:05 +01:00
Martin
0aecc301c9 refactor(Commentarie.soft_delete): use discard 2021-11-16 14:28:38 +01:00
Martin
ddabed0c7e fix(refactor): continue to revert to past implementation. now use a job instead of calling deliver_later(wait: 5.minutes) [was not a satisfying implementation] 2021-11-15 15:45:48 +01:00
Martin
5534c3fbd6 fix(refactor): forgot to cleanup former implementation 2021-11-15 15:43:51 +01:00
Martin
5b6bb5171c tech(lint): rubocopify 2021-11-15 15:42:20 +01:00
Martin
c68fa2d7f3 feat(Commentaire.notify_user): wait 5 minutes before sending email to user when instructor write a commentaire. leaving some space for instructor to destroy his message 2021-11-15 15:38:57 +01:00
Martin
46fc956de3 fix(refactor): forgot to pass var, classy 2021-11-15 15:01:56 +01:00
Martin
a74ca8ad39 fix(spec): scope out time as reference for time comparission, hope not a matter of precision 2021-11-15 14:55:35 +01:00
Martin
9a8ec1087c feat(commentaire.soft_delete): wrap deletion behaviour in service 2021-11-15 12:43:53 +01:00
Martin
5b72bdec7e fix(Commentaire.sent_by?): &.email compared to nil could sent by true when nil==nil, avoid this one 2021-11-15 12:01:56 +01:00
Martin
b03dc6ad5d wip(dossiers/messages/_message): poc destroy button with expected ACL support 2021-11-15 11:30:41 +01:00
Ismael MOUSSA S
36dc9c2ca2 Add File Validation concern after refactoring 2021-09-21 12:11:20 -05:00
Ismael MOUSSA S
7c7c9c9ea4 Fix file size validation message 2021-09-21 12:11:20 -05:00
Ismael MOUSSA S
bdbb4deb87 ADD FILE_MAX_SIZE constant to set allow file size limit 2021-09-21 12:04:56 -05:00
kara Diaby
c92b249340 fixup! modify models 2021-07-27 19:38:21 +02:00
Paul Chavard
c20ad5ca17 Remove the link between commentaire and user 2021-04-22 15:10:47 +01:00
simon lehericey
685534e827 Add content validation for avis and messages 2021-01-18 17:23:08 +01:00
Pierre de La Morinerie
dd1bed9340 models: require belong_to associations on commentaire 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
11456109c0 models: explicitly mark optional belongs_to relationship as so
This prepares making the `belongs_to` relationship required by default.
2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
2892fdbeef models: remove columns that have been deleted from db schema
These columns are gone, so we can't stop ignoring them.
2020-08-12 12:06:58 +02:00
Pierre de La Morinerie
6d28069539 models: generate annotations 2020-08-12 11:45:53 +02:00
clemkeirua
77101208a4 Anonymisation de l'instructeur dans la messagerie 2020-05-18 12:56:30 +00:00
kara Diaby
1f27652cd3 add files validations to models 2020-03-23 11:28:13 +01:00
Paul Chavard
ba03dbf8dd [GraphQL] Add dossierEnvoyerMessage mutation 2019-11-13 19:54:27 +01:00
Paul Chavard
88842918f9 Prepare to drop columns 2019-09-17 12:37:37 +02:00
Paul Chavard
434210de2e Ignore to be removed columns 2019-09-10 10:49:12 +02:00
Paul Chavard
e9ba7700d4 Remove commentaire file uploader 2019-08-20 10:24:13 +02:00
simon lehericey
3fde2a6f70 Rename gestionnaire in code to instructeur 2019-08-12 13:47:01 +02:00
Paul Chavard
25db21467d Stop using Flipflop as switch for Fog 2019-07-31 15:15:09 +02:00
Paul Chavard
3cb39c2840 Refactor message attachements to use active_storage 2019-07-10 15:35:29 +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
Nicolas Bouilleaud
3bf19de124 Remove Commentaire::columns override
It was used for a cleanup migration a long time ago (see #233, #3033, #3043)
2019-07-08 16:06:44 +02:00
Paul Chavard
c5704fa22f Remove unused code from Commentaire 2019-06-25 17:04:29 +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
Paul Chavard
a08f170dbd Assign users and gestionnaires to commentaires
fix #2052
2018-12-05 13:40:57 +01:00
gregoirenovel
251bd635c2 Prepare for champ_id deletion 2018-11-22 12:27:48 +01:00