notification email on student unlinking

parent a8f75113
...@@ -497,7 +497,7 @@ module.exports = { ...@@ -497,7 +497,7 @@ module.exports = {
{ {
name: student.name, name: student.name,
surname: student.surname, surname: student.surname,
license: student.license.number license: License.hyphenize(student.license.number)
}); });
console.log("-->" + message); console.log("-->" + message);
mailService.mailer() mailService.mailer()
......
...@@ -76,6 +76,17 @@ module.exports = { ...@@ -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 * Generates a new trial license
* @param {ID} id_sup ID of the supervisor who creates the license * @param {ID} id_sup ID of the supervisor who creates the license
* @param {function} callback Callback function: (err, license) * @param {function} callback Callback function: (err, license)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"no_surname": "No surname", "no_surname": "No surname",
"office_link": "The office/center \"{{ name }}\" with email \"{{ email }}\" has added you as part of its team in Pictogram.", "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", "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.", "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.", "tutor_office_request": "{{ name }}, with email {{ email }}, is requesting to be linked as tutor/father/mother to any of your students.",
"Welcome": "Welcome", "Welcome": "Welcome",
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"no_surname": "Sin apellidos", "no_surname": "Sin apellidos",
"office_link": "El centro/gabinete \"{{ name }}\", con correo electrónico \"{{ email }}\" le ha añadido como parte de su equipo.", "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", "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.", "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.", "tutor_office_request": "El/la tutor/a/padre/madre {{ name }}, con correo electrónico {{ email }}, pide ser asociado a algún estudiante.",
"Welcome": "Bienvenido", "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