notification email on student unlinking

parent a8f75113
......@@ -497,7 +497,7 @@ module.exports = {
{
name: student.name,
surname: student.surname,
license: student.license.number
license: License.hyphenize(student.license.number)
});
console.log("-->" + message);
mailService.mailer()
......
......@@ -76,6 +76,17 @@ module.exports = {
},
/**
* Formats license number with hyphens
*/
hyphenize: function (number) {
return
number[0] + number[1] + number[2] + number[3] + "-" +
number[4] + number[5] + number[6] + number[7] + "-" +
number[8] + number[9] + number[10] + number[11] + "-" +
number[12] + number[13] + number[14] + number[15];
},
/**
* Generates a new trial license
* @param {ID} id_sup ID of the supervisor who creates the license
* @param {function} callback Callback function: (err, license)
......
......@@ -7,7 +7,7 @@
"no_surname": "No surname",
"office_link": "The office/center \"{{ name }}\" with email \"{{ email }}\" has added you as part of its team in Pictogram.",
"signin_mail": "To activate your Pictogram account, click on this link:\n",
"student_unlinked": "You have lost the link to the student {{ name }} {{ surname }}, with license number {{ license }}.",
"student_unlinked": "You have lost the link to the student \"{{ name }} {{ surname }}\", with license number \"{{ license }}\".",
"therapist_office_request": "{{ name }}, with email {{ email }}, is requesting to be linked as therapist to any of your students.",
"tutor_office_request": "{{ name }}, with email {{ email }}, is requesting to be linked as tutor/father/mother to any of your students.",
"Welcome": "Welcome",
......
......@@ -7,7 +7,7 @@
"no_surname": "Sin apellidos",
"office_link": "El centro/gabinete \"{{ name }}\", con correo electrónico \"{{ email }}\" le ha añadido como parte de su equipo.",
"signin_mail": "Para activar su cuenta en Pictogram, haga click en el siguiente enlace:\n",
"student_unlinked": "Se ha desvinculado de {{ name }} {{ surname }}, con número de licencia {{ license }}.",
"student_unlinked": "Se ha desvinculado de la cuenta de estudiante \"{{ name }} {{ surname }}\", con número de licencia \"{{ license }}\".",
"therapist_office_request": "El/la terapeuta {{ name }}, con correo electrónico {{ email }}, pide ser asociado a algún estudiante.",
"tutor_office_request": "El/la tutor/a/padre/madre {{ name }}, con correo electrónico {{ email }}, pide ser asociado a algún estudiante.",
"Welcome": "Bienvenido",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment