- Booking: added modify a booking (+ emails).

This commit is contained in:
Paolo Arena
2019-10-10 21:08:12 +02:00
parent 8f69856c57
commit 624f929c56
10 changed files with 81 additions and 5 deletions

View File

@@ -148,6 +148,7 @@ module.exports = {
surname: user.surname,
emailto: emailto,
participants: '',
msgbooking: recbooking.msgbooking,
eventtextplain: tools.removeSpecialCharForEmail(recbooking.infoevent),
event: recbooking.infoevent,
};
@@ -155,10 +156,17 @@ module.exports = {
if (recbooking.numpeople > 1)
mylocalsconf.participants = recbooking.numpeople.toString() + ' ' + res.__("partecipanti");
this.sendEmail_base('booking/makebooking/' + lang, user, emailto, mylocalsconf);
let texthtml = '';
if (recbooking.modified) {
texthtml = 'modifybooking';
}else {
texthtml = 'makebooking';
}
this.sendEmail_base('booking/'+texthtml+'/' + lang, user, emailto, mylocalsconf);
// Send Email also to the Admin
this.sendEmail_base('admin/makebooking/' + lang, user, tools.getAdminEmailByIdApp(idapp), mylocalsconf);
this.sendEmail_base('admin/'+texthtml+'/' + lang, user, tools.getAdminEmailByIdApp(idapp), mylocalsconf);
},
sendEmail_CancelBooking: function (res, lang, emailto, user, idapp, recbooking) {