2024-04-29 00:17:15 +02:00
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2020-08-06 16:35:45 +02:00
|
|
|
|
# == Schema Information
|
|
|
|
|
#
|
|
|
|
|
# Table name: refused_mails
|
|
|
|
|
#
|
|
|
|
|
# id :integer not null, primary key
|
|
|
|
|
# body :text
|
|
|
|
|
# subject :string
|
|
|
|
|
# created_at :datetime not null
|
|
|
|
|
# updated_at :datetime not null
|
|
|
|
|
# procedure_id :integer
|
|
|
|
|
#
|
2017-03-06 22:37:37 +01:00
|
|
|
|
module Mails
|
2023-07-07 14:06:10 +02:00
|
|
|
|
# refuse
|
2017-03-06 22:37:37 +01:00
|
|
|
|
class RefusedMail < ApplicationRecord
|
|
|
|
|
include MailTemplateConcern
|
|
|
|
|
|
2020-07-20 17:25:17 +02:00
|
|
|
|
belongs_to :procedure, optional: false
|
2017-12-22 21:37:08 +01:00
|
|
|
|
|
2022-11-02 09:24:20 +01:00
|
|
|
|
validates :subject, tags: true
|
|
|
|
|
validates :body, tags: true
|
|
|
|
|
|
2017-05-27 00:52:32 +02:00
|
|
|
|
SLUG = "refused_mail"
|
2019-07-18 18:25:11 +02:00
|
|
|
|
DEFAULT_TEMPLATE_NAME = "notification_mailer/default_templates/refused_mail"
|
2017-03-06 23:18:16 +01:00
|
|
|
|
DISPLAYED_NAME = 'Accusé de rejet du dossier'
|
2019-07-17 13:42:51 +02:00
|
|
|
|
DEFAULT_SUBJECT = 'Votre dossier nº --numéro du dossier-- a été refusé (--libellé démarche--)'
|
2018-08-28 14:10:55 +02:00
|
|
|
|
DOSSIER_STATE = Dossier.states.fetch(:refuse)
|
2019-07-22 15:21:05 +02:00
|
|
|
|
|
|
|
|
|
def actions_for_dossier(dossier)
|
|
|
|
|
[MailTemplateConcern::Actions::REPLY, MailTemplateConcern::Actions::SHOW]
|
|
|
|
|
end
|
2017-03-06 22:37:37 +01:00
|
|
|
|
end
|
|
|
|
|
end
|