Skip to content
Snippets Groups Projects
Commit ca6b4e49 authored by git-directory-deploy's avatar git-directory-deploy
Browse files

correct month

parent 7e104e98
No related branches found
No related tags found
1 merge request!572Resolve "Alerte Eau - Pb date dans template"
...@@ -77,12 +77,8 @@ const consumptionAlert = async ({ client }: ConsumptionAlertProps) => { ...@@ -77,12 +77,8 @@ const consumptionAlert = async ({ client }: ConsumptionAlertProps) => {
return return
} }
log('info', 'VALUE', lastDayValue)
log('info', 'ALERT DAY', alertDay.day)
log('info', 'Creation of mail...') log('info', 'Creation of mail...')
const mailService = new MailService() const mailService = new MailService()
const today = DateTime.local().setZone('utc', { keepLocalTime: true })
log('info', 'TODAY', today.day)
const environmentService = new EnvironmentService() const environmentService = new EnvironmentService()
const template = consumptionLimit({ const template = consumptionLimit({
...@@ -92,7 +88,7 @@ const consumptionAlert = async ({ client }: ConsumptionAlertProps) => { ...@@ -92,7 +88,7 @@ const consumptionAlert = async ({ client }: ConsumptionAlertProps) => {
clientUrl: `${appLink}/#/consumption/water`, clientUrl: `${appLink}/#/consumption/water`,
unsubscribeUrl: `${appLink}/#/options`, unsubscribeUrl: `${appLink}/#/options`,
userLimit: userProfil.waterDailyConsumptionLimit, userLimit: userProfil.waterDailyConsumptionLimit,
limitDate: `${alertDay.day} ${getPreviousMonthName(today)}`, limitDate: `${alertDay.day} ${getPreviousMonthName(alertDay)}`,
}) })
const mailData = { const mailData = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment