sms-mail_PrevSMS.js

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

/**
 * @extends Myintranet.Mail_SMS.MainSMS
 * @memberOf Myintranet.Mail_SMS
 */
class PrevSMS extends MainSMS {

    /**
     * @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 + "/prev"
        return `Bonjour ${this.user.firstname} ${this.user.lastname}
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}

${url}

Merci. `;
    }

}


module.exports = PrevSMS;