diff --git a/app/ecolyo.f31bb02933ab574c62f3.js b/app/ecolyo.e21f8a939634a779b2dc.js similarity index 99% rename from app/ecolyo.f31bb02933ab574c62f3.js rename to app/ecolyo.e21f8a939634a779b2dc.js index 5c745065623ce2d7a596de8af616a2e5f64780cf..61ac63cf0ca9700f4d2300e07cb9e9632cca476d 100644 --- a/app/ecolyo.f31bb02933ab574c62f3.js +++ b/app/ecolyo.e21f8a939634a779b2dc.js @@ -5033,11 +5033,11 @@ var ProfileTypeService = /*#__PURE__*/function () { } } else correctionInsulation = 0; if (hasInstalledVentilation === _enums.ThreeChoicesAnswer.YES && hasReplacedHeater === _enums.ThreeChoicesAnswer.YES && heating !== _enums.IndividualOrCollective.COLLECTIVE) { - correctionFacilities = _heating.default.adjustment_facilities['individual_heater_and_ventilation']; + correctionFacilities = _heating.default.adjustment_facilities.individual_heater_and_ventilation; } else if (hasReplacedHeater === _enums.ThreeChoicesAnswer.YES) { - correctionFacilities = _heating.default.adjustment_facilities['individual_heater']; + correctionFacilities = _heating.default.adjustment_facilities.individual_heater; } else if (hasInstalledVentilation === _enums.ThreeChoicesAnswer.YES) { - correctionFacilities = _heating.default.adjustment_facilities['individual_ventilation']; + correctionFacilities = _heating.default.adjustment_facilities.individual_ventilation; } else { correctionFacilities = 0; } @@ -15810,7 +15810,7 @@ var QuizService = /*#__PURE__*/function () { key: "getCustomQuestion", value: function () { var _getCustomQuestion = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(customQuestionEntity, fluidTypes) { - var answers, explanation, finalInterval, useFluidTypes, questionLabel, unit, unitLabel, fluidLabel, intervalAnswer, consumptionService, maxLoad, averageLoad, finalQuestion; + var answers, explanation, finalInterval, useFluidTypes, questionLabel, unit, unitLabel, fluidLabel, intervalAnswer, _maxLoad, consumptionService, maxLoad, averageLoad, finalQuestion; return _regenerator.default.wrap(function _callee8$(_context8) { while (1) { switch (_context8.prev = _context8.next) { @@ -15867,7 +15867,7 @@ var QuizService = /*#__PURE__*/function () { }); case 17: maxLoad = _context8.sent; - maxLoad = maxLoad === null ? 0 : maxLoad; + maxLoad = (_maxLoad = maxLoad) !== null && _maxLoad !== void 0 ? _maxLoad : 0; answers = this.getAnswersForNumberValue(maxLoad, unit); _context8.next = 26; break; @@ -29429,7 +29429,7 @@ var QueryRunner = /*#__PURE__*/function () { value: function getRelevantDoctype(fluidType, timeStep) { var _FluidType$ELECTRICIT, _FluidType$WATER, _FluidType$GAS, _doctypeMappings, _doctypeMappings$flui, _doctypeMappings$flui2; var doctypeMappings = (_doctypeMappings = {}, (0, _defineProperty2.default)(_doctypeMappings, _enums.FluidType.ELECTRICITY, (_FluidType$ELECTRICIT = {}, (0, _defineProperty2.default)(_FluidType$ELECTRICIT, _enums.TimeStep.HALF_AN_HOUR, _doctypes.ENEDIS_MINUTE_DOCTYPE), (0, _defineProperty2.default)(_FluidType$ELECTRICIT, _enums.TimeStep.WEEK, _doctypes.ENEDIS_DAY_DOCTYPE), (0, _defineProperty2.default)(_FluidType$ELECTRICIT, _enums.TimeStep.DAY, _doctypes.ENEDIS_DAY_DOCTYPE), (0, _defineProperty2.default)(_FluidType$ELECTRICIT, _enums.TimeStep.MONTH, _doctypes.ENEDIS_MONTH_DOCTYPE), (0, _defineProperty2.default)(_FluidType$ELECTRICIT, _enums.TimeStep.YEAR, _doctypes.ENEDIS_YEAR_DOCTYPE), (0, _defineProperty2.default)(_FluidType$ELECTRICIT, "default", _doctypes.ENEDIS_DAY_DOCTYPE), _FluidType$ELECTRICIT)), (0, _defineProperty2.default)(_doctypeMappings, _enums.FluidType.WATER, (_FluidType$WATER = {}, (0, _defineProperty2.default)(_FluidType$WATER, _enums.TimeStep.WEEK, _doctypes.EGL_DAY_DOCTYPE), (0, _defineProperty2.default)(_FluidType$WATER, _enums.TimeStep.DAY, _doctypes.EGL_DAY_DOCTYPE), (0, _defineProperty2.default)(_FluidType$WATER, _enums.TimeStep.MONTH, _doctypes.EGL_MONTH_DOCTYPE), (0, _defineProperty2.default)(_FluidType$WATER, _enums.TimeStep.YEAR, _doctypes.EGL_YEAR_DOCTYPE), (0, _defineProperty2.default)(_FluidType$WATER, "default", _doctypes.EGL_DAY_DOCTYPE), _FluidType$WATER)), (0, _defineProperty2.default)(_doctypeMappings, _enums.FluidType.GAS, (_FluidType$GAS = {}, (0, _defineProperty2.default)(_FluidType$GAS, _enums.TimeStep.WEEK, _doctypes.GRDF_DAY_DOCTYPE), (0, _defineProperty2.default)(_FluidType$GAS, _enums.TimeStep.DAY, _doctypes.GRDF_DAY_DOCTYPE), (0, _defineProperty2.default)(_FluidType$GAS, _enums.TimeStep.MONTH, _doctypes.GRDF_MONTH_DOCTYPE), (0, _defineProperty2.default)(_FluidType$GAS, _enums.TimeStep.YEAR, _doctypes.GRDF_YEAR_DOCTYPE), (0, _defineProperty2.default)(_FluidType$GAS, "default", _doctypes.GRDF_DAY_DOCTYPE), _FluidType$GAS)), _doctypeMappings); - return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2['default']) || 'default'; + return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2.default) || 'default'; } }, { key: "fetchFluidData", @@ -34595,44 +34595,37 @@ var ConsumptionDataManager = /*#__PURE__*/function () { _iterator6.s(); case 5: if ((_step6 = _iterator6.n()).done) { - _context10.next = 16; + _context10.next = 13; break; } fluidType = _step6.value; _context10.next = 9; return this._queryRunnerService.getFirstDateData(fluidType, timeStep); case 9: - _context10.t0 = _context10.sent; - if (_context10.t0) { - _context10.next = 12; - break; - } - _context10.t0 = null; - case 12: - firstDay = _context10.t0; + firstDay = _context10.sent; firstDays.push(firstDay); - case 14: + case 11: _context10.next = 5; break; - case 16: - _context10.next = 21; + case 13: + _context10.next = 18; break; + case 15: + _context10.prev = 15; + _context10.t0 = _context10["catch"](3); + _iterator6.e(_context10.t0); case 18: _context10.prev = 18; - _context10.t1 = _context10["catch"](3); - _iterator6.e(_context10.t1); - case 21: - _context10.prev = 21; _iterator6.f(); - return _context10.finish(21); - case 24: + return _context10.finish(18); + case 21: return _context10.abrupt("return", firstDays); - case 25: + case 22: case "end": return _context10.stop(); } } - }, _callee10, this, [[3, 18, 21, 24]]); + }, _callee10, this, [[3, 15, 18, 21]]); })); function fetchAllFirstDateData(_x20, _x21) { return _fetchAllFirstDateData.apply(this, arguments); @@ -34651,71 +34644,57 @@ var ConsumptionDataManager = /*#__PURE__*/function () { lastDay = null; lastDays = []; if (!(fluidTypes.length === 1)) { - _context11.next = 12; + _context11.next = 9; break; } _context11.next = 5; return this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep); case 5: - _context11.t0 = _context11.sent; - if (_context11.t0) { - _context11.next = 8; - break; - } - _context11.t0 = null; - case 8: - lastDay = _context11.t0; + lastDay = _context11.sent; lastDays.push(lastDay); - _context11.next = 35; + _context11.next = 29; break; - case 12: + case 9: if (!(fluidTypes.length > 1)) { - _context11.next = 35; + _context11.next = 29; break; } _iterator7 = _createForOfIteratorHelper(fluidTypes); - _context11.prev = 14; + _context11.prev = 11; _iterator7.s(); - case 16: + case 13: if ((_step7 = _iterator7.n()).done) { - _context11.next = 27; + _context11.next = 21; break; } fluidType = _step7.value; - _context11.next = 20; + _context11.next = 17; return this._queryRunnerService.getLastDateData(fluidType, timeStep); - case 20: - _context11.t1 = _context11.sent; - if (_context11.t1) { - _context11.next = 23; - break; - } - _context11.t1 = null; - case 23: - lastDay = _context11.t1; + case 17: + lastDay = _context11.sent; lastDays.push(lastDay); - case 25: - _context11.next = 16; + case 19: + _context11.next = 13; break; - case 27: - _context11.next = 32; + case 21: + _context11.next = 26; break; - case 29: - _context11.prev = 29; - _context11.t2 = _context11["catch"](14); - _iterator7.e(_context11.t2); - case 32: - _context11.prev = 32; + case 23: + _context11.prev = 23; + _context11.t0 = _context11["catch"](11); + _iterator7.e(_context11.t0); + case 26: + _context11.prev = 26; _iterator7.f(); - return _context11.finish(32); - case 35: + return _context11.finish(26); + case 29: return _context11.abrupt("return", lastDays); - case 36: + case 30: case "end": return _context11.stop(); } } - }, _callee11, this, [[14, 29, 32, 35]]); + }, _callee11, this, [[11, 23, 26, 29]]); })); function fetchAllLastDateData(_x22, _x23) { return _fetchAllLastDateData.apply(this, arguments); diff --git a/index.html b/index.html index 0405ed54783bb4ece12b717c8fb69193941fc5db..3f8b8567c96f4dcf438bfee621a6f66b7f1af9a0 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.f553493485ac3e325a17.js"></script><script src="app/ecolyo.f31bb02933ab574c62f3.js"></script></div></body></html> \ No newline at end of file +<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.f553493485ac3e325a17.js"></script><script src="app/ecolyo.e21f8a939634a779b2dc.js"></script></div></body></html> \ No newline at end of file diff --git a/services/aggregatorUsageEvents/ecolyo.js b/services/aggregatorUsageEvents/ecolyo.js index e6f164948991956d73e1f4b7744aeaba25c7c0ab..7a2a28f100caa9962363011ab318b6a2f5d53194 100644 --- a/services/aggregatorUsageEvents/ecolyo.js +++ b/services/aggregatorUsageEvents/ecolyo.js @@ -44468,7 +44468,7 @@ class ConsumptionDataManager { let firstDay = null; const firstDays = []; for (const fluidType of fluidTypes) { - firstDay = (await this._queryRunnerService.getFirstDateData(fluidType, timeStep)) || null; + firstDay = await this._queryRunnerService.getFirstDateData(fluidType, timeStep); firstDays.push(firstDay); } return firstDays; @@ -44477,11 +44477,11 @@ class ConsumptionDataManager { let lastDay = null; const lastDays = []; if (fluidTypes.length === 1) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep); lastDays.push(lastDay); } else if (fluidTypes.length > 1) { for (const fluidType of fluidTypes) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidType, timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidType, timeStep); lastDays.push(lastDay); } } @@ -100470,7 +100470,7 @@ class QueryRunner { default: _doctypes.GRDF_DAY_DOCTYPE } }; - return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2['default']) || 'default'; + return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2.default) || 'default'; } async fetchFluidData(timePeriod, timeStep, fluidType) { const query = this.buildListQuery(timeStep, timePeriod, fluidType, this._max_limit); diff --git a/services/consumptionAlert/ecolyo.js b/services/consumptionAlert/ecolyo.js index eef119d030559736f21e1fd4ddff6c1f4b9a7d83..ebdb268439355388c57999fffb19e7856dd32578 100644 --- a/services/consumptionAlert/ecolyo.js +++ b/services/consumptionAlert/ecolyo.js @@ -44065,7 +44065,7 @@ class ConsumptionDataManager { let firstDay = null; const firstDays = []; for (const fluidType of fluidTypes) { - firstDay = (await this._queryRunnerService.getFirstDateData(fluidType, timeStep)) || null; + firstDay = await this._queryRunnerService.getFirstDateData(fluidType, timeStep); firstDays.push(firstDay); } return firstDays; @@ -44074,11 +44074,11 @@ class ConsumptionDataManager { let lastDay = null; const lastDays = []; if (fluidTypes.length === 1) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep); lastDays.push(lastDay); } else if (fluidTypes.length > 1) { for (const fluidType of fluidTypes) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidType, timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidType, timeStep); lastDays.push(lastDay); } } @@ -100067,7 +100067,7 @@ class QueryRunner { default: _doctypes.GRDF_DAY_DOCTYPE } }; - return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2['default']) || 'default'; + return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2.default) || 'default'; } async fetchFluidData(timePeriod, timeStep, fluidType) { const query = this.buildListQuery(timeStep, timePeriod, fluidType, this._max_limit); diff --git a/services/enedisHalfHourMonthlyAnalysis/ecolyo.js b/services/enedisHalfHourMonthlyAnalysis/ecolyo.js index 873e4a440126a851df3409801f518c4b49be1332..cb22cd129da537ae28530ed31dd35f2314e6182b 100644 --- a/services/enedisHalfHourMonthlyAnalysis/ecolyo.js +++ b/services/enedisHalfHourMonthlyAnalysis/ecolyo.js @@ -44065,7 +44065,7 @@ class ConsumptionDataManager { let firstDay = null; const firstDays = []; for (const fluidType of fluidTypes) { - firstDay = (await this._queryRunnerService.getFirstDateData(fluidType, timeStep)) || null; + firstDay = await this._queryRunnerService.getFirstDateData(fluidType, timeStep); firstDays.push(firstDay); } return firstDays; @@ -44074,11 +44074,11 @@ class ConsumptionDataManager { let lastDay = null; const lastDays = []; if (fluidTypes.length === 1) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep); lastDays.push(lastDay); } else if (fluidTypes.length > 1) { for (const fluidType of fluidTypes) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidType, timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidType, timeStep); lastDays.push(lastDay); } } @@ -100067,7 +100067,7 @@ class QueryRunner { default: _doctypes.GRDF_DAY_DOCTYPE } }; - return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2['default']) || 'default'; + return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2.default) || 'default'; } async fetchFluidData(timePeriod, timeStep, fluidType) { const query = this.buildListQuery(timeStep, timePeriod, fluidType, this._max_limit); diff --git a/services/fluidsPrices/ecolyo.js b/services/fluidsPrices/ecolyo.js index 5b573e09ad1e33b0dca87c759344342ca8605dca..f161dcdff1d9df0d76267a7c3c226f53dd18d96a 100644 --- a/services/fluidsPrices/ecolyo.js +++ b/services/fluidsPrices/ecolyo.js @@ -44065,7 +44065,7 @@ class ConsumptionDataManager { let firstDay = null; const firstDays = []; for (const fluidType of fluidTypes) { - firstDay = (await this._queryRunnerService.getFirstDateData(fluidType, timeStep)) || null; + firstDay = await this._queryRunnerService.getFirstDateData(fluidType, timeStep); firstDays.push(firstDay); } return firstDays; @@ -44074,11 +44074,11 @@ class ConsumptionDataManager { let lastDay = null; const lastDays = []; if (fluidTypes.length === 1) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep); lastDays.push(lastDay); } else if (fluidTypes.length > 1) { for (const fluidType of fluidTypes) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidType, timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidType, timeStep); lastDays.push(lastDay); } } @@ -100067,7 +100067,7 @@ class QueryRunner { default: _doctypes.GRDF_DAY_DOCTYPE } }; - return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2['default']) || 'default'; + return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2.default) || 'default'; } async fetchFluidData(timePeriod, timeStep, fluidType) { const query = this.buildListQuery(timeStep, timePeriod, fluidType, this._max_limit); @@ -101156,12 +101156,13 @@ const applyPrices = async (client, fluidType) => { Object.assign(date, firstDate); try { do { + var _data$data; const priceData = await fluidsPricesService.getPrices(fluidType, date); const timePeriod = await getTimePeriod(timeStep, date); const data = await qr.fetchFluidRawDoctype(timePeriod, timeStep, fluidType); // If lastItem has a price, skip this day (in order to save perf) - const lastItem = (data === null || data === void 0 ? void 0 : data.data) && data.data[data.data.length - 1]; + const lastItem = data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data[data.data.length - 1]; if (lastItem && priceData) { // if a price has been updated in backoffice re-calculates all price from the firstEditedPriceDate data === null || data === void 0 ? void 0 : data.data.forEach(element => { diff --git a/services/monthlyReportNotification/ecolyo.js b/services/monthlyReportNotification/ecolyo.js index fc638531ddf1ab9d8f9aa9b927e761148ec7e72b..11907848cc1a4177b93f5d95324493a60ee00e7d 100644 --- a/services/monthlyReportNotification/ecolyo.js +++ b/services/monthlyReportNotification/ecolyo.js @@ -44065,7 +44065,7 @@ class ConsumptionDataManager { let firstDay = null; const firstDays = []; for (const fluidType of fluidTypes) { - firstDay = (await this._queryRunnerService.getFirstDateData(fluidType, timeStep)) || null; + firstDay = await this._queryRunnerService.getFirstDateData(fluidType, timeStep); firstDays.push(firstDay); } return firstDays; @@ -44074,11 +44074,11 @@ class ConsumptionDataManager { let lastDay = null; const lastDays = []; if (fluidTypes.length === 1) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidTypes[0], timeStep); lastDays.push(lastDay); } else if (fluidTypes.length > 1) { for (const fluidType of fluidTypes) { - lastDay = (await this._queryRunnerService.getLastDateData(fluidType, timeStep)) || null; + lastDay = await this._queryRunnerService.getLastDateData(fluidType, timeStep); lastDays.push(lastDay); } } @@ -100067,7 +100067,7 @@ class QueryRunner { default: _doctypes.GRDF_DAY_DOCTYPE } }; - return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2['default']) || 'default'; + return ((_doctypeMappings$flui = doctypeMappings[fluidType]) === null || _doctypeMappings$flui === void 0 ? void 0 : _doctypeMappings$flui[timeStep]) || ((_doctypeMappings$flui2 = doctypeMappings[fluidType]) === null || _doctypeMappings$flui2 === void 0 ? void 0 : _doctypeMappings$flui2.default) || 'default'; } async fetchFluidData(timePeriod, timeStep, fluidType) { const query = this.buildListQuery(timeStep, timePeriod, fluidType, this._max_limit);