1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

(feat) notify admin when supporting document was udpated

Previously, if the user's account was validated, the notification was not sent.
Now, we send the notification in every cases
This commit is contained in:
Sylvain 2023-02-17 13:26:58 +01:00
parent b4e2f3b549
commit 6bca75e79a

View File

@ -38,7 +38,7 @@ class SupportingDocumentFileService
file = type.supporting_document_files.find_by(user_id: supporting_document_file.user_id) file = type.supporting_document_files.find_by(user_id: supporting_document_file.user_id)
all_files_are_upload = false unless file all_files_are_upload = false unless file
end end
if all_files_are_upload && !user.validated_at? if all_files_are_upload
NotificationCenter.call type: 'notify_admin_user_supporting_document_files_updated', NotificationCenter.call type: 'notify_admin_user_supporting_document_files_updated',
receiver: User.admins_and_managers, receiver: User.admins_and_managers,
attached_object: supporting_document_file attached_object: supporting_document_file