2017-05-12 16:56:46 +02:00
|
|
|
class GestionnaireMailerPreview < ActionMailer::Preview
|
|
|
|
def last_week_overview
|
2018-12-20 16:49:56 +01:00
|
|
|
GestionnaireMailer.last_week_overview(Gestionnaire.first)
|
2017-05-12 16:56:46 +02:00
|
|
|
end
|
2018-02-23 13:44:02 +01:00
|
|
|
|
|
|
|
def send_dossier
|
2018-12-20 16:49:56 +01:00
|
|
|
GestionnaireMailer.send_dossier(gestionnaire, Dossier.new(id: 10, procedure: procedure), target_gestionnaire)
|
2018-02-23 13:44:02 +01:00
|
|
|
end
|
2018-10-03 11:11:02 +02:00
|
|
|
|
|
|
|
def send_login_token
|
2018-12-20 16:49:56 +01:00
|
|
|
GestionnaireMailer.send_login_token(gestionnaire, "token")
|
2018-10-03 11:11:02 +02:00
|
|
|
end
|
2018-12-20 16:46:44 +01:00
|
|
|
|
|
|
|
def invite_gestionnaire
|
|
|
|
GestionnaireMailer.invite_gestionnaire(gestionnaire, 'aedfa0d0')
|
|
|
|
end
|
|
|
|
|
|
|
|
def user_to_gestionnaire
|
|
|
|
GestionnaireMailer.user_to_gestionnaire(gestionnaire.email)
|
|
|
|
end
|
|
|
|
|
2019-03-13 17:59:33 +01:00
|
|
|
def send_notifications
|
|
|
|
data = [
|
|
|
|
{
|
|
|
|
procedure_libelle: 'une superbe démarche',
|
|
|
|
procedure_id: 213,
|
|
|
|
nb_en_construction: 2,
|
|
|
|
nb_notification: 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
procedure_libelle: 'une démarche incroyable',
|
|
|
|
procedure_id: 213,
|
|
|
|
nb_en_construction: 1,
|
|
|
|
nb_notification: 1
|
|
|
|
}
|
|
|
|
]
|
|
|
|
GestionnaireMailer.send_notifications(gestionnaire, data)
|
|
|
|
end
|
|
|
|
|
2018-12-20 16:46:44 +01:00
|
|
|
private
|
|
|
|
|
|
|
|
def gestionnaire
|
|
|
|
Gestionnaire.new(id: 10, email: 'instructeur@administration.gouv.fr')
|
|
|
|
end
|
2018-12-20 16:49:56 +01:00
|
|
|
|
|
|
|
def target_gestionnaire
|
|
|
|
Gestionnaire.new(id: 12, email: 'collegue@administration.gouv.fr')
|
|
|
|
end
|
|
|
|
|
|
|
|
def procedure
|
2019-03-13 17:59:33 +01:00
|
|
|
Procedure.new(id: 15, libelle: 'libelle')
|
|
|
|
end
|
|
|
|
|
|
|
|
def dossier
|
|
|
|
Dossier.new(id: 15, procedure: procedure)
|
2018-12-20 16:49:56 +01:00
|
|
|
end
|
2017-05-12 16:56:46 +02:00
|
|
|
end
|