Commit graph

43 commits

Author SHA1 Message Date
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
Pierre de La Morinerie
e5303fd986 mailers: streamline the NotificationMailer
Notifications are now only for demarche-templated emails.
2018-11-20 14:46:31 +01:00
simon lehericey
3dad743d56 remove localtime as it uses server timezone 2018-10-26 10:10:20 +00:00
gregoirenovel
c8f872c566 InviteUser → Invite 2018-10-10 12:07:10 +02:00
Paul Chavard
e358e72867 Do not display gestionnaire emails in the messaging interface
fix #2302
2018-07-31 15:27:36 +02:00
gregoirenovel
23931a7591 Remove the contact_email locale 2018-06-01 00:00:11 +02:00
Frederic Merizen
07b1c147d9 [Fix #1972] Always send mails asynchronously 2018-05-28 12:02:13 +02:00
Paul Chavard
45019ce75c Use Flipflop instead of Feature 2018-04-18 16:51:21 +02:00
gregoirenovel
0a9f442260 Enable some Rails cops 2018-03-06 17:18:44 +01:00
gregoirenovel
da3d9d403a Enable some more cops 2018-03-06 17:18:44 +01:00
gregoirenovel
142241dd16 Remove notifications 2018-02-06 14:07:20 +01:00
gregoirenovel
25aef60354 Use string interpolation 2018-01-30 15:50:52 +01:00
Mathieu Magnin
150ff5e7ca New UI : Use RemoteDownloader class to hide ovh url 2017-11-28 15:07:10 +01:00
Mathieu Magnin
4d12aa222c Validate body is present 2017-11-28 15:07:10 +01:00
Mathieu Magnin
6c39aba978 Validates commentaire file size 2017-11-28 15:07:10 +01:00
Mathieu Magnin
76cb54988d Validate virus free with Clamav 2017-11-28 15:07:10 +01:00
Mathieu Magnin
5775901868 Add commentaire file uploader 2017-11-28 15:07:09 +01:00
Simon Lehericey
155a5f7826 Notification: add methods to retrieve notifications 2017-11-10 16:29:44 +01:00
Simon Lehericey
8dedf6fdca [fix #575] dossier updated_at is ... updated when children are updated 2017-10-24 18:12:25 +02:00
Mathieu Magnin
17ce3885fd Force commentaire order to avoid tests to fail randomly 2017-10-06 11:04:09 +02:00
Simon Lehericey
0d27ca3bca Commentaire: use scope to order commentaires association 2017-09-06 11:11:25 +02:00
gregoirenovel
8ba55a0d5d Mutualize the email address in a localised string 2017-05-12 16:53:03 +02:00
gregoirenovel
8a5420301c Add Commentaire#notify to dispatch notifications 2017-05-12 16:31:03 +02:00
gregoirenovel
1235fce34a Refactor Commentaire#notify_user 2017-05-12 16:31:02 +02:00
gregoirenovel
c07b83b266 Commentaire#notify_user_with_mail -> #notify_user 2017-05-12 16:31:02 +02:00
gregoirenovel
9c3cde2b2e Move CommentairesController#notify_user_user_with_mail to Commentaire 2017-05-12 16:31:02 +02:00
gregoirenovel
cae3e1f420 Commentaire#internal_notification => #notify_gestionnaires 2017-05-12 16:31:02 +02:00
Simon Lehericey
4c74b04a91 Commentaire: use fr local to display date 2017-04-19 10:06:22 +02:00
Xavier J
48451553b9 Change invites autorisation in commentaire model 2016-12-26 14:45:42 +01:00
Xavier J
9a0a391c40 Exclude notification for dossier state draft and for accompagnateur comments 2016-12-26 14:38:00 +01:00
Xavier J
5eaa2941ad Move commentaire creation to model 2016-12-26 11:08:53 +01:00
JC
e6a01e9212 Got last message showed upon messages, adding condition to toggle out this last message on lick 2016-11-25 11:08:58 +01:00
Julien Portalier
96ca5113f7 Flux de commentaires par champs 2016-11-15 18:36:20 +01:00
Xavier J
b15c2bbb2b New feature : User, Guest and Gestionnaire can be upload a document with theirs comments 2016-04-20 16:51:57 +02:00
Xavier J
b5b83e939a First Commit 2015-08-10 11:05:06 +02:00