Skip to content
Snippets Groups Projects
Commit b867f787 authored by HAUTBOIS Aurelie's avatar HAUTBOIS Aurelie
Browse files

move redux section into application

parent cdf3910e
No related branches found
No related tags found
No related merge requests found
Pipeline #12470 passed
# Redux
There are two main store created for this app:
- Cozy: store information about cozy (konnectors, accounts, settings, db)
- Ecolyo: store all states used for this app
For a better state management, combineReducers(reducers) is used to split the reducing function into seperate functions. So, each managing independent parts of the state.
### Ecolyo Store Structure
| Reducer | Type | Description |
| --------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| global | GlobalState | store global states such as: notification, type device or fluid type<br><br>GlobalState enum<br>- _screenType = ScreenType_<br>- _challengeExplorationNotification = boolean_<br>- _challengeActionNotification = boolean_<br>- _challengeDuelNotification = boolean_<br>- _analysisNotification = boolean_<br>- _fluidStatus = FluidStatus[]_<br>- _fluidTypes = FluidType[]_ |
| profile | Profile | store states about profile information such as: notification, connectionDate, profileType |
| chart | ChartState | store consumption chart states such as: timeStep, graph data<br><br>ChartState enum<br>- _selectedDate = DateTime_<br>- _currentTimeStep = TimeStep_<br>- _currentIndex = number_<br>- _currentDatachart = Datachart_<br>- _currentDatachartIndex = number_<br>- _loading = boolean_ |
| modal | ModalState | store opening state of the feedback modal <br><br>ModalState enum<br>- _isFeedbacksOpen = boolean_ |
| challenge | ChallengeState | store challenge state such as: list of user challenge, data load and current challenge <br><br>ChallengeState enum<br>- _userChallengeList = UserChallenge[]_<br>- _currentChallenge = UserChallenge_<br>- _currentDataload = Dataload[]_ |
### Updating state process
Redux-thunk middleware is configured. For now, it is used only for updating the profile.
To update a state, a webservice method is called before trigger a state change inside the store.
......@@ -133,27 +133,3 @@ UserDuelEntity {
### Data managment schema
![Data Scheme](/img/challengeFlow.png)
## Redux
There are two main store created for this app:
- Cozy: store information about cozy (konnectors, accounts, settings, db)
- Ecolyo: store all states used for this app
For a better state management, combineReducers(reducers) is used to split the reducing function into seperate functions. So, each managing independent parts of the state.
### Ecolyo Store Structure
| Reducer | Type | Description |
| --------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| global | GlobalState | store global states such as: notification, type device or fluid type<br><br>GlobalState enum<br>- _screenType = ScreenType_<br>- _challengeExplorationNotification = boolean_<br>- _challengeActionNotification = boolean_<br>- _challengeDuelNotification = boolean_<br>- _analysisNotification = boolean_<br>- _fluidStatus = FluidStatus[]_<br>- _fluidTypes = FluidType[]_ |
| profile | Profile | store states about profile information such as: notification, connectionDate, profileType |
| chart | ChartState | store consumption chart states such as: timeStep, graph data<br><br>ChartState enum<br>- _selectedDate = DateTime_<br>- _currentTimeStep = TimeStep_<br>- _currentIndex = number_<br>- _currentDatachart = Datachart_<br>- _currentDatachartIndex = number_<br>- _loading = boolean_ |
| modal | ModalState | store opening state of the feedback modal <br><br>ModalState enum<br>- _isFeedbacksOpen = boolean_ |
| challenge | ChallengeState | store challenge state such as: list of user challenge, data load and current challenge <br><br>ChallengeState enum<br>- _userChallengeList = UserChallenge[]_<br>- _currentChallenge = UserChallenge_<br>- _currentDataload = Dataload[]_ |
### Updating state process
Redux-thunk middleware is configured. For now, it is used only for updating the profile.
To update a state, a webservice method is called before trigger a state change inside the store.
......@@ -5,94 +5,95 @@ repo_name: "Clone the Project"
repo_url: "https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc"
theme:
name: "material"
# logo: 'img/self_data_grdlyon.png'
favicon: "img/self_data_grdlyon.png"
palette:
primary: "white"
accent: "red"
name: "material"
# logo: 'img/self_data_grdlyon.png'
favicon: "img/self_data_grdlyon.png"
palette:
primary: "white"
accent: "red"
markdown_extensions:
- admonition
- plantuml_markdown:
server: http://www.plantuml.com/plantuml
- attr_list
- pymdownx.emoji
- admonition
- plantuml_markdown:
server: http://www.plantuml.com/plantuml
- attr_list
- pymdownx.emoji
extra_css:
- "stylesheets/extra.css"
- "stylesheets/extra.css"
nav:
- Home: index.md
- Easy Cozy:
- Scripts: easycozy/scripts.md
- Commands: easycozy/commands.md
- Tips: easycozy/tips.md
- Ecolyo:
- Introduction: ecolyo/index.md
- Getting started:
- Setup your environment: ecolyo/getting_started/setup_your_environment.md
- Launch the application on local: ecolyo/getting_started/launch_local_application.md
- Launch a konnector on local: ecolyo/getting_started/launch_local_konnector.md
- Project Architecture:
- Architecture: ecolyo/project_architecture/architecture.md
- Libraries: ecolyo/project_architecture/libraries.md
- Environments: ecolyo/project_architecture/environments.md
- DocTypes: ecolyo/project_architecture/doctypes.md
- Application:
- Description: ecolyo/application/description.md
- Scaffolding: ecolyo/application/scaffolding.md
- Services: ecolyo/application/services.md
- Gitflow: ecolyo/application/gitflow.md
- Deploy: ecolyo/application/deploy.md
- Functionalities:
- Initialization: ecolyo/functionalities/initialization.md
- Consumption: ecolyo/functionalities/consumption.md
- Ecogesture: ecolyo/functionalities/ecogesture.md
- Challenge: ecolyo/functionalities/challenge.md
- Profile Type: ecolyo/functionalities/profile_type.md
- Pilote:
- Pilote - TS - Back:
- Index: pilote/Pilote - TS - Back/index.md
- Application:
- Deploy: pilote/Pilote - TS - Back/application/deploy.md
- Functionalities:
- Routes: pilote/Pilote - TS - Back/functionalities/routes.md
- Getting Started:
- Launch the application on local: pilote/Pilote - TS - Back/getting_started/launch_local_application.md
- Setup your environment: pilote/Pilote - TS - Back/getting_started/setup_your_environment.md
- Project Architecture: pilote/Pilote - TS - Back/project_architecture/architecture.md
- Pilote - TS - Front:
- Index: pilote/Pilote - TS - Front/index.md
- Application:
- Deploy: pilote/Pilote - TS - Front/application/deploy.md
- Functionalities:
- Routes: pilote/Pilote - TS - Front/functionalities/functions.md
- Getting Started:
- Launch the application on local: pilote/Pilote - TS - Front/getting_started/launch_local_application.md
- Pilote - Usager:
- Application:
- Deploy: pilote/Pilote - Usager/application/deploy.md
- Doctypes: pilote/Pilote - Usager/application/doctypes.md
- Gitflow: pilote/Pilote - Usager/application/gitflow.md
- Scaffolding: pilote/Pilote - Usager/application/scaffolding.md
- Services: pilote/Pilote - Usager/application/services.md
- Store: pilote/Pilote - Usager/application/store.md
- Functionalities:
- Appointments: pilote/Pilote - Usager/functionalities/appointments.md
- Contact: pilote/Pilote - Usager/functionalities/contact.md
- Document: pilote/Pilote - Usager/functionalities/document.md
- Settings: pilote/Pilote - Usager/functionalities/setting.md
- Getting Started:
- Launch local doctypes: pilote/Pilote - Usager/getting_started/launch_local_doctypes.md
- Launch local services: pilote/Pilote - Usager/getting_started/launch_local_services.md
- Konnectors:
- Enedis: konnectors/enedis.md
- GRDF: konnectors/grdf.md
- Eau du Grand Lyon: konnectors/egl.md
- Proxy:
- Description: proxy/description.md
- Monitoring: proxy/monitoring.md
- Use cases:
- Enedis: proxy/use_cases/enedis.md
- Grdf Adict: proxy/use_cases/grdfadict.md
- Home: index.md
- Easy Cozy:
- Scripts: easycozy/scripts.md
- Commands: easycozy/commands.md
- Tips: easycozy/tips.md
- Ecolyo:
- Introduction: ecolyo/index.md
- Getting started:
- Setup your environment: ecolyo/getting_started/setup_your_environment.md
- Launch the application on local: ecolyo/getting_started/launch_local_application.md
- Launch a konnector on local: ecolyo/getting_started/launch_local_konnector.md
- Project Architecture:
- Architecture: ecolyo/project_architecture/architecture.md
- Libraries: ecolyo/project_architecture/libraries.md
- Environments: ecolyo/project_architecture/environments.md
- DocTypes: ecolyo/project_architecture/doctypes.md
- Application:
- Description: ecolyo/application/description.md
- Redux: ecolyo/application/redux.md
- Scaffolding: ecolyo/application/scaffolding.md
- Services: ecolyo/application/services.md
- Gitflow: ecolyo/application/gitflow.md
- Deploy: ecolyo/application/deploy.md
- Functionalities:
- Initialization: ecolyo/functionalities/initialization.md
- Consumption: ecolyo/functionalities/consumption.md
- Ecogesture: ecolyo/functionalities/ecogesture.md
- Challenge: ecolyo/functionalities/challenge.md
- Profile Type: ecolyo/functionalities/profile_type.md
- Pilote:
- Pilote - TS - Back:
- Index: pilote/Pilote - TS - Back/index.md
- Application:
- Deploy: pilote/Pilote - TS - Back/application/deploy.md
- Functionalities:
- Routes: pilote/Pilote - TS - Back/functionalities/routes.md
- Getting Started:
- Launch the application on local: pilote/Pilote - TS - Back/getting_started/launch_local_application.md
- Setup your environment: pilote/Pilote - TS - Back/getting_started/setup_your_environment.md
- Project Architecture: pilote/Pilote - TS - Back/project_architecture/architecture.md
- Pilote - TS - Front:
- Index: pilote/Pilote - TS - Front/index.md
- Application:
- Deploy: pilote/Pilote - TS - Front/application/deploy.md
- Functionalities:
- Routes: pilote/Pilote - TS - Front/functionalities/functions.md
- Getting Started:
- Launch the application on local: pilote/Pilote - TS - Front/getting_started/launch_local_application.md
- Pilote - Usager:
- Application:
- Deploy: pilote/Pilote - Usager/application/deploy.md
- Doctypes: pilote/Pilote - Usager/application/doctypes.md
- Gitflow: pilote/Pilote - Usager/application/gitflow.md
- Scaffolding: pilote/Pilote - Usager/application/scaffolding.md
- Services: pilote/Pilote - Usager/application/services.md
- Store: pilote/Pilote - Usager/application/store.md
- Functionalities:
- Appointments: pilote/Pilote - Usager/functionalities/appointments.md
- Contact: pilote/Pilote - Usager/functionalities/contact.md
- Document: pilote/Pilote - Usager/functionalities/document.md
- Settings: pilote/Pilote - Usager/functionalities/setting.md
- Getting Started:
- Launch local doctypes: pilote/Pilote - Usager/getting_started/launch_local_doctypes.md
- Launch local services: pilote/Pilote - Usager/getting_started/launch_local_services.md
- Konnectors:
- Enedis: konnectors/enedis.md
- GRDF: konnectors/grdf.md
- Eau du Grand Lyon: konnectors/egl.md
- Proxy:
- Description: proxy/description.md
- Monitoring: proxy/monitoring.md
- Use cases:
- Enedis: proxy/use_cases/enedis.md
- Grdf Adict: proxy/use_cases/grdfadict.md
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment