Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Simulateur Clara
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
claravue
Simulateur Clara
Commits
2aeb92a6
Commit
2aeb92a6
authored
Dec 19, 2019
by
Rémy Marronnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
store + form validation wip
parent
d97faad7
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
165 additions
and
53 deletions
+165
-53
src/components/QuestionButtons.vue
src/components/QuestionButtons.vue
+4
-1
src/main.js
src/main.js
+2
-2
src/router.js
src/router.js
+1
-1
src/store/modules/results.js
src/store/modules/results.js
+11
-11
src/store/modules/situation.js
src/store/modules/situation.js
+3
-4
src/views/Questions.vue
src/views/Questions.vue
+2
-9
src/views/questions/ARE.vue
src/views/questions/ARE.vue
+13
-3
src/views/questions/Address.vue
src/views/questions/Address.vue
+15
-3
src/views/questions/Age.vue
src/views/questions/Age.vue
+41
-4
src/views/questions/Allocation.vue
src/views/questions/Allocation.vue
+15
-3
src/views/questions/Category.vue
src/views/questions/Category.vue
+14
-3
src/views/questions/Grade.vue
src/views/questions/Grade.vue
+14
-3
src/views/questions/Inscription.vue
src/views/questions/Inscription.vue
+15
-3
src/views/questions/Other.vue
src/views/questions/Other.vue
+15
-3
No files found.
src/components/QuestionButtons.vue
View file @
2aeb92a6
<
template
>
<v-row>
<v-btn
@
click=
"back"
>
Revenir
</v-btn>
<v-btn
@
click=
"submit"
>
Continuer
</v-btn>
<v-btn
@
click=
"submit
Click"
type=
"submit
"
>
Continuer
</v-btn>
</v-row>
</
template
>
...
...
@@ -11,6 +11,9 @@ export default {
methods
:
{
back
()
{
this
.
$router
.
go
(
-
1
);
},
submitClick
()
{
this
.
$emit
(
"
submit
"
);
}
}
};
...
...
src/main.js
View file @
2aeb92a6
import
Vue
from
'
vue
'
import
App
from
'
./App.vue
'
import
router
from
'
./router
'
//
import store from './store/'
import
store
from
'
./store/
'
import
vuetify
from
'
./plugins/vuetify
'
;
Vue
.
config
.
productionTip
=
false
...
...
@@ -9,6 +9,6 @@ Vue.config.productionTip = false
new
Vue
({
vuetify
,
router
,
//
store,
store
,
render
:
h
=>
h
(
App
)
}).
$mount
(
'
#app
'
)
src/router.js
View file @
2aeb92a6
...
...
@@ -68,7 +68,7 @@ export default new Router({
]
},
{
path
:
'
/
aides-possible
s
'
,
path
:
'
/
resultat
s
'
,
name
:
'
results
'
,
component
:
Results
},
...
...
src/store/modules/results.js
View file @
2aeb92a6
import
ClaraService
from
"
@/api/clara
"
;
//
import ClaraService from "@/api/clara";
export
default
{
state
:
{
...
...
@@ -22,21 +22,21 @@ export default {
}
},
actions
:
{
getFilters
({
commit
})
{
// promise + fetch + API call
},
getResults
({
commit
,
dispatch
})
{
// promise + fetch + API call
this
.
$store
.
commit
(
"
updateChanged
"
,
false
)
},
//
getFilters({ commit }) {
//
// promise + fetch + API call
//
},
//
getResults({ commit, dispatch }) {
//
// promise + fetch + API call
//
this.$store.commit("updateChanged", false)
//
},
},
getters
:
{
eligible
:
state
=>
state
.
eligible
,
eligible_quantity
:
state
=>
state
.
eligible
.
length
()
,
eligible_quantity
:
state
=>
state
.
eligible
.
length
,
non_eligible
:
state
=>
state
.
nonEligible
,
non_eligible_quantity
:
state
=>
state
.
nonEligible
.
length
()
,
non_eligible_quantity
:
state
=>
state
.
nonEligible
.
length
,
//uncertain: state => state.uncertain,
filters
:
state
=>
state
.
filters
,
filters_quantity
:
state
=>
state
.
filters
.
length
()
,
filters_quantity
:
state
=>
state
.
filters
.
length
,
},
}
\ No newline at end of file
src/store/modules/situation.js
View file @
2aeb92a6
import
ClaraService
from
"
@/api/clara
"
;
//
import ClaraService from "@/api/clara";
export
default
{
state
:
{
...
...
@@ -48,9 +48,9 @@ export default {
},
actions
:
{
submitInscription
({
commit
},
inscription_period
)
{
//
submitInscription({ commit }, inscription_period) {
},
//
},
submitAddress
({
commit
,
state
},
location_citycode
)
{
if
(
location_citycode
!=
state
.
location_citycode
)
{
commit
(
'
updateLocationCitycode
'
,
location_citycode
)
...
...
@@ -63,7 +63,6 @@ export default {
commit
(
'
updateAge
'
,
age
)
commit
(
'
updateChanged
'
,
true
)
}
this
.
$router
.
push
(
'
grade
'
)
},
submitAllocation
({
commit
,
state
},
allocation_type
)
{
if
(
allocation_type
!=
state
.
allocation_type
)
{
...
...
src/views/Questions.vue
View file @
2aeb92a6
<
template
>
<v-content>
<v-card>
<v-form>
<router-view></router-view>
<QuestionButtons></QuestionButtons>
</v-form>
<router-view></router-view>
</v-card>
</v-content>
</
template
>
<
script
>
import
QuestionButtons
from
"
@/components/QuestionButtons
"
;
export
default
{
name
:
"
Questions
"
,
components
:
{
QuestionButtons
}
name
:
"
Questions
"
};
</
script
>
...
...
src/views/questions/ARE.vue
View file @
2aeb92a6
<
template
>
<v-
card
>
<v-
form
>
Quel est le montant de cette allocation ?
<v-text-field
single-line
type=
"number"
label=
"Montant par mois"
></v-text-field>
</v-card>
<QuestionButtons
@
submit=
"submit"
></QuestionButtons>
</v-form>
</
template
>
<
script
>
import
QuestionButtons
from
"
@/components/QuestionButtons
"
;
export
default
{
name
:
"
ARE
"
components
:
{
QuestionButtons
},
name
:
"
ARE
"
,
methods
:
{
submit
()
{
this
.
$router
.
push
(
"
votre-age
"
);
}
}
};
</
script
>
...
...
src/views/questions/Address.vue
View file @
2aeb92a6
<
template
>
<v-
card
>
<v-
form
>
Quel est votre code postal de votre lieu de résidence ?
Code postal - facultatif
**Plus que 2 questions avant d'obtenir vos résultats**
<v-text-field
single-line
type=
"number"
label=
"Exemple : 44220"
></v-text-field>
</v-card>
<QuestionButtons
@
submit=
"submit"
></QuestionButtons>