Skip to content
This repository has been archived by the owner on May 28, 2018. It is now read-only.

Commit

Permalink
Add application ellapsed time in transfer for new PEPITE
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrohee committed Jul 31, 2017
1 parent a93f9bc commit 0a69187
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/api/application/applicationMail/notifyPepiteNew.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const Moment = require('moment')

function getMail(sender, application, pepiteNew, pepiteOld) {
return {
from: sender,
Expand All @@ -9,9 +11,10 @@ function getMail(sender, application, pepiteNew, pepiteOld) {
}

function getPepiteEmailBody(application, pepiteOld) {
Moment.locale('fr')
return ('<html><body><p>Bonjour,</p>' +
`<p>La candidature de ${application.contact.firstname} ${application.contact.name} vous a été nouvellement transférée</p>` +
`<p>Elle était précédemment adressée au PEPITE ${pepiteOld.name}</p>` +
`<p>Elle a été envoyée il y a ${new Moment().utc(application.sentDate).fromNow(true)} et était précédemment adressée au PEPITE ${pepiteOld.name}</p>` +
'<p>Vous retrouverez le dossier complet à l\'adresse :</p>' +
'<a href="https://etudiant-entrepreneur.beta.gouv.fr/application/' + application._id + '" target="_blank">candidature</a>' +
'<p>Pour rappel, la candidature est éditable à ce lien.</p>' +
Expand Down

0 comments on commit 0a69187

Please sign in to comment.