This commit is contained in:
Paolo Arena
2021-02-18 12:19:35 +01:00
parent 88ae9af12c
commit 14a3292da2
22 changed files with 233 additions and 122 deletions

View File

@@ -219,6 +219,8 @@ module.exports = {
surname: user.surname,
emailto: emailto,
participants: '',
participantsLunch: '',
participantsDinner: '',
msgbooking: tools.convertTexttoHtml(recbooking.msgbooking),
eventtextplain: tools.removeSpecialCharForEmail(recbooking.infoevent),
event: recbooking.infoevent,
@@ -227,9 +229,15 @@ module.exports = {
return Settings.getValDbSettings(idapp, 'MSG_REPLY_AFTER_BOOKING').then((ris => {
mylocalsconf.msgreply_after_booking = ris;
if (recbooking.numpeople > 1)
if (recbooking.numpeople > 0)
mylocalsconf.participants = recbooking.numpeople.toString() + ' ' + tools.getres__('partecipanti', res);
if (recbooking.numpeopleLunch > 0)
mylocalsconf.participantsLunch = recbooking.numpeopleLunch.toString() + ' ' + tools.getres__('partecipanti a Pranzo', res);
if (recbooking.numpeopleDinner > 0)
mylocalsconf.participantsDinner = recbooking.numpeopleDinner.toString() + ' ' + tools.getres__('partecipanti a Cena', res);
let texthtml = '';
if (recbooking.modified) {
texthtml = 'modifybooking';
@@ -264,12 +272,20 @@ module.exports = {
emailto: emailto,
event: recbooking.infoevent,
participants: '',
participantsLunch: '',
participantsDinner: '',
eventtextplain: tools.removeSpecialCharForEmail(recbooking.infoevent),
};
if (recbooking.numpeople > 1)
mylocalsconf.participants = recbooking.numpeople.toString() + ' ' + tools.getres__('partecipanti', res);
if (recbooking.numpeopleLunch > 1)
mylocalsconf.participantsLunch = recbooking.numpeopleLunch.toString() + ' ' + tools.getres__('partecipanti a Pranzo', res);
if (recbooking.numpeopleDinner > 1)
mylocalsconf.participantsDinner = recbooking.numpeopleDinner.toString() + ' ' + tools.getres__('partecipanti a Cena', res);
this.sendEmail_base('booking/cancelbooking/' + lang, emailto, mylocalsconf, tools.getreplyToEmailByIdApp(idapp));
// Send Email also to the Admin