Skip to content
Snippets Groups Projects

add redux links

Merged Bastien DUMONT requested to merge redux into master
1 file
+ 9
7
Compare changes
  • Side-by-side
  • Inline
@@ -9,15 +9,17 @@ For a better state management, combineReducers(reducers) is used to split the re
## Ecolyo Store Structure
The ecolyo store [is composed](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/blob/dev/src/store/index.ts#L48-L56) with multiple stores.
| 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>_releaseNotes = ReleaseNotes_<br>_termsStatus = TermsStatus_<br>_openPartnersIssueModal = 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 | ProfileTypeState | store states about user's profileType filled through the profile form
| profileEcogesture | ProfileEcogestureState | store states about user's profileEcogesture filled through the profile ecogesture form
| 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[]_ |
| challenge | [ChallengeState](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/blob/dev/src/models/challenge.model.ts) | 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[]_ |
| chart | [ChartState](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/blob/dev/src/models/chart.model.ts) | 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_ |
| global | [GlobalState](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/blob/dev/src/models/global.model.ts) | store global states such as: notification, type device or fluid type<br><br>GlobalState enum<br>- _screenType = ScreenType_<br>- _challengeExplorationNotification = boolean_<br>- _releaseNotes = ReleaseNotes_<br>- _termsStatus = TermsStatus_<br>- _openPartnersIssueModal = boolean_<br>- _challengeActionNotification = boolean_<br>- _challengeDuelNotification = boolean_<br>- _analysisNotification = boolean_<br>- _fluidStatus = FluidStatus[]_<br>- _fluidTypes = FluidType[]_ |
| modal | [ModalState](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/blob/dev/src/models/modal.model.ts) | store opening state of modals |
| profile | [Profile](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/blob/dev/src/models/profile.model.ts) | store states about profile information such as: notification, connectionDate
| profileEcogesture | [ProfileEcogestureState](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/blob/dev/src/models/profileEcogesture.model.ts) | store states about user's profileEcogesture filled through the profile ecogesture form
| profileType | [ProfileTypeState](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/blob/dev/src/models/profileType.model.ts) | store states about user's profileType filled through the profile form
## Updating state process
Loading