diff --git a/app/ecolyo.81179f21c4b2bfa41693.js b/app/ecolyo.07239f05b59f0499725c.js similarity index 99% rename from app/ecolyo.81179f21c4b2bfa41693.js rename to app/ecolyo.07239f05b59f0499725c.js index 4e883410ba8ad70aaaadd0a4a9a61708888c510c..6660e540acca9568e0f51b9c08e437620cf365b9 100644 --- a/app/ecolyo.81179f21c4b2bfa41693.js +++ b/app/ecolyo.07239f05b59f0499725c.js @@ -7680,7 +7680,7 @@ var ProfileTypeService = /*#__PURE__*/function () { (0, _defineProperty2.default)(this, "year", void 0); (0, _defineProperty2.default)(this, "fetchDJU", /*#__PURE__*/function () { var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(month) { - var startDate, endDate, result, monthDju, _iterator, _step, measure, errorMessage; + var startDate, endDate, result, monthDju, degreeDayObservations, _iterator, _step, observation, errorMessage; return _regenerator.default.wrap(function _callee$(_context) { while (1) { @@ -7710,15 +7710,15 @@ var ProfileTypeService = /*#__PURE__*/function () { monthDju = 0; if (result) { - _iterator = _createForOfIteratorHelper(result.values); + degreeDayObservations = result.values.filter(function (value) { + return value.observation === 'degreeDay'; + }); + _iterator = _createForOfIteratorHelper(degreeDayObservations); try { for (_iterator.s(); !(_step = _iterator.n()).done;) { - measure = _step.value; - - if (measure.observation === 'degreeDay') { - monthDju += measure.measurement; - } + observation = _step.value; + monthDju += observation.measurement; } } catch (err) { _iterator.e(err); @@ -7727,26 +7727,24 @@ var ProfileTypeService = /*#__PURE__*/function () { } } - logStack('debug', "TEST DJU : ".concat(monthDju)); - logStack('info', "TEST DJU : ".concat(monthDju)); - logStack('error', "TEST DJU : ".concat(monthDju)); + logStack('debug', 'Month dju : ' + monthDju); if (!(monthDju === 0)) { - _context.next = 15; + _context.next = 13; break; } return _context.abrupt("return", _heating.default.dju_average_by_month[month - 1]); - case 15: + case 13: return _context.abrupt("return", monthDju); - case 16: - _context.next = 25; + case 14: + _context.next = 23; break; - case 18: - _context.prev = 18; + case 16: + _context.prev = 16; _context.t0 = _context["catch"](2); errorMessage = "fetchDju error : ".concat(JSON.stringify(_context.t0)); logStack('error', errorMessage); @@ -7756,12 +7754,12 @@ var ProfileTypeService = /*#__PURE__*/function () { Sentry.captureException(errorMessage); return _context.abrupt("return", _heating.default.dju_average_by_month[month - 1]); - case 25: + case 23: case "end": return _context.stop(); } } - }, _callee, null, [[2, 18]]); + }, _callee, null, [[2, 16]]); })); return function (_x) { diff --git a/index.html b/index.html index bc894452f9244e10d93cab3305cfc94a4ce5d5f7..f6b3331058a6f9df3c1a92821e7abba2d62c4ab5 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.69beab954af56959f24c.js"></script><script src="app/ecolyo.81179f21c4b2bfa41693.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.69beab954af56959f24c.js"></script><script src="app/ecolyo.07239f05b59f0499725c.js"></script></div></body></html> \ No newline at end of file