coverMeRourine completed :)

This commit is contained in:
Dobromir Popov
2024-04-06 12:12:01 +03:00
parent c480a4821a
commit aa4e607866
6 changed files with 99 additions and 16 deletions

View File

@ -184,11 +184,7 @@ exports.SendEmail_NewShifts = async function (publisher, shifts) {
sentDate: new Date().toLocaleDateString() // Assuming you want to include the sent date in the email
};
// Call the refactored function to send the email with Handlebars template rendering
await exports.SendEmailHandlebars(
publisher.email, // Assuming the publisher's email is to be used
"newShifts", // The name of your Handlebars template for new shifts notification
model,
await exports.SendEmailHandlebars(publisher.email, "newShifts", model,
[{
filename: "calendar.ics",
content: icsLink,
@ -200,9 +196,6 @@ exports.SendEmail_NewShifts = async function (publisher, shifts) {
//----------------------- OLD -----------------------------
// exports.SendEmail_NewShifts = async function (publisher, shifts) {

View File

@ -1,7 +1,9 @@
{{!--Subject: ССС: Нужен е заместник --}}
<section>
<h3>Търси се зместник за смяна на {{placeName}} за {{dateStr}}!</h3>
<h3>Търси се зместник
{{!-- за смяна на {{placeName}} за {{dateStr}}! --}}
</h3>
<p>Здравей {{firstName}},</p>
<p>{{prefix}} {{user.firstName}} {{user.lastName}} търси заместник.</p>
{{!-- <p><strong>Shift Details:</strong></p> --}}
@ -20,5 +22,5 @@
<p>Best regards,<br>{{name}}</p> --}}
</section>
<footer style="margin-top: 20px; text-align: center;">
<p>Изпратено до {{firstName}} {{lastName}} на {{sentDate}}</p>
<p>Изпратено до {{firstName}} {{lastName}} {{email}} {{sentDate}}</p>
</footer>

View File

@ -0,0 +1,15 @@
{{!-- Subject: ССС: Нови назначени смени--}}
<section>
<h2>Промяна твоята смяна на {{placeName}} {{dateStr}} </h2>
<p>Здравейте {{firstName}}, </p>
<p>{{firstName}} {{lastName}} ще замести {{oldPubName}} на смяната ви на {{dateStr}}</p>
<p>Новаия списък с участници за тази смяна е:</p>
{{{newPubNames}}}
<div>
</div>
</section>
<footer class="footer">
Изпратено на: {{sentDate}}
</footer>