Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • web-et-numerique/factory/llle_project/ecolyo
1 result
Select Git revision
Show changes
Commits on Source (21)
Showing
with 237 additions and 164 deletions
...@@ -2,84 +2,104 @@ ...@@ -2,84 +2,104 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.4.0](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/compare/v1.3.0...v1.4.0) (2021-10-26) ### [1.4.1](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/compare/v1.4.0...v1.4.1) (2021-10-29)
### Features
* **conso:** Comparison graph now scales on comparison data if no actual data instead of default scale ([18c12b7](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/18c12b718c476381c1044fc1cfa1e729290660f1))
* **conso:** Display timestep names in timeStepSelector except for very small screens ([8660adc](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/8660adc6010642b6307b2578b7602b1a91d82038))
* **ProfileType:** First profileType created by user acts as default ([6d41cb2](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/6d41cb247bf677b0136aafb3385763db5be859ec))
### Bug Fixes
* **Analysis:** Fix analysis navigation and bad month issue ([fe9f212](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/fe9f21237950bc3e4ac1462b1ee1eaf5baaf71ff))
* **conso:** remove lastdatadate check from multifluid ([a735e14](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/a735e14df3465e684205a7f4879b76fbd665acc6))
* **conso:** Replace png error picto with svg and display it in konnector card if outdated data ([2e4f959](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/2e4f959a70edc303b3ec305274b7349bce606cc3))
* **konnector:** prevent modal to show success message when login success event and show form in background while loading data ([7818e59](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/7818e59d03e77f2883e362762edf123e54fefa59))
## [1.4.0](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/compare/v1.3.0...v1.4.0) (2021-10-26)
### ⚠ BREAKING CHANGES ### ⚠ BREAKING CHANGES
* **conso:** Removed haveSeenOldFluidDataModal from profile doctype. - **Conso:** Removed haveSeenOldFluidDataModal from profile doctype.
- **Profile:** Removed GCUApprovalDate from profile doctype.
### Features ### Features
* add multifluid compare ([ac73962](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ac73962f4f49aba0c34f3850c213b1471a0d5649)) - add multifluid compare ([ac73962](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ac73962f4f49aba0c34f3850c213b1471a0d5649))
* **BarChart:** new striped chart bars when data is missing ([e0d19f4](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e0d19f477f912a73c1a1329345681cd72607e3bc)) - **BarChart:** new striped chart bars when data is missing ([e0d19f4](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e0d19f477f912a73c1a1329345681cd72607e3bc))
* **Chart:** Delay gas data display in charts by 1 more day (J+3) ([9af1aec](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/9af1aecd40a590d540cdf3b3b767a3093a81497a)) - **Chart:** Delay gas data display in charts by 1 more day (J+3) ([9af1aec](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/9af1aecd40a590d540cdf3b3b767a3093a81497a))
* **conso:** Add new display rules for missing data in the consumption visualizer and in konnector cards ([28ea281](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/28ea2817f317792afa71e2be68715435aff69aa6)) - **Conso:** Add new display rules for missing data in the consumption visualizer and in konnector cards ([28ea281](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/28ea2817f317792afa71e2be68715435aff69aa6))
* **conso:** Add price estimation modal for multifluid screen ([810507e](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/810507e5e8b3ffe1a8b39e7ee8cd34bfca5d4974)) - **Conso:** Add price estimation modal for multifluid screen ([810507e](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/810507e5e8b3ffe1a8b39e7ee8cd34bfca5d4974))
* **conso:** Add today button ([b0244ee](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/b0244ee370806992d0b63ddaed7e2d4dc7b06997)) - **Conso:** Add today button ([b0244ee](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/b0244ee370806992d0b63ddaed7e2d4dc7b06997))
* **conso:** Delete double navigation arrows ([228969f](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/228969fb7fecd8b98ce182fe4c704d49f902fc64)) - **Conso:** Delete double navigation arrows ([228969f](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/228969fb7fecd8b98ce182fe4c704d49f902fc64))
* **conso:** Display missing data text if not data and redirects to konnector update on click ([ca9a55f](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ca9a55fa9af9f1ba400d99fad6aa7e88c642c761)) - **Conso:** Display missing data text if not data and redirects to konnector update on click ([ca9a55f](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ca9a55fa9af9f1ba400d99fad6aa7e88c642c761))
* **conso:** Rework fluid navigation ([a63b2de](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/a63b2de45f9af41b5089467390760221f8797599)) - **Conso:** Rework fluid navigation ([a63b2de](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/a63b2de45f9af41b5089467390760221f8797599))
* **egl-login-form:** Changed rules to limit to 7 digits ([bccdef8](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/bccdef8ff1c24886585a2ce1a80979de87b93474)) - **Conso**: last valid date not displayed for old values ([d685ca6](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/d685ca60091587d71a071a743fbfa48c0a38867a))
* **energy-prices:** edited new energy prices ([aae16d5](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/aae16d5e437c8b9f38cc73e758dec41c2dbec259)) - **Egl-login-form:** Changed rules to limit to 7 digits ([bccdef8](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/bccdef8ff1c24886585a2ce1a80979de87b93474))
* last valid date not displayed for old values ([d685ca6](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/d685ca60091587d71a071a743fbfa48c0a38867a)) - **Energy-prices:** edited new energy prices ([aae16d5](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/aae16d5e437c8b9f38cc73e758dec41c2dbec259))
### Bug Fixes ### Bug Fixes
* change estimation pop-up text ([ebf1534](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ebf1534b4ea4c9fe8a40620ccfd4de114f50e93a)) - change estimation pop-up text ([ebf1534](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ebf1534b4ea4c9fe8a40620ccfd4de114f50e93a))
* **chart:** Show Comparison if no current dataload but there is comparison data ([d0b396b](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/d0b396b26dbfd985a2e6c485dc14ac895abf65d7)) - **Chart:** Show Comparison if no current dataload but there is comparison data ([d0b396b](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/d0b396b26dbfd985a2e6c485dc14ac895abf65d7))
* **chart:** Show Comparison if no current dataload but there is comparison data ([b042b79](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/b042b795400964e1e128f014b8fa69b523579ca5)) - **Chart:** Show Comparison if no current dataload but there is comparison data ([b042b79](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/b042b795400964e1e128f014b8fa69b523579ca5))
* **conso:** Change display when datahole in multifluid ([17c9e32](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/17c9e32dd04fc1f997042f941af021fc1953a896)) - **Conso:** Change display when datahole in multifluid ([17c9e32](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/17c9e32dd04fc1f997042f941af021fc1953a896))
* date display issue on last valid date ([068581b](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/068581bee024f970ab8c41231eb0faf3192ca0ee)) - date display issue on last valid date ([068581b](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/068581bee024f970ab8c41231eb0faf3192ca0ee))
* design issues on multifluid view for compare ([16f48d8](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/16f48d8d0c996aaa5538d3c8c8c2b1bd6a9f5294)) - design issues on multifluid view for compare ([16f48d8](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/16f48d8d0c996aaa5538d3c8c8c2b1bd6a9f5294))
* load has to be over zero too ([e106f5b](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e106f5bc04d0dcc73448f07f0c4abb31a03928b4)) - load has to be over zero too ([e106f5b](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e106f5bc04d0dcc73448f07f0c4abb31a03928b4))
* **loadConverter:** Loads below 0.01cts now equal 0.01cts ([b0b3cb9](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/b0b3cb9a2073103a5ae8a0d728a3e84f237228cd)) - **LoadConverter:** Loads below 0.01cts now equal 0.01cts ([b0b3cb9](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/b0b3cb9a2073103a5ae8a0d728a3e84f237228cd))
* **options:** Change section and button spacing ([e7fa061](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e7fa061ea948936e90dfb2a4789d5840f2d777c5)) - **Options:** Change section and button spacing ([e7fa061](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e7fa061ea948936e90dfb2a4789d5840f2d777c5))
* **timePeriod:** Test + use config dataOffset value ([8dbca9d](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/8dbca9dfc4a7bca10991d618f6b318d9e8b08181)) - **TimePeriod:** Test + use config dataOffset value ([8dbca9d](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/8dbca9dfc4a7bca10991d618f6b318d9e8b08181))
## [1.3.0](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/compare/v1.2.4...v1.3.0) (2021-10-26) ## [1.3.0](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/compare/v1.2.4...v1.3.0) (2021-10-26)
### Features ### Features
* add ecogestures season display ([31bda81](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/31bda8173ff4b14598df0248f467e253348392aa)) - add ecogestures season display ([31bda81](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/31bda8173ff4b14598df0248f467e253348392aa))
* **alert-consumption:** water consumption alert notification ([4362589](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/4362589ba70b86732f17db01d54a323913affcb7)) - **Alert-consumption:** water consumption alert notification ([4362589](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/4362589ba70b86732f17db01d54a323913affcb7))
* **assets:** Added Dockerfile to convert and bundle assets in a container for Ecolyo Agent ([15fe04c](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/15fe04c0f2dd49728b86322716624bc671174243)) - **Assets:** Added Dockerfile to convert and bundle assets in a container for Ecolyo Agent ([15fe04c](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/15fe04c0f2dd49728b86322716624bc671174243))
* **cicd:** update image repo to work with proxy ([e067ea1](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e067ea1e09f687f48635907a4fb4a953e95aa22e)) - **CICD:** update image repo to work with proxy ([e067ea1](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e067ea1e09f687f48635907a4fb4a953e95aa22e))
* **ecogestures:** new designs and texts for ecogestures ([923f451](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/923f451abf8e05acc01c8dd0c63fc4af4019a65f)) - **Ecogestures:** new designs and texts for ecogestures ([923f451](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/923f451abf8e05acc01c8dd0c63fc4af4019a65f))
* **mail:** add new templating with ejs and mjml. ([2402c40](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/2402c4063e3089e4a9a428a2f220e5c545f69999)) - **Email:** add new templating with ejs and mjml. ([2402c40](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/2402c4063e3089e4a9a428a2f220e5c545f69999))
* migration stack added ([ac71930](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ac71930be8013182c767c5309cdd503daceb5491)) - migration stack added ([ac71930](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ac71930be8013182c767c5309cdd503daceb5491))
### Bug Fixes ### Bug Fixes
* **assets:** changed assets file tree in Dockerfile ([7609bc4](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/7609bc4b3a04db7929c5ce34e0f6ecf4f0bd538d)) - **Assets:** changed assets file tree in Dockerfile ([7609bc4](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/7609bc4b3a04db7929c5ce34e0f6ecf4f0bd538d))
* **challenge:** Improve challenge cards display for small screens ([39e1fa0](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/39e1fa005881393bbec3af2a8e371b4def36536d)) - **Challenge:** Improve challenge cards display for small screens ([39e1fa0](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/39e1fa005881393bbec3af2a8e371b4def36536d))
* Change ecogesture card size for desktop ([8b17302](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/8b17302b330bef87ab55a6fffa7f7c7bfb3fe6e4)) - Change ecogesture card size for desktop ([8b17302](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/8b17302b330bef87ab55a6fffa7f7c7bfb3fe6e4))
* **cicd:** add proxy config ([e01545c](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e01545c6d1d2835efc4dbf31388baf1674f7e6a5)) - **CICD:** add proxy config ([e01545c](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e01545c6d1d2835efc4dbf31388baf1674f7e6a5))
* **conso:** Change text for annual comparison ([e313f1e](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e313f1e8622d7c0ee43522b51c0e1347bb796326)) - **Conso:** Change text for annual comparison ([e313f1e](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e313f1e8622d7c0ee43522b51c0e1347bb796326))
* **conso:** Change text for annual comparison ([766e55d](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/766e55ddadd77f1f5a0c418d76691ad8c0781b12)) - **Conso:** Change text for annual comparison ([766e55d](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/766e55ddadd77f1f5a0c418d76691ad8c0781b12))
* **dacc:** issue on event-duration event, group3 was not defined ([6e67ca6](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/6e67ca60626e469b222ae6ea8bb32416482eb6d9)) - **DACC:** issue on event-duration event, group3 was not defined ([6e67ca6](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/6e67ca60626e469b222ae6ea8bb32416482eb6d9))
* **ecogesture:** ecogestures with no season are now on top when season is fall or spring ([a6a5a7e](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/a6a5a7ef0f674c6151769259366afdba8fabe754)) - **Ecogesture:** ecogestures with no season are now on top when season is fall or spring ([a6a5a7e](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/a6a5a7ef0f674c6151769259366afdba8fabe754))
* **ecogestures:** fix default displayed text + broken display ([ac687f4](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ac687f4b368953a95eca7ddb2c00dbc5aa290a89)) - **Ecogestures:** fix default displayed text + broken display ([ac687f4](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ac687f4b368953a95eca7ddb2c00dbc5aa290a89))
* **email:** change assets from .svg to .png and update mail titles and content ([e090b34](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e090b34d5e015c47c11a878974c9e128e3066878)) - **Email:** change assets from .svg to .png and update mail titles and content ([e090b34](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/e090b34d5e015c47c11a878974c9e128e3066878))
* **email:** link with image alignment ([229ff09](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/229ff09db2bcd22e9a6e6ae8365d91e8bd61c6c6)) - **Email:** link with image alignment ([229ff09](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/229ff09db2bcd22e9a6e6ae8365d91e8bd61c6c6))
* **email:** missing assets for email rendering + switch link to remote doctype ([215a327](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/215a3279f4373cdb211ed035fb22e82fc6ee5720)) - **Email:** missing assets for email rendering + switch link to remote doctype ([215a327](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/215a3279f4373cdb211ed035fb22e82fc6ee5720))
* **email:** small design issues ([566888a](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/566888a4bacdf935c7c3c963d9e7101915c3e26b)) - **Email:** small design issues ([566888a](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/566888a4bacdf935c7c3c963d9e7101915c3e26b))
* **email:** update font handling + issue on title ([c8f3465](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/c8f346506ea8ae0613a5c80a4c4dcd5e9967b7b6)) - **Email:** update font handling + issue on title ([c8f3465](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/c8f346506ea8ae0613a5c80a4c4dcd5e9967b7b6))
* **email:** update mail title ([254dde1](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/254dde13edc73778bc9cc45d4d22ee84a102fd20)) - **Email:** update mail title ([254dde1](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/254dde13edc73778bc9cc45d4d22ee84a102fd20))
* **email:** update typo handling ([477adce](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/477adcef971561ba422c7c2c0bb992685078aa55)) - **Email:** update typo handling ([477adce](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/477adcef971561ba422c7c2c0bb992685078aa55))
* **gitlab-ci:** remove unused image ([10335ad](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/10335adcdedd65e8f565db148b28225578bfc502)) - **CICD:** remove unused image ([10335ad](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/10335adcdedd65e8f565db148b28225578bfc502))
* half-hour consumption display had wrong format. Update format for better handling. Ref [#143](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/issues/143) ([04a96d3](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/04a96d319294bd5d1ea34725c93e39f0d3ffbe28)) - half-hour consumption display had wrong format. Update format for better handling. Ref [#143](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/issues/143) ([04a96d3](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/04a96d319294bd5d1ea34725c93e39f0d3ffbe28))
* **mail:** add font for email ([3590170](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/35901700e6fc7bc8305cf2a87828b8fe4c4780fd)) - **Mail:** add font for email ([3590170](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/35901700e6fc7bc8305cf2a87828b8fe4c4780fd))
* **mail:** change text for consumption and alert email ([2abb667](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/2abb66757378edd74cf5dec793dd4b55fd986777)) - **Mail:** change text for consumption and alert email ([2abb667](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/2abb66757378edd74cf5dec793dd4b55fd986777))
* **migrations:** profileType migrations ([97becec](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/97bececf3d363fa99caa87d340818bd5df6696e7)) - **Migrations:** docTypes migrations ([97becec](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/97bececf3d363fa99caa87d340818bd5df6696e7))
* **profileTypeData.json:** changed initializing template ([1a2cfc9](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/1a2cfc9dd8c0cb67e0e72f7d5ede92027a45b7dc)) - getProfile now returns default json profileType when no userProfileType can be found
* **profileType:** save new updateDate when updating profileType ([3464515](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/34645158a7163c8cf6215bbb5817354bdc816bd3)) - **Default profileType is never stored in database**
* **scrollTopTop:** scrollbar now goes back to top of th page ([5a70468](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/5a70468366ac07a0619c70183b302291fdf673cb)) - Migrations check docToUpdate array before assessing if an operation is possible (no doctype = NOOP)
* **tests:** Mock getSeason in action service tests ([8418842](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/8418842666627aa05c56f558327c313b5383f3fa)) - Migrations can now use cozy.client to query more doctypes when preparing for an operation
* **warnings:** Remove unused imports and complete dependencies useEffect's arrays ([4b955e2](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/4b955e2b5ce0d551865a78ff0a792a72178c334c)) - Migration sorts array of profileType to make sure the oldest profileType is deleted.
- UserChallenge quiz is checked to make sure no quiz result are overflowing (> 5)
- **ProfileTypeData.json:** changed initializing template ([1a2cfc9](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/1a2cfc9dd8c0cb67e0e72f7d5ede92027a45b7dc))
- **ProfileType:** save new updateDate when updating profileType ([3464515](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/34645158a7163c8cf6215bbb5817354bdc816bd3))
- **ScrollTopTop:** scrollbar now goes back to top of th page ([5a70468](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/5a70468366ac07a0619c70183b302291fdf673cb))
- **Tests:** Mock getSeason in action service tests ([8418842](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/8418842666627aa05c56f558327c313b5383f3fa))
- **Warnings:** Remove unused imports and complete dependencies useEffect's arrays ([4b955e2](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/4b955e2b5ce0d551865a78ff0a792a72178c334c))
### [1.2.4-beta.1](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/compare/v1.2.4...v1.2.4-beta.1) (2021-09-21) ### [1.2.4-beta.1](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/compare/v1.2.4...v1.2.4-beta.1) (2021-09-21)
...@@ -651,7 +671,7 @@ All notable changes to this project will be documented in this file. See [standa ...@@ -651,7 +671,7 @@ All notable changes to this project will be documented in this file. See [standa
- set luxon dates to utc ([804f128](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/804f1284070e85ff5566fcb261228ca9205b22fd)) - set luxon dates to utc ([804f128](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/804f1284070e85ff5566fcb261228ca9205b22fd))
- set mobile or desktop for ConnectionEvent ([279cb4f](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/279cb4f5545f895f22b56d3831329f2d412fc62c)) - set mobile or desktop for ConnectionEvent ([279cb4f](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/279cb4f5545f895f22b56d3831329f2d412fc62c))
- set notification on init ([de04f0b](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/de04f0b849e3a424dc1d5fe4a7260333904d8a54)) - set notification on init ([de04f0b](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/de04f0b849e3a424dc1d5fe4a7260333904d8a54))
- set only <li> in the <ul> ([06811bf](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/06811bf5820e28f22a4301a4ec8710724f8896ee)) - set only in the ([06811bf](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/06811bf5820e28f22a4301a4ec8710724f8896ee))
- set profile between step ([eb17803](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/eb1780331fbf004008438ed162fb8560e1aa5573)) - set profile between step ([eb17803](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/eb1780331fbf004008438ed162fb8560e1aa5573))
- set startDate to QuizEndEvent ([1e1ad99](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/1e1ad990fb7f6b9a95c08714db01394421d400aa)) - set startDate to QuizEndEvent ([1e1ad99](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/1e1ad990fb7f6b9a95c08714db01394421d400aa))
- set style for cv-button ([ddeb533](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ddeb5331d7bf91f30b609c631bd008d96f2d38f0)) - set style for cv-button ([ddeb533](https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/commit/ddeb5331d7bf91f30b609c631bd008d96f2d38f0))
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"slug": "ecolyo", "slug": "ecolyo",
"icon": "icon.svg", "icon": "icon.svg",
"categories": ["energy"], "categories": ["energy"],
"version": "1.3.0", "version": "1.4.0",
"licence": "AGPL-3.0", "licence": "AGPL-3.0",
"editor": "Métropole de Lyon", "editor": "Métropole de Lyon",
"default_locale": "fr", "default_locale": "fr",
......
{ {
"name": "ecolyo", "name": "ecolyo",
"version": "1.4.0", "version": "1.4.1",
"scripts": { "scripts": {
"tx": "tx pull --all || true", "tx": "tx pull --all || true",
"lint": "yarn lint:js && yarn lint:styles", "lint": "yarn lint:js && yarn lint:styles",
......
src/assets/png/picto/picto-failure.png

1.16 KiB

...@@ -82,7 +82,7 @@ const AnalysisConsumption: React.FC<AnalysisConsumptionProps> = ({ ...@@ -82,7 +82,7 @@ const AnalysisConsumption: React.FC<AnalysisConsumptionProps> = ({
analysisDate.year analysisDate.year
) )
const monthlyForecast: MonthlyForecast = await profileTypeService.getMonthlyForecast( const monthlyForecast: MonthlyForecast = await profileTypeService.getMonthlyForecast(
analysisDate.month - 1 analysisDate.minus({ month: 1 }).startOf('month').month
) )
if (subscribed) { if (subscribed) {
setForecast(monthlyForecast) setForecast(monthlyForecast)
......
...@@ -49,11 +49,19 @@ const BarChart: React.FC<BarChartProps> = ({ ...@@ -49,11 +49,19 @@ const BarChart: React.FC<BarChartProps> = ({
const maxCompare = chartData.comparisonData const maxCompare = chartData.comparisonData
? Math.max(...chartData.comparisonData.map(d => d.value)) ? Math.max(...chartData.comparisonData.map(d => d.value))
: 0 : 0
let max = chartData.actualData
const max = chartData.actualData
? Math.max(...chartData.actualData.map(d => d.value)) ? Math.max(...chartData.actualData.map(d => d.value))
: 0 : 0
max = max <= 0 ? 15 : max
return showCompare ? Math.max(max, maxCompare) : max if (showCompare) {
if (max <= 0 && maxCompare <= 0) return 15
else return Math.max(max, maxCompare)
} else {
if (max <= 0) {
return 15
} else return max
}
} }
const xScale: ScaleBand<string> = scaleBand() const xScale: ScaleBand<string> = scaleBand()
......
...@@ -24,7 +24,6 @@ const LastDataConsumptionVisualizer: React.FC<LastDataConsumptionVisualizerProps ...@@ -24,7 +24,6 @@ const LastDataConsumptionVisualizer: React.FC<LastDataConsumptionVisualizerProps
) )
const moveToDate = () => { const moveToDate = () => {
console.log(fluidType)
if (lastDataDate) { if (lastDataDate) {
const dateChartService = new DateChartService() const dateChartService = new DateChartService()
const updatedIndex: number = dateChartService.defineDateIndex( const updatedIndex: number = dateChartService.defineDateIndex(
......
...@@ -8,7 +8,7 @@ import { DateTime } from 'luxon' ...@@ -8,7 +8,7 @@ import { DateTime } from 'luxon'
import classNames from 'classnames' import classNames from 'classnames'
import DateChartService from 'services/dateChart.service' import DateChartService from 'services/dateChart.service'
import { isLastDateReached, isLastPeriodReached } from 'utils/date' import { isLastDateReached } from 'utils/date'
import DateNavigatorFormat from 'components/DateNavigator/DateNavigatorFormat' import DateNavigatorFormat from 'components/DateNavigator/DateNavigatorFormat'
import LeftArrowIcon from 'assets/icons/ico/left-arrow.svg' import LeftArrowIcon from 'assets/icons/ico/left-arrow.svg'
...@@ -43,10 +43,7 @@ const DateNavigator: React.FC<DateNavigatorProps> = ({ ...@@ -43,10 +43,7 @@ const DateNavigator: React.FC<DateNavigatorProps> = ({
const disableNext: boolean = currentAnalysisDate const disableNext: boolean = currentAnalysisDate
? isLastDateReached(currentAnalysisDate, TimeStep.MONTH) ? isLastDateReached(currentAnalysisDate, TimeStep.MONTH)
: isLastDateReached(selectedDate, currentTimeStep) : isLastDateReached(selectedDate, currentTimeStep)
const disableNextSlide: boolean = isLastPeriodReached(
selectedDate,
currentTimeStep
)
const dateChartService = new DateChartService() const dateChartService = new DateChartService()
const handleClickMove = (increment: number) => { const handleClickMove = (increment: number) => {
...@@ -79,21 +76,21 @@ const DateNavigator: React.FC<DateNavigatorProps> = ({ ...@@ -79,21 +76,21 @@ const DateNavigator: React.FC<DateNavigatorProps> = ({
selectedDate, selectedDate,
currentIndex currentIndex
) )
handleClickMove(increment) if (currentAnalysisDate) {
handleClickMove(-1)
} else handleClickMove(increment)
} }
} }
const handleChangeNextIndex = () => { const handleChangeNextIndex = () => {
console.log(!isKonnectorActive(fluidStatus, FluidType.MULTIFLUID)) if (!disableNext && isKonnectorActive(fluidStatus, FluidType.MULTIFLUID)) {
if (
!disableNextSlide &&
isKonnectorActive(fluidStatus, FluidType.MULTIFLUID)
) {
const increment: number = dateChartService.defineIncrementForNextIndex( const increment: number = dateChartService.defineIncrementForNextIndex(
currentTimeStep, currentTimeStep,
selectedDate, selectedDate,
currentIndex currentIndex
) )
handleClickMove(increment) if (currentAnalysisDate) {
handleClickMove(1)
} else handleClickMove(increment)
} }
} }
......
...@@ -15,7 +15,6 @@ import StyledSwitch from 'components/CommonKit/Switch/StyledSwitch' ...@@ -15,7 +15,6 @@ import StyledSwitch from 'components/CommonKit/Switch/StyledSwitch'
import TimeStepSelector from 'components/TimeStepSelector/TimeStepSelector' import TimeStepSelector from 'components/TimeStepSelector/TimeStepSelector'
import ActivateHalfHourLoad from 'components/ActivateHalfHourLoad/ActivateHalfHourLoad' import ActivateHalfHourLoad from 'components/ActivateHalfHourLoad/ActivateHalfHourLoad'
import FluidChartSwipe from './FluidChartSwipe' import FluidChartSwipe from './FluidChartSwipe'
import ConsumptionVisualizer from 'components/ConsumptionVisualizer/ConsumptionVisualizer'
import { UsageEventType } from 'enum/usageEvent.enum' import { UsageEventType } from 'enum/usageEvent.enum'
import UsageEventService from 'services/usageEvent.service' import UsageEventService from 'services/usageEvent.service'
......
...@@ -37,6 +37,13 @@ const ConsumptionView: React.FC<ConsumptionViewProps> = ({ ...@@ -37,6 +37,13 @@ const ConsumptionView: React.FC<ConsumptionViewProps> = ({
) )
const [active, setActive] = useState<boolean>(false) const [active, setActive] = useState<boolean>(false)
/* eslint-disable @typescript-eslint/no-non-null-assertion */
const lastDataDate =
fluidType !== FluidType.MULTIFLUID && fluidStatus[fluidType].lastDataDate
? fluidStatus[fluidType].lastDataDate!.toLocaleString()
: ''
const defineHeaderHeight = useCallback((height: number) => { const defineHeaderHeight = useCallback((height: number) => {
setHeaderHeight(height) setHeaderHeight(height)
}, []) }, [])
...@@ -74,7 +81,11 @@ const ConsumptionView: React.FC<ConsumptionViewProps> = ({ ...@@ -74,7 +81,11 @@ const ConsumptionView: React.FC<ConsumptionViewProps> = ({
['--hidden']: loading, ['--hidden']: loading,
})} })}
> >
<FluidChart fluidType={fluidType} setActive={setActive} /> <FluidChart
fluidType={fluidType}
setActive={setActive}
key={lastDataDate}
/>
<ConsumptionDetails fluidType={fluidType} /> <ConsumptionDetails fluidType={fluidType} />
</div> </div>
{!isMulti && ( {!isMulti && (
......
...@@ -5,7 +5,11 @@ import { useI18n } from 'cozy-ui/transpiled/react/I18n' ...@@ -5,7 +5,11 @@ import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import Lottie from 'react-lottie' import Lottie from 'react-lottie'
import * as loadingData from 'assets/anims/bounceloading.json' import * as loadingData from 'assets/anims/bounceloading.json'
import { ERROR_EVENT } from 'cozy-harvest-lib/dist/models/flowEvents' import {
ERROR_EVENT,
SUCCESS_EVENT,
LOGIN_SUCCESS_EVENT,
} from 'cozy-harvest-lib/dist/models/flowEvents'
import { FluidType } from 'enum/fluid.enum' import { FluidType } from 'enum/fluid.enum'
import Icon from 'cozy-ui/transpiled/react/Icon' import Icon from 'cozy-ui/transpiled/react/Icon'
...@@ -127,7 +131,33 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({ ...@@ -127,7 +131,33 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({
) : ( ) : (
<> <>
<div className="kmodal-info"> <div className="kmodal-info">
{state === ERROR_EVENT ? ( {state === LOGIN_SUCCESS_EVENT && (
<>
<Lottie
options={loadingOptions}
height={50}
width={50}
speed={2}
/>
<div className="kc-wait text-16-bold">
{t(`konnector_modal.loading_data`)}
</div>
<div className="kmodal-waiting-text text-18-italic">
{shuffledWaitingTexts.map((text, idx) => (
<div
key={idx}
className={classNames('waiting-text', {
['show']: idx === index % shuffledWaitingTexts.length,
})}
>
<p>{text.first}</p>
<p>{text.second}</p>
</div>
))}
</div>
</>
)}
{state === ERROR_EVENT && (
<> <>
{error === 'LOGIN_FAILED' ? ( {error === 'LOGIN_FAILED' ? (
<div className="konnector-config"> <div className="konnector-config">
...@@ -162,7 +192,8 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({ ...@@ -162,7 +192,8 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({
</div> </div>
)} )}
</> </>
) : ( )}
{state === SUCCESS_EVENT && (
<div className="konnector-config"> <div className="konnector-config">
<Icon icon={successIcon} size={48} /> <Icon icon={successIcon} size={48} />
<div className="kcs-picto-txt text-20-bold"> <div className="kcs-picto-txt text-20-bold">
...@@ -175,16 +206,18 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({ ...@@ -175,16 +206,18 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({
)} )}
</div> </div>
)} )}
<Button {state !== LOGIN_SUCCESS_EVENT && (
aria-label={t('konnector_modal.accessibility.button_close')} <Button
onClick={() => handleCloseClick()} aria-label={t('konnector_modal.accessibility.button_close')}
classes={{ onClick={() => handleCloseClick()}
root: 'btn-highlight', classes={{
label: 'text-16-bold', root: 'btn-highlight',
}} label: 'text-16-bold',
> }}
<div>{t('konnector_modal.button_validate')}</div> >
</Button> <div>{t('konnector_modal.button_validate')}</div>
</Button>
)}
</div> </div>
</> </>
)} )}
......
...@@ -33,7 +33,7 @@ import Icon from 'cozy-ui/transpiled/react/Icon' ...@@ -33,7 +33,7 @@ import Icon from 'cozy-ui/transpiled/react/Icon'
import ExpansionPanel from '@material-ui/core/ExpansionPanel' import ExpansionPanel from '@material-ui/core/ExpansionPanel'
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary' import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'
import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails' import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails'
import failurePicto from 'assets/png/picto/picto-failure.png' import ErrorNotif from 'assets/icons/ico/notif_error.svg'
import ConnectionNotFound from 'components/Connection/ConnectionNotFound' import ConnectionNotFound from 'components/Connection/ConnectionNotFound'
import ConnectionForm from 'components/Connection/ConnectionForm' import ConnectionForm from 'components/Connection/ConnectionForm'
import ConnectionResult from 'components/Connection/ConnectionResult' import ConnectionResult from 'components/Connection/ConnectionResult'
...@@ -49,6 +49,7 @@ import { ...@@ -49,6 +49,7 @@ import {
import { DateTime } from 'luxon' import { DateTime } from 'luxon'
import { setSelectedDate } from 'store/chart/chart.actions' import { setSelectedDate } from 'store/chart/chart.actions'
import DateChartService from 'services/dateChart.service' import DateChartService from 'services/dateChart.service'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
interface KonnectorViewerCardProps { interface KonnectorViewerCardProps {
fluidStatus: FluidStatus fluidStatus: FluidStatus
...@@ -189,7 +190,11 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ ...@@ -189,7 +190,11 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({
const getConnectionCard = useCallback(() => { const getConnectionCard = useCallback(() => {
if (fluidState === FluidState.KONNECTOR_NOT_FOUND && !isUpdating) { if (fluidState === FluidState.KONNECTOR_NOT_FOUND && !isUpdating) {
return <ConnectionNotFound konnectorSlug={fluidSlug} /> return <ConnectionNotFound konnectorSlug={fluidSlug} />
} else if (account && fluidState !== FluidState.ERROR_LOGIN_FAILED) { } else if (
account &&
fluidState !== FluidState.ERROR_LOGIN_FAILED &&
fluidStatus.status !== FluidState.NOT_CONNECTED
) {
return ( return (
<ConnectionResult <ConnectionResult
fluidStatus={fluidStatus} fluidStatus={fluidStatus}
...@@ -204,8 +209,9 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ ...@@ -204,8 +209,9 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({
fluidState, fluidState,
isUpdating, isUpdating,
account, account,
fluidSlug, openModal,
fluidStatus, fluidStatus,
fluidSlug,
handleAccountDeletion, handleAccountDeletion,
fluidType, fluidType,
]) ])
...@@ -313,12 +319,12 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ ...@@ -313,12 +319,12 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({
) : ( ) : (
<Icon icon={iconAddType} size={49} /> <Icon icon={iconAddType} size={49} />
)} )}
{fluidStatus.status === FluidState.ERROR ? ( {fluidStatus.status === FluidState.ERROR || isOutdatedData ? (
<img <StyledIcon
icon={ErrorNotif}
size={24}
className="konnector-state-picto" className="konnector-state-picto"
src={failurePicto} />
alt={t('konnector_options.accessibility.label_ko_status')}
></img>
) : null} ) : null}
</div> </div>
<div <div
......
...@@ -173,7 +173,7 @@ const SplashRoot = ({ ...@@ -173,7 +173,7 @@ const SplashRoot = ({
) { ) {
dispatch(toggleChallengeExplorationNotification(true)) dispatch(toggleChallengeExplorationNotification(true))
} }
// Set Notification if action state is notification // Set action to notifcation if action is accomplished
if ( if (
filteredCurrentOngoingChallenge[0] && filteredCurrentOngoingChallenge[0] &&
filteredCurrentOngoingChallenge[0].action.state === filteredCurrentOngoingChallenge[0].action.state ===
...@@ -185,9 +185,16 @@ const SplashRoot = ({ ...@@ -185,9 +185,16 @@ const SplashRoot = ({
) )
if (updatedUserChallenge) { if (updatedUserChallenge) {
dispatch(updateUserChallengeList(updatedUserChallenge)) dispatch(updateUserChallengeList(updatedUserChallenge))
dispatch(toggleChallengeActionNotification(true))
} }
} }
// Set Notification if action state is notification
if (
filteredCurrentOngoingChallenge[0] &&
filteredCurrentOngoingChallenge[0].action.state ===
UserActionState.NOTIFICATION
) {
dispatch(toggleChallengeActionNotification(true))
}
const filteredCurrentDuelChallenge = userChallengeList.filter( const filteredCurrentDuelChallenge = userChallengeList.filter(
challenge => challenge.state === UserChallengeState.DUEL challenge => challenge.state === UserChallengeState.DUEL
) )
......
...@@ -76,7 +76,6 @@ const TimeStepSelector: React.FC<TimeStepSelectorProps> = ({ ...@@ -76,7 +76,6 @@ const TimeStepSelector: React.FC<TimeStepSelectorProps> = ({
dispatch(setCurrentTimeStep(targetTimestep)) dispatch(setCurrentTimeStep(targetTimestep))
dispatch(setCurrentIndex(index)) dispatch(setCurrentIndex(index))
} }
return ( return (
<div className={'timestep-selector'}> <div className={'timestep-selector'}>
<Button <Button
...@@ -89,7 +88,10 @@ const TimeStepSelector: React.FC<TimeStepSelectorProps> = ({ ...@@ -89,7 +88,10 @@ const TimeStepSelector: React.FC<TimeStepSelectorProps> = ({
{t('timestep.today')} {t('timestep.today')}
</Button> </Button>
<div className={'timestep-container'}> <div className={'timestep-container'}>
<ul className={'timestep-bar'}> <ul
className={`timestep-bar ${fluidType === FluidType.ELECTRICITY &&
'elec-bar'}`}
>
{timeStepArray.map((step, key) => { {timeStepArray.map((step, key) => {
return ( return (
<React.Fragment key={key}> <React.Fragment key={key}>
......
...@@ -25,12 +25,15 @@ ...@@ -25,12 +25,15 @@
width: 100%; width: 100%;
} }
.timestep-bar { .timestep-bar {
margin: 0 2.344rem; margin: 0 1rem 0 1.7rem;
padding: 0; padding: 0;
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
align-items: center; align-items: center;
height: 3rem; height: 3rem;
&.elec-bar {
margin-left: 1rem;
}
.circle { .circle {
cursor: pointer; cursor: pointer;
position: relative; position: relative;
...@@ -53,14 +56,17 @@ ...@@ -53,14 +56,17 @@
} }
} }
.text { .text {
opacity: 0;
position: relative; position: relative;
display: block; display: block;
top: 15px; top: 15px;
left: -20px; left: -20px;
text-align: center; text-align: center;
color: $grey-bright; color: $grey-dark;
width: 50px; width: 50px;
overflow: visible;
@media only screen and (max-width: 355px) {
opacity: 0;
}
} }
.bar { .bar {
width: 100%; width: 100%;
...@@ -81,7 +87,8 @@ ...@@ -81,7 +87,8 @@
height: 10px; height: 10px;
.text { .text {
opacity: 1; opacity: 1;
overflow: visible; top: 16px;
color: white;
transition: 300ms ease; transition: 300ms ease;
} }
} }
......
...@@ -79,7 +79,7 @@ describe('TotalConsumption component', () => { ...@@ -79,7 +79,7 @@ describe('TotalConsumption component', () => {
.find('.euro-value') .find('.euro-value')
.first() .first()
.text() .text()
).toEqual('20,23') ).toEqual('20,38')
}) })
it('should format multifluid value', async () => { it('should format multifluid value', async () => {
const component = mount( const component = mount(
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
Bonjour {{username}}, Bonjour {{username}},
</mj-text> </mj-text>
{{#if consumptionTextExist }} {{#if consumptionTextExist }}
<mj-text color="white" font-weight="400" font-size="18px">Ce mois ci vous avez consommé {{{consumptionText}}} par rapport au mois de {{previousMonth}}. <br /><br /> Retrouvez le détail de vos consommations et plus d'informations dans votre bilan Ecolyo.</mj-text> <mj-text color="white" font-weight="400" font-size="18px">Ce mois-ci vous avez consommé {{{consumptionText}}} par rapport au mois de {{previousMonth}}. <br /><br /> Retrouvez le détail de vos consommations et plus d'informations dans votre bilan Ecolyo.</mj-text>
{{/if}} {{/if}}
{{#unless consumptionTextExist }} {{#unless consumptionTextExist }}
<mj-text color="white" font-weight="400" font-size="18px">Retrouvez le détail de vos consommations et plus d'informations dans votre bilan Ecolyo.</mj-text> <mj-text color="white" font-weight="400" font-size="18px">Retrouvez le détail de vos consommations et plus d'informations dans votre bilan Ecolyo.</mj-text>
......
...@@ -35,14 +35,14 @@ jest.mock('./ecogesture.service', () => { ...@@ -35,14 +35,14 @@ jest.mock('./ecogesture.service', () => {
describe('Action Service', () => { describe('Action Service', () => {
const actionService = new ActionService(mockClient) const actionService = new ActionService(mockClient)
it('shoud return the default actions', async () => { it('should return the default actions', async () => {
mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData) mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData)
mockgetEcogesturesByIds.mockResolvedValueOnce(defaultEcogestureData) mockgetEcogesturesByIds.mockResolvedValueOnce(defaultEcogestureData)
const result: Ecogesture[] = await actionService.getDefaultActions() const result: Ecogesture[] = await actionService.getDefaultActions()
expect(result).toEqual(defaultEcogestureData) expect(result).toEqual(defaultEcogestureData)
}) })
it('shoud return the Available Action List', async () => { it('should return the Available Action List', async () => {
mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData) mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData)
mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData) mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData)
mockgetEcogesturesByIds.mockResolvedValueOnce([ mockgetEcogesturesByIds.mockResolvedValueOnce([
...@@ -58,7 +58,7 @@ describe('Action Service', () => { ...@@ -58,7 +58,7 @@ describe('Action Service', () => {
AllEcogestureData[4], AllEcogestureData[4],
]) ])
}) })
it('shoud return winter ecogestures', () => { it('should return winter ecogestures', () => {
jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.WINTER) jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.WINTER)
const result: Ecogesture[] = actionService.filterBySeason(AllEcogestureData) const result: Ecogesture[] = actionService.filterBySeason(AllEcogestureData)
expect(result).toEqual([ expect(result).toEqual([
...@@ -67,13 +67,13 @@ describe('Action Service', () => { ...@@ -67,13 +67,13 @@ describe('Action Service', () => {
AllEcogestureData[5], AllEcogestureData[5],
]) ])
}) })
it('shoud return no season ecogestures', () => { it('should return no season ecogestures', () => {
jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.NONE) jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.NONE)
const result: Ecogesture[] = actionService.filterBySeason(AllEcogestureData) const result: Ecogesture[] = actionService.filterBySeason(AllEcogestureData)
expect(result).toEqual([AllEcogestureData[3], AllEcogestureData[4]]) expect(result).toEqual([AllEcogestureData[3], AllEcogestureData[4]])
}) })
it('shoud return summer ecogestures', () => { it('should return summer ecogestures', () => {
jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.SUMMER) jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.SUMMER)
const result: Ecogesture[] = actionService.filterBySeason(AllEcogestureData) const result: Ecogesture[] = actionService.filterBySeason(AllEcogestureData)
...@@ -84,7 +84,7 @@ describe('Action Service', () => { ...@@ -84,7 +84,7 @@ describe('Action Service', () => {
]) ])
}) })
it('shoud launch an action', () => { it('should launch an action', () => {
jest jest
.spyOn(DateTime, 'local') .spyOn(DateTime, 'local')
.mockReturnValueOnce( .mockReturnValueOnce(
...@@ -119,7 +119,7 @@ describe('Action Service', () => { ...@@ -119,7 +119,7 @@ describe('Action Service', () => {
}) })
describe('getCustomActions function', () => { describe('getCustomActions function', () => {
it('shoud return filtered and sorted ecogestures and not complete the list', async () => { it('should return filtered and sorted ecogestures and not complete the list', async () => {
jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.WINTER) jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.WINTER)
mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData) mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData)
mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData) mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData)
...@@ -139,7 +139,7 @@ describe('Action Service', () => { ...@@ -139,7 +139,7 @@ describe('Action Service', () => {
AllEcogestureData[2], AllEcogestureData[2],
]) ])
}) })
it('shoud return filtered and sorted ecogestures and complete the list with default ecogesture', async () => { it('should return filtered and sorted ecogestures and complete the list with default ecogesture', async () => {
jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.WINTER) jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.WINTER)
mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData) mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData)
mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData) mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData)
......
...@@ -35,7 +35,7 @@ describe('Connection service', () => { ...@@ -35,7 +35,7 @@ describe('Connection service', () => {
const connectionService = new ConnectionService(mockClient) const connectionService = new ConnectionService(mockClient)
describe('connectNewUser method', () => { describe('connectNewUser method', () => {
it('shoud return created Trigger', async () => { it('should return created Trigger', async () => {
mockGetKonnector.mockResolvedValueOnce(konnectorsData[0]) mockGetKonnector.mockResolvedValueOnce(konnectorsData[0])
mockCreateAccount.mockResolvedValueOnce(accountsData[0]) mockCreateAccount.mockResolvedValueOnce(accountsData[0])
mockCreateTrigger.mockResolvedValueOnce(triggersData[0]) mockCreateTrigger.mockResolvedValueOnce(triggersData[0])
...@@ -48,7 +48,7 @@ describe('Connection service', () => { ...@@ -48,7 +48,7 @@ describe('Connection service', () => {
expect(result).toEqual(mockResult) expect(result).toEqual(mockResult)
}) })
it('shoud throw error when konnector is not found', async () => { it('should throw error when konnector is not found', async () => {
let error let error
try { try {
await connectionService.connectNewUser( await connectionService.connectNewUser(
...@@ -64,7 +64,7 @@ describe('Connection service', () => { ...@@ -64,7 +64,7 @@ describe('Connection service', () => {
) )
}) })
it('shoud throw error when account is not created', async () => { it('should throw error when account is not created', async () => {
mockGetKonnector.mockResolvedValueOnce(konnectorsData[0]) mockGetKonnector.mockResolvedValueOnce(konnectorsData[0])
let error let error
try { try {
...@@ -79,7 +79,7 @@ describe('Connection service', () => { ...@@ -79,7 +79,7 @@ describe('Connection service', () => {
expect(error).toEqual(new Error(`Error during account creation`)) expect(error).toEqual(new Error(`Error during account creation`))
}) })
it('shoud throw error when trigger is not created', async () => { it('should throw error when trigger is not created', async () => {
mockGetKonnector.mockResolvedValueOnce(konnectorsData[0]) mockGetKonnector.mockResolvedValueOnce(konnectorsData[0])
mockCreateAccount.mockResolvedValueOnce(accountsData[0]) mockCreateAccount.mockResolvedValueOnce(accountsData[0])
let error let error
......
...@@ -66,7 +66,7 @@ describe('Consumption service', () => { ...@@ -66,7 +66,7 @@ describe('Consumption service', () => {
) )
expect(result).toBeNull() expect(result).toBeNull()
}) })
it('shoud return a mapped data for one fluid', async () => { it('should return a mapped data for one fluid', async () => {
mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual)
mockFetchFluidData.mockResolvedValueOnce(mockFetchDataComparison) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataComparison)
const mockResult = { const mockResult = {
...@@ -126,21 +126,13 @@ describe('Consumption service', () => { ...@@ -126,21 +126,13 @@ describe('Consumption service', () => {
actualData: [ actualData: [
{ {
date: DateTime.fromISO('2020-10-01T00:00:00.000Z'), date: DateTime.fromISO('2020-10-01T00:00:00.000Z'),
value: 69.18029999999999, value: 79.131171,
valueDetail: [ valueDetail: [45.478019999999994, 0.931161, 32.72199],
45.127739999999996,
0.9048899999999999,
23.147669999999998,
],
}, },
{ {
date: DateTime.fromISO('2020-10-02T00:00:00.000Z'), date: DateTime.fromISO('2020-10-02T00:00:00.000Z'),
value: 61.65554999999999, value: 70.5240635,
valueDetail: [ valueDetail: [40.531369999999995, 0.8298785, 29.162815],
40.21918999999999,
0.8064649999999999,
20.629894999999998,
],
}, },
{ {
date: DateTime.fromISO('2020-10-03T00:00:00.000Z'), date: DateTime.fromISO('2020-10-03T00:00:00.000Z'),
...@@ -151,13 +143,13 @@ describe('Consumption service', () => { ...@@ -151,13 +143,13 @@ describe('Consumption service', () => {
comparisonData: [ comparisonData: [
{ {
date: DateTime.fromISO('2020-09-01T00:00:00.000Z'), date: DateTime.fromISO('2020-09-01T00:00:00.000Z'),
value: 54.090509999999995, value: 61.8708707,
valueDetail: [35.284358, 0.707513, 18.098639], valueDetail: [35.558234, 0.7280537, 25.584583],
}, },
{ {
date: DateTime.fromISO('2020-09-02T00:00:00.000Z'), date: DateTime.fromISO('2020-09-02T00:00:00.000Z'),
value: 56.57427, value: 64.7118939,
valueDetail: [36.904565999999996, 0.740001, 18.929703], valueDetail: [37.191018, 0.7614849, 26.759391],
}, },
{ {
date: DateTime.fromISO('2020-09-03T00:00:00.000Z'), date: DateTime.fromISO('2020-09-03T00:00:00.000Z'),
...@@ -180,21 +172,13 @@ describe('Consumption service', () => { ...@@ -180,21 +172,13 @@ describe('Consumption service', () => {
actualData: [ actualData: [
{ {
date: DateTime.fromISO('2020-10-01T00:00:00.000Z'), date: DateTime.fromISO('2020-10-01T00:00:00.000Z'),
value: 69.18029999999999, value: 79.131171,
valueDetail: [ valueDetail: [45.478019999999994, 0.931161, 32.72199],
45.127739999999996,
0.9048899999999999,
23.147669999999998,
],
}, },
{ {
date: DateTime.fromISO('2020-10-02T00:00:00.000Z'), date: DateTime.fromISO('2020-10-02T00:00:00.000Z'),
value: 61.65554999999999, value: 70.5240635,
valueDetail: [ valueDetail: [40.531369999999995, 0.8298785, 29.162815],
40.21918999999999,
0.8064649999999999,
20.629894999999998,
],
}, },
{ {
date: DateTime.fromISO('2020-10-03T00:00:00.000Z'), date: DateTime.fromISO('2020-10-03T00:00:00.000Z'),
...@@ -241,12 +225,12 @@ describe('Consumption service', () => { ...@@ -241,12 +225,12 @@ describe('Consumption service', () => {
}) })
}) })
describe('getMaxLoad method', () => { describe('getMaxLoad method', () => {
it('shoud return the maxed value for a time period for the home', async () => { it('should return the maxed value for a time period for the home', async () => {
for (let i = 0; i < fluidTypes.length; i++) { for (let i = 0; i < fluidTypes.length; i++) {
mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual)
mockFetchFluidData.mockResolvedValueOnce(mockFetchDataComparison) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataComparison)
} }
const expectedResult = 69.18029999999999 const expectedResult = 79.131171
const result = await consumptionDataManager.getMaxLoad( const result = await consumptionDataManager.getMaxLoad(
mockTimePeriod, mockTimePeriod,
TimeStep.DAY, TimeStep.DAY,
...@@ -256,7 +240,7 @@ describe('Consumption service', () => { ...@@ -256,7 +240,7 @@ describe('Consumption service', () => {
) )
expect(result).toEqual(expectedResult) expect(result).toEqual(expectedResult)
}) })
it('shoud return the maxed value for a time period', async () => { it('should return the maxed value for a time period', async () => {
const mockFluidTypes = [1] const mockFluidTypes = [1]
const expectedResult = 63.1254 const expectedResult = 63.1254
mockFetchFluidMaxData.mockResolvedValueOnce(expectedResult) mockFetchFluidMaxData.mockResolvedValueOnce(expectedResult)
...@@ -271,7 +255,7 @@ describe('Consumption service', () => { ...@@ -271,7 +255,7 @@ describe('Consumption service', () => {
}) })
}) })
describe('getPerformanceIndicators method', () => { describe('getPerformanceIndicators method', () => {
it('shoud return the performance indicator', async () => { it('should return the performance indicator', async () => {
mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual)
mockFetchFluidData.mockResolvedValueOnce(mockFetchDataComparison) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataComparison)
mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual)
...@@ -321,7 +305,7 @@ describe('Consumption service', () => { ...@@ -321,7 +305,7 @@ describe('Consumption service', () => {
}) })
}) })
describe('fetchLastDateData method', () => { describe('fetchLastDateData method', () => {
it('shoud return the latest date data of one fluid', async () => { it('should return the latest date data of one fluid', async () => {
const mockFluidTypes = [0] const mockFluidTypes = [0]
const expectedResult = DateTime.fromISO('2020-09-03T23:59:59.999Z') const expectedResult = DateTime.fromISO('2020-09-03T23:59:59.999Z')
mockGetLastDateData.mockResolvedValueOnce( mockGetLastDateData.mockResolvedValueOnce(
...@@ -332,7 +316,7 @@ describe('Consumption service', () => { ...@@ -332,7 +316,7 @@ describe('Consumption service', () => {
) )
expect(result).toEqual(expectedResult) expect(result).toEqual(expectedResult)
}) })
it('shoud return the latest date data of multiple fluid', async () => { it('should return the latest date data of multiple fluid', async () => {
const mockFluidTypes = [0, 2] const mockFluidTypes = [0, 2]
mockGetLastDateData.mockResolvedValueOnce( mockGetLastDateData.mockResolvedValueOnce(
DateTime.fromISO('2020-09-03T23:59:59.999Z') DateTime.fromISO('2020-09-03T23:59:59.999Z')
...@@ -346,7 +330,7 @@ describe('Consumption service', () => { ...@@ -346,7 +330,7 @@ describe('Consumption service', () => {
) )
expect(result).toEqual(expectedResult) expect(result).toEqual(expectedResult)
}) })
it('shoud return the latest date data of all fluids', async () => { it('should return the latest date data of all fluids', async () => {
mockGetLastDateData.mockResolvedValueOnce( mockGetLastDateData.mockResolvedValueOnce(
DateTime.fromISO('2020-09-02T23:59:59.999Z') DateTime.fromISO('2020-09-02T23:59:59.999Z')
) )
...@@ -365,7 +349,7 @@ describe('Consumption service', () => { ...@@ -365,7 +349,7 @@ describe('Consumption service', () => {
}) })
}) })
describe('fetchAllLastDateData method', () => { describe('fetchAllLastDateData method', () => {
it('shoud return the latest date data of one fluid', async () => { it('should return the latest date data of one fluid', async () => {
const mockFluidTypes = [0] const mockFluidTypes = [0]
const expectedResult = [DateTime.fromISO('2020-09-03T23:59:59.999Z')] const expectedResult = [DateTime.fromISO('2020-09-03T23:59:59.999Z')]
mockGetLastDateData.mockResolvedValueOnce( mockGetLastDateData.mockResolvedValueOnce(
...@@ -376,7 +360,7 @@ describe('Consumption service', () => { ...@@ -376,7 +360,7 @@ describe('Consumption service', () => {
) )
expect(result).toEqual(expectedResult) expect(result).toEqual(expectedResult)
}) })
it('shoud return the latest date data of All fluid', async () => { it('should return the latest date data of All fluid', async () => {
mockGetLastDateData.mockResolvedValueOnce( mockGetLastDateData.mockResolvedValueOnce(
DateTime.fromISO('2020-09-02T23:59:59.999Z') DateTime.fromISO('2020-09-02T23:59:59.999Z')
) )
...@@ -398,7 +382,7 @@ describe('Consumption service', () => { ...@@ -398,7 +382,7 @@ describe('Consumption service', () => {
}) })
}) })
describe('checkDoctypeEntries method', () => { describe('checkDoctypeEntries method', () => {
it('shoud return a boolean if doctype are correct', async () => { it('should return a boolean if doctype are correct', async () => {
let fluidType = 2 let fluidType = 2
mockGetEntries.mockResolvedValueOnce({ data: [1] }) mockGetEntries.mockResolvedValueOnce({ data: [1] })
let result = await consumptionDataManager.checkDoctypeEntries( let result = await consumptionDataManager.checkDoctypeEntries(
......