sms-mail_PrevMail.js

const MainMail = require("./MainMail");


/**
 * @extends Myintranet.Mail_SMS.MainMail
 * @memberOf Myintranet.Mail_SMS
 */
class PrevMail extends MainMail {
    /**
     * @inheritDoc
     * @returns {string}
     */
    getMailHtml() {
      let d = new Date(Date.now());
      let ci = (m) => ("" + m).length === 1 ? "0" + m : m;
        let url =  this.url+"/api/securedLink/"+this.user.link.token + "/prev"
        return `<div style="width: 60%; margin:0 auto; background: Azure; padding: 50px; padding-top: 0; font-size:20px">
                    ${this.getHeaderHtml()}
                    <br/>
                    <br/>
                  <p>Bonjour, <b>${this.user.firstname}</b> <b>${this.user.lastname}</b></p>
                  <p> Veuillez saisir votre prévisionnel  pour le mois du :  ${ ci(this.prevOrCra.mounth) + '-' + this.prevOrCra.year } en tant que: ${this.mission.title} chez:  ${this.employeur.denominationSocial} pour: ${this.client.denominationSocial} </p>
                  <br/>
                  <div  style="text-align: center">
                        <a href="${url}" target="_blank" style="cursor: pointer; background-color: RoyalBlue;  border: none; border-radius:20px; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px;">
                          Saisir mon prévisionnel
                        </a>
                  </div>
                  <br/>
                  <p>Merci.</p>
            </div>`;
    }

}


module.exports = PrevMail;