From 8c6e3c1c25ff25bdbbfaee46fbc88eae6e3a6eaa Mon Sep 17 00:00:00 2001 From: Bastien DUMONT <bdumont@grandlyon.com> Date: Mon, 25 Apr 2022 14:56:13 +0200 Subject: [PATCH] water alert --- src/notifications/consumptionLimit.hbs | 12 +++++++----- src/targets/services/consumptionAlert.ts | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/notifications/consumptionLimit.hbs b/src/notifications/consumptionLimit.hbs index ed7c16583..93dc11167 100644 --- a/src/notifications/consumptionLimit.hbs +++ b/src/notifications/consumptionLimit.hbs @@ -7,16 +7,18 @@ {{#> base/header}} {{/base/header}} - <mj-section background-color="#121212"> + <mj-section background-color="#121212"> <mj-column width="60%" vertical-align="middle"> <mj-text color="white" font-weight="900" font-size="24px"> Bonjour {{username}}, </mj-text> <mj-text color="white" font-weight="400" font-size="18px"> - La limite de consommation d'eau journalière que vous avez fixée à {{userLimit}} L a été dépassée le {{limitDate}}.<br /> - Pour comprendre ce qu’il s’est passé, rendez-vous dans Ecolyo. - </mj-text> - + La limite de consommation d'eau journalière que vous avez fixée à {{userLimit}} L a été dépassée.<br /> + Le <span style="color: #E3B82A; font-weight: 700;">{{limitDate}}</span>, vous avez consommé <span style="color: #3a98ec; font-weight:700;">{{consumption}}</span>.<br /> + </mj-text> + <mj-text color="white" font-weight="400" font-size="18px"> + Pour comprendre ce qu’il s’est passé, rendez-vous dans Ecolyo. + </mj-text> </mj-column> <mj-column width="40%" vertical-align="middle"> <mj-image src="{{baseUrl}}/assets/baignoire.png" width="132px" align="center"></mj-image> diff --git a/src/targets/services/consumptionAlert.ts b/src/targets/services/consumptionAlert.ts index 890094a4f..44c288a08 100644 --- a/src/targets/services/consumptionAlert.ts +++ b/src/targets/services/consumptionAlert.ts @@ -89,6 +89,7 @@ const consumptionAlert = async ({ client }: ConsumptionAlertProps) => { unsubscribeUrl: `${appLink}/#/options`, userLimit: userProfil.waterDailyConsumptionLimit, limitDate: `${alertDay.day} ${getPreviousMonthName(alertDay)}`, + consumption: lastDayValue, }) const mailData = { -- GitLab