sms-mail_CraMail.js

const MainMail = require("./MainMail");
/**
 * @extends Myintranet.Mail_SMS.MainMail
 * @memberOf Myintranet.Mail_SMS
 */
class CraMail extends MainMail {
  /**
   * @inheritDoc
   * @returns {string}
   */
  getMailHtml() {
    let d = new Date(Date.now());
    let ci = (m) => ("" + m).length === 1 ? "0" + m : m;
    //var fullUrl = req.protocol + '://' + req.get('host') + req.originalUrl;

    let url = this.url + "/api/securedLink/" + this.user.link.token + "/cra"

    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 compte rendu d'activité 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;">
                          Charger mon CRA
                        </a>
                  </div>
                  <br/>
                  <p>Merci.</p>
            </div>`;
  }

}


module.exports = CraMail;