Skip to content
Snippets Groups Projects
Commit 59aefa74 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Add documentation for new ecogestures and terms minor update

parent 303304f9
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ For a better state management, combineReducers(reducers) is used to split the re
| 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[]_ |
| 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 |
| 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_ |
......
......@@ -8,6 +8,39 @@ It includes different information such as icon, name, long and short description
Also, an ecogesture can be used for an action challenge.
### Model
```
Ecogesture {
id: string
shortName: string
longName: string
longDescription: string
usage: Usage
fluidTypes: FluidType[]
impactLevel: number
efficiency: number
difficulty: number
room: Room[]
season: Season
equipment: boolean
equipmentType: EquipmentType[]
equipmentInstallation: boolean
investment: string | null
action: boolean
actionName: string | null
actionDuration: number
objective: boolean
doing: boolean
}
```
### Ecogesture Status
An ecogesture can have a status according the user's choice, it can be *doing* and/or *objective* which allows the user to consult them in the related tabs in the ecogesture page.
### TODO: Add ecogesture selection rules
## All ecogestures screen
This screen display the full list of ecogestures. User can filter ecogesture by usage.
......
......@@ -46,6 +46,12 @@ Functions used to init or update the hash :
| initQuizEntity(hash: string) |
| initExplorationEntity(hash: string) |
!!! info "Exception for ecogestures"
When we update the ecogesture list in **ecogestureData.json**, we also get the previous existing list to transfer the ecogesture status (doing and/or objective) to the updated list.
### dataEntity vs userData
In the project, you'll see two versions for the same data. The dataEntity (quizEntity, challengeEntity, ...) is the data stored in the db folder and in the couchDB. These data are only edited in the couchDB when we update a challenge/quiz/duel or add a new one.
......
......@@ -13,12 +13,33 @@ The only public routes are :
- _/cgu_ : shows the CGU public page, accessible by the terms page
- _/legal_ : shows the Legal Notice public page, accessible by the terms page
### Terms managment
We check the terms acceptation in the **SplashScreen** while the application is initializing, if there is no consent (first connexion), or the consent is outdated (update of terms), the user will be redirected to the terms acceptation page.
User has to check the two checboxes (one for Data share consent, and one for CGU and Legal Notice) to unlock the terms acceptation button. Once he has accepted it, a new term doctype is created with the value _accepted_ to true. So he can access now the entire application.
For the full terms acceptation process, the user has to check the two checboxes (one for Data share consent, and one for CGU and Legal Notice) to unlock the terms acceptation button. Once he has accepted it, a new term doctype is created with the value _accepted_ to true. So he can access now the entire application.
We store in user's profile a boolean _showConsentModal_ that allows the app to know about the consent status.
If there is a consent update, two cases are possible :
- It's a major update, ex: from 1.X.X to 2.X.X, the user has to go through the entire term validation process as explained above
- It's a minor update, ex: from 1.1.X to 1.3.X or from 1.2.1 to 1.2.3, the user is just prompted with a modal with some text about the update, and a link to the legal notice, but there is no blocking acceptation input for the user.
### Version number
The version number of the last terms is stored in the **config.json** file. If this version number doesn't correspond with the last term accepted, the user won't be able to access the app and wil be prompted to accept new terms.
The version number of the last terms is stored in the **config.json** file. If this version number doesn't correspond with the last term accepted, according the update version type (minor or major), the user won't be able to access the app and will be prompted to accept new terms or will simply be prompted.
### Global state
Once the verification done in the **SplashScreen**, the last term state is stored in the redux store under the ecolyo.global state.
The model is the following :
```
termsStatus: {
accepted: boolean,
versionType: 'major' | 'minor' | 'init',
},
```
Major and minor value are only used in the case of an update. Otherwise we store the value 'init' which corresponds either to a first connexion or to case the last accepted term version is uptodate.
\ No newline at end of file
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