diff --git a/3/ecolyo.a29511c9935a11e987b6.js b/3/ecolyo.70ee7c6a37c405135013.js similarity index 99% rename from 3/ecolyo.a29511c9935a11e987b6.js rename to 3/ecolyo.70ee7c6a37c405135013.js index b64450387f090fd00dd2e732bcc83a931754acdb..e0cfcfab7f1c7e558fcc3a4f03dfca051a4c4901 100644 --- a/3/ecolyo.a29511c9935a11e987b6.js +++ b/3/ecolyo.70ee7c6a37c405135013.js @@ -811,6 +811,8 @@ var _Dialog = _interopRequireDefault(__webpack_require__("HhgX")); var _reactRedux = __webpack_require__("/MKj"); +var _decoreText = __webpack_require__("j5h9"); + var ReleaseNotesModal = function ReleaseNotesModal(_ref) { var open = _ref.open, handleCloseClick = _ref.handleCloseClick; @@ -854,7 +856,7 @@ var ReleaseNotesModal = function ReleaseNotesModal(_ref) { className: "release-note-message text-16-bold" }, note.title), /*#__PURE__*/_react.default.createElement("div", { className: "release-note-description text-16-normal" - }, note.description)); + }, (0, _decoreText.decoreText)(note.description))); })), /*#__PURE__*/_react.default.createElement("div", { className: "release-note-button" }, /*#__PURE__*/_react.default.createElement(_Button.default, { @@ -5939,11 +5941,25 @@ var TotalConsumption = function TotalConsumption(_ref) { switch (_context.prev = _context.next) { case 0: consumptionService = new _consumption.default(client); - _context.next = 3; + + if (!(fluidType === _fluid.FluidType.ELECTRICITY)) { + _context.next = 7; + break; + } + + _context.next = 4; return consumptionService.checkDoctypeEntries(_fluid.FluidType.ELECTRICITY, _timeStep.TimeStep.HALF_AN_HOUR); - case 3: - activateHalfHourLoad = _context.sent; + case 4: + _context.t0 = _context.sent; + _context.next = 8; + break; + + case 7: + _context.t0 = false; + + case 8: + activateHalfHourLoad = _context.t0; converterService = new _converter.default(); total = 0; totalPrice = 0; @@ -5956,7 +5972,7 @@ var TotalConsumption = function TotalConsumption(_ref) { displayedValue = total <= 0 || !activateHalfHourLoad && currentTimeStep === _timeStep.TimeStep.HALF_AN_HOUR && fluidType === _fluid.FluidType.ELECTRICITY ? '-----' : fluidType === _fluid.FluidType.MULTIFLUID ? (0, _utils.formatNumberValues)(total).toString() : totalPrice <= 0 ? (0, _utils.formatNumberValues)(converterService.LoadToEuro(total, fluidType)).toString() : (0, _utils.formatNumberValues)(totalPrice).toString(); setTotalValue(displayedValue); - case 10: + case 15: case "end": return _context.stop(); } diff --git a/app/ecolyo.2eed0b689e0f4f5d6b34.js b/app/ecolyo.5cc3e1d382e6cdb43a57.js similarity index 99% rename from app/ecolyo.2eed0b689e0f4f5d6b34.js rename to app/ecolyo.5cc3e1d382e6cdb43a57.js index 7bbc79809b66fca42816341ccb1749a7cdca396b..35cde550bd4fa74f12e8adc241e7727e9e9931f4 100644 --- a/app/ecolyo.2eed0b689e0f4f5d6b34.js +++ b/app/ecolyo.5cc3e1d382e6cdb43a57.js @@ -64,7 +64,7 @@ /******/ /******/ // script path function /******/ function jsonpScriptSrc(chunkId) { -/******/ return __webpack_require__.p + "" + ({}[chunkId]||chunkId) + "/ecolyo." + {"2":"53b3b5017b9ca24efe17","3":"a29511c9935a11e987b6","4":"5e481431cf0b2359d58d","5":"be40de25a698f7337c41","6":"cf316224f80d91ba8e19","7":"8e0088481e1baf094fa4","8":"bcd9da9f5a58c3f60050","9":"b67676e3ba222d0c6efa","10":"1823bf23fa5cf052fd8e"}[chunkId] + ".js" +/******/ return __webpack_require__.p + "" + ({}[chunkId]||chunkId) + "/ecolyo." + {"2":"53b3b5017b9ca24efe17","3":"70ee7c6a37c405135013","4":"5e481431cf0b2359d58d","5":"be40de25a698f7337c41","6":"cf316224f80d91ba8e19","7":"8e0088481e1baf094fa4","8":"bcd9da9f5a58c3f60050","9":"b67676e3ba222d0c6efa","10":"1823bf23fa5cf052fd8e"}[chunkId] + ".js" /******/ } /******/ /******/ // The require function @@ -1583,8 +1583,6 @@ var SplashRoot = function SplashRoot(_ref) { case 6: migrationsResult = _context.sent; - // Init index - // await initializationService.initIndex() // Init last release notes when they exist dispatch((0, _global.showReleaseNotes)(migrationsResult.show, migrationsResult.notes)); //init Terms @@ -6361,8 +6359,8 @@ var migrations = [{ appVersion: '1.11.0', description: 'Inform user of the new SGE konnector', releaseNotes: { - title: 'Nouveau Konnector SGE', - description: 'Va tester ça cest le feu' + title: 'Vos connecteurs evoluent !', + description: "Pour continuer à accéder à vos données, merci de vous reconnecter via ce nouveau parcours. Aucune donnée ne sera perdue, et vos données seront à nouveau mises à jour quotidiennement. <p>Pourquoi ce changement ?</p> Pour faciliter l'accès aux données de consommation au plus grand nombre. Plus besoin de se créer un compte Enedis, l'accès aux données en est facilité. N'hésitez pas à en parler autour de vous ! :)" }, docTypes: '', run: function () { @@ -16847,7 +16845,6 @@ var _logger = _interopRequireDefault(__webpack_require__("gjtA")); var _dataload = __webpack_require__("D5WE"); -/* eslint-disable @typescript-eslint/no-explicit-any */ var QueryRunner = /*#__PURE__*/function () { // TODO to be clean up @@ -17254,7 +17251,7 @@ var QueryRunner = /*#__PURE__*/function () { }), endDate: maxTimePeriod.startDate.plus({ day: -1 - }).endOf('days') + }).endOf('day') }; lastDayOfPreviousMonthQuery = this.buildMaxQuery(timeStep, lastDayOfPreviousMonth, fluidType, this._max_limit); _context4.next = 9; @@ -26948,21 +26945,27 @@ var decoreText = function decoreText(line, action) { target: "_blank", rel: "noopener noreferrer" }, line.substring(indexRefEnd + 2, indexEnd)), line.substring(indexEnd + 4, line.length)); + } else if (line.includes('<p>')) { + var indexStart = line.indexOf('<p>'); + + var _indexEnd = line.indexOf('</p>'); + + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, line.substring(0, indexStart), /*#__PURE__*/_react.default.createElement("p", null, line.substring(indexStart + 3, _indexEnd)), line.substring(_indexEnd + 4, line.length)); } else if (line.includes('<span>')) { - var indexStart = line.indexOf('<span>'); + var _indexStart = line.indexOf('<span>'); - var _indexEnd = line.indexOf('</span>'); + var _indexEnd2 = line.indexOf('</span>'); - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, line.substring(0, indexStart), /*#__PURE__*/_react.default.createElement("span", null, line.substring(indexStart + 6, _indexEnd)), line.substring(_indexEnd + 7, line.length)); + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, line.substring(0, _indexStart), /*#__PURE__*/_react.default.createElement("span", null, line.substring(_indexStart + 6, _indexEnd2)), line.substring(_indexEnd2 + 7, line.length)); } else if (line.includes('<span class="action">')) { - var _indexStart = line.indexOf('<span class="action">'); + var _indexStart2 = line.indexOf('<span class="action">'); - var _indexEnd2 = line.indexOf('</span>'); + var _indexEnd3 = line.indexOf('</span>'); - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, line.substring(0, _indexStart), /*#__PURE__*/_react.default.createElement("button", { + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, line.substring(0, _indexStart2), /*#__PURE__*/_react.default.createElement("button", { className: "action", onClick: action - }, line.substring(_indexStart + 21, _indexEnd2)), line.substring(_indexEnd2 + 7, line.length)); + }, line.substring(_indexStart2 + 21, _indexEnd3)), line.substring(_indexEnd3 + 7, line.length)); } else { return line; } @@ -33869,51 +33872,48 @@ var MigrationService = /*#__PURE__*/function () { case 5: currentVersion = _context2.sent; - targetVersion = migrations[migrations.length - 1].targetSchemaVersion; - console.log('CURRENT VERSION', currentVersion); - console.log('CURRENT targetVersion', targetVersion); // Prevent Migration service to run every migration if not needed + targetVersion = migrations[migrations.length - 1].targetSchemaVersion; // Prevent Migration service to run every migration if not needed if (!(currentVersion != targetVersion)) { - _context2.next = 49; + _context2.next = 47; break; } startMigrationIndex = migrations.length - (targetVersion - currentVersion); migrationsToRun = migrations.splice(startMigrationIndex); - console.log('migrationsToRun', migrationsToRun); _iterator = _createForOfIteratorHelper(migrationsToRun); - _context2.prev = 14; + _context2.prev = 11; _iterator.s(); - case 16: + case 13: if ((_step = _iterator.n()).done) { - _context2.next = 36; + _context2.next = 33; break; } migration = _step.value; - _context2.next = 20; + _context2.next = 17; return (0, _migration.migrate)(migration, this._client); - case 20: + case 17: migrationResult = _context2.sent; _logger.default.info((0, _migration.migrationLog)(migration, migrationResult)); if (!(migrationResult.type === _migration2.MIGRATION_RESULT_FAILED)) { - _context2.next = 33; + _context2.next = 30; break; } - _context2.next = 25; + _context2.next = 22; return (0, _migration.migrate)(migration, this._client); - case 25: + case 22: result = _context2.sent; if (!(result.type === _migration2.MIGRATION_RESULT_FAILED)) { - _context2.next = 32; + _context2.next = 29; break; } @@ -33924,54 +33924,56 @@ var MigrationService = /*#__PURE__*/function () { throw new Error(); - case 32: + case 29: _logger.default.info((0, _migration.migrationLog)(migration, result)); - case 33: + case 30: if (migration.releaseNotes !== null && migrationResult.type === _migration2.MIGRATION_RESULT_COMPLETE) { releaseNotes.notes.push(migration.releaseNotes); releaseStatus = true; } - case 34: - _context2.next = 16; + case 31: + _context2.next = 13; break; - case 36: - _context2.next = 41; + case 33: + _context2.next = 38; break; - case 38: - _context2.prev = 38; - _context2.t0 = _context2["catch"](14); + case 35: + _context2.prev = 35; + _context2.t0 = _context2["catch"](11); _iterator.e(_context2.t0); - case 41: - _context2.prev = 41; + case 38: + _context2.prev = 38; _iterator.f(); - return _context2.finish(41); + return _context2.finish(38); - case 44: - releaseNotes.show = releaseStatus; + case 41: + releaseNotes.show = releaseStatus; // In case of first instance, don't show release notes + + if (startMigrationIndex === 0) releaseNotes.show = false; _logger.default.info('[Migration] Done'); return _context2.abrupt("return", releaseNotes); - case 49: + case 47: _logger.default.info('[Migration] Skipped Migration Process, already up-to-date'); return _context2.abrupt("return", releaseNotes); - case 51: + case 49: case "end": return _context2.stop(); } } - }, _callee2, this, [[14, 38, 41, 44]]); + }, _callee2, this, [[11, 35, 38, 41]]); })); function runMigrations(_x2) { @@ -36999,85 +37001,6 @@ var InitializationService = /*#__PURE__*/function () { this._setinitStep = _setinitStep; this._setinitStepError = _setinitStepError; } - /* - * Call a query with where clause to create the index if not exist - */ - // private async createIndex( - // doctype: string, - // timestep: TimeStep - // ): Promise<object> { - // const getMongoSelector = () => { - // switch (timestep) { - // case TimeStep.YEAR: - // return { - // year: { - // $lte: 9999, - // }, - // } - // case TimeStep.MONTH: - // return { - // year: { - // $lte: 9999, - // }, - // month: { - // $lte: 12, - // }, - // } - // case TimeStep.DAY: - // case TimeStep.HALF_AN_HOUR: - // return { - // year: { - // $lte: 9999, - // }, - // month: { - // $lte: 12, - // }, - // day: { - // $lte: 31, - // }, - // } - // default: - // return {} - // } - // } - // const query: QueryDefinition = Q(doctype) - // .where(getMongoSelector()) - // .limitBy(1) - // return await this._client.query(query) - // } - - /* - * create index for each Doctype - * sucess return: true - * failure throw error - */ - // public async initIndex(): Promise<boolean> { - // try { - // const accountService = new AccountService(this._client) - // const konnectorService = new KonnectorService(this._client) - // await Promise.all([ - // this.createIndex(EGL_YEAR_DOCTYPE, TimeStep.YEAR), - // this.createIndex(EGL_MONTH_DOCTYPE, TimeStep.MONTH), - // this.createIndex(EGL_DAY_DOCTYPE, TimeStep.DAY), - // this.createIndex(ENEDIS_YEAR_DOCTYPE, TimeStep.YEAR), - // this.createIndex(ENEDIS_MONTH_DOCTYPE, TimeStep.MONTH), - // this.createIndex(ENEDIS_DAY_DOCTYPE, TimeStep.DAY), - // this.createIndex(ENEDIS_MINUTE_DOCTYPE, TimeStep.HALF_AN_HOUR), - // this.createIndex(GRDF_YEAR_DOCTYPE, TimeStep.YEAR), - // this.createIndex(GRDF_MONTH_DOCTYPE, TimeStep.MONTH), - // this.createIndex(GRDF_DAY_DOCTYPE, TimeStep.DAY), - // konnectorService.createIndexKonnector(), - // accountService.createIndexAccount(), - // ]) - // log.info('[Initialization] Indexes created') - // return true - // } catch (error) { - // this._setinitStepError(InitStepsErrors.INDEX_ERROR) - // log.error('Initialization error - initIndex: ', error) - // throw error - // } - // } - /* * Check if profil exist * If not, the profil is created diff --git a/index.html b/index.html index c2fcd44828a678ed6e32f0d52c6ec32178fa8fac..2d2a72ecc4287b9fec374271fa267ab95b0f9ce0 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,user-scalable=0,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.c1180bc5cd66dfd3234e.js"></script><script src="app/ecolyo.2eed0b689e0f4f5d6b34.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,user-scalable=0,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.c1180bc5cd66dfd3234e.js"></script><script src="app/ecolyo.5cc3e1d382e6cdb43a57.js"></script></div></body></html> \ No newline at end of file diff --git a/services/aggregatorUsageEvents/ecolyo.js b/services/aggregatorUsageEvents/ecolyo.js index db858746f6bee262f56eaea5f2adfa3f70edb796..81fb0917e9f507de8bfa0e8bf2417a032d5bc6ee 100644 --- a/services/aggregatorUsageEvents/ecolyo.js +++ b/services/aggregatorUsageEvents/ecolyo.js @@ -79880,7 +79880,6 @@ var _logger = _interopRequireDefault(__webpack_require__(620)); var _dataload = __webpack_require__(612); -/* eslint-disable @typescript-eslint/no-explicit-any */ class QueryRunner { // TODO to be clean up @@ -80173,7 +80172,7 @@ class QueryRunner { }), endDate: maxTimePeriod.startDate.plus({ day: -1 - }).endOf('days') + }).endOf('day') }; const lastDayOfPreviousMonthQuery = this.buildMaxQuery(timeStep, lastDayOfPreviousMonth, fluidType, this._max_limit); const lastDayOfPreviousMonthResult = await this.fetchData(lastDayOfPreviousMonthQuery); diff --git a/services/consumptionAlert/ecolyo.js b/services/consumptionAlert/ecolyo.js index b396d7f8650a5d8ab6f526cfa73810124208dcb1..4853d877bc39121b0ff83a8db85bcee69da732a9 100644 --- a/services/consumptionAlert/ecolyo.js +++ b/services/consumptionAlert/ecolyo.js @@ -78510,7 +78510,6 @@ var _logger = _interopRequireDefault(__webpack_require__(620)); var _dataload = __webpack_require__(612); -/* eslint-disable @typescript-eslint/no-explicit-any */ class QueryRunner { // TODO to be clean up @@ -78803,7 +78802,7 @@ class QueryRunner { }), endDate: maxTimePeriod.startDate.plus({ day: -1 - }).endOf('days') + }).endOf('day') }; const lastDayOfPreviousMonthQuery = this.buildMaxQuery(timeStep, lastDayOfPreviousMonth, fluidType, this._max_limit); const lastDayOfPreviousMonthResult = await this.fetchData(lastDayOfPreviousMonthQuery); diff --git a/services/enedisHalfHourMonthlyAnalysis/ecolyo.js b/services/enedisHalfHourMonthlyAnalysis/ecolyo.js index b6c2a43bbb9d59f1b27c05a86c6ee1cd44d1876d..f9d9c6fff833ce08f2d051129669a7343cc78ddd 100644 --- a/services/enedisHalfHourMonthlyAnalysis/ecolyo.js +++ b/services/enedisHalfHourMonthlyAnalysis/ecolyo.js @@ -78420,7 +78420,6 @@ var _logger = _interopRequireDefault(__webpack_require__(620)); var _dataload = __webpack_require__(612); -/* eslint-disable @typescript-eslint/no-explicit-any */ class QueryRunner { // TODO to be clean up @@ -78713,7 +78712,7 @@ class QueryRunner { }), endDate: maxTimePeriod.startDate.plus({ day: -1 - }).endOf('days') + }).endOf('day') }; const lastDayOfPreviousMonthQuery = this.buildMaxQuery(timeStep, lastDayOfPreviousMonth, fluidType, this._max_limit); const lastDayOfPreviousMonthResult = await this.fetchData(lastDayOfPreviousMonthQuery); diff --git a/services/fluidsPrices/ecolyo.js b/services/fluidsPrices/ecolyo.js index 34ae9d3fc5a9e21b2a2ced5adfc52367db1c1ea8..23ea27c0c7e6cf478a32d787c75cb60477db7103 100644 --- a/services/fluidsPrices/ecolyo.js +++ b/services/fluidsPrices/ecolyo.js @@ -78420,7 +78420,6 @@ var _logger = _interopRequireDefault(__webpack_require__(620)); var _dataload = __webpack_require__(612); -/* eslint-disable @typescript-eslint/no-explicit-any */ class QueryRunner { // TODO to be clean up @@ -78713,7 +78712,7 @@ class QueryRunner { }), endDate: maxTimePeriod.startDate.plus({ day: -1 - }).endOf('days') + }).endOf('day') }; const lastDayOfPreviousMonthQuery = this.buildMaxQuery(timeStep, lastDayOfPreviousMonth, fluidType, this._max_limit); const lastDayOfPreviousMonthResult = await this.fetchData(lastDayOfPreviousMonthQuery); diff --git a/services/monthlyReportNotification/ecolyo.js b/services/monthlyReportNotification/ecolyo.js index e6fe0ee8510f14669ef356835cfa666958c398ce..03d92ef4c76d83884bce9d40d5074e8bd1a05fd5 100644 --- a/services/monthlyReportNotification/ecolyo.js +++ b/services/monthlyReportNotification/ecolyo.js @@ -78510,7 +78510,6 @@ var _logger = _interopRequireDefault(__webpack_require__(620)); var _dataload = __webpack_require__(612); -/* eslint-disable @typescript-eslint/no-explicit-any */ class QueryRunner { // TODO to be clean up @@ -78803,7 +78802,7 @@ class QueryRunner { }), endDate: maxTimePeriod.startDate.plus({ day: -1 - }).endOf('days') + }).endOf('day') }; const lastDayOfPreviousMonthQuery = this.buildMaxQuery(timeStep, lastDayOfPreviousMonth, fluidType, this._max_limit); const lastDayOfPreviousMonthResult = await this.fetchData(lastDayOfPreviousMonthQuery);