...
 
Commits (2)
<template>
<v-row>
<v-btn @click="back">Revenir</v-btn>
<v-btn @click="submitClick" type="submit">Continuer</v-btn>
</v-row>
</template>
<script>
export default {
name: "QuestionButtons",
methods: {
back() {
this.$router.go(-1);
},
submitClick() {
this.$emit("submit");
}
}
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<v-card>
<v-expansion-panels>
<v-expansion-panel>
<v-expansion-panel-header>Récapitulatif de ma situation</v-expansion-panel-header>
<v-expansion-panel-content>
<v-list>
<v-toolbar>
<v-toolbar-title>Données personnelles</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn>
<v-icon left>mdi-pencil-outline</v-icon>Modifier
</v-btn>
</v-toolbar>
<v-list-item-group v-model="personal">
<v-list-item v-for="(item, i) in items" :key="i">
<v-list-item-content>
<v-list-item-title v-text="item.text"></v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list-item-group>
</v-list>
</v-expansion-panel-content>
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</template>
<script>
export default {
name: "Situation",
data: () => ({
items: [
{
text: " Âge : 44 "
},
{
text: " Diplôme : Bac +3 "
},
{
text: " Ville : 33100 Bordeaux "
},
{
text: " Zone de revitalisation rurale : indisponible "
},
{
text: " Quartier prioritaire de la ville : vérifier "
}
],
model: "personal"
})
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<v-card>
<v-expansion-panels>
<v-expansion-panel>
<v-expansion-panel-header>Récapitulatif de ma situation</v-expansion-panel-header>
<v-expansion-panel-content>
<PersonalData />
</v-expansion-panel-content>
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</template>
<script>
import PersonalData from "@/components/results/situation/PersonalData";
export default {
name: "Situation",
components: {
PersonalData
}
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<v-list>
<v-toolbar>
<v-toolbar-title>Données personnelles</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn>
<v-icon left>mdi-pencil-outline</v-icon>Modifier
</v-btn>
</v-toolbar>
<v-list-item-group>
<v-list-item>
<v-list-item-content>
<v-list-item-title>Âge :</v-list-item-title>
{{ this.age }}
</v-list-item-content>
<v-list-item-content>
<v-list-item-title>Diplôme :</v-list-item-title>
{{ this.diploma }}
</v-list-item-content>
<v-list-item-content>
<v-list-item-title>Ville :</v-list-item-title>
{{ this.city }}
</v-list-item-content>
<v-list-item-content>
<v-list-item-title>Zone de revitalisation rurale :</v-list-item-title>
{{ this.zrr }}
</v-list-item-content>
<v-list-item-content>
<v-list-item-title>Quartier prioritaire de la ville :</v-list-item-title>
{{ this.prioritary }}
</v-list-item-content>
</v-list-item>
</v-list-item-group>
</v-list>
</template>
<script>
export default {
name: "PersonalData",
created() {
this.age = this.$store.state.situation.age;
this.diploma = this.$store.state.situation.diploma;
this.city = this.$store.state.situation.location_citycode;
},
data: () => ({
age: 0,
diploma: "",
city: 0,
zrr: "indisponible",
prioritary: "vérifier"
})
};
</script>
<style>
</style>
\ No newline at end of file
...@@ -12,7 +12,6 @@ export default { ...@@ -12,7 +12,6 @@ export default {
age: 0, age: 0,
location_citycode: "", location_citycode: "",
category: "", category: "",
}, },
mutations: { mutations: {
updateChanged(state, changed) { updateChanged(state, changed) {
...@@ -56,7 +55,7 @@ export default { ...@@ -56,7 +55,7 @@ export default {
commit('updateLocationCitycode', location_citycode) commit('updateLocationCitycode', location_citycode)
commit('updateChanged', true) commit('updateChanged', true)
} }
this.$router.push('other') // this.$router.push('other')
}, },
submitAge({ commit, state }, age) { submitAge({ commit, state }, age) {
if (age != state.age) { if (age != state.age) {
...@@ -69,34 +68,43 @@ export default { ...@@ -69,34 +68,43 @@ export default {
commit('updateAllocationType', allocation_type) commit('updateAllocationType', allocation_type)
commit('updateChanged', true) commit('updateChanged', true)
} }
this.$router.push('ARE') // this.$router.push('ARE')
}, },
submitARE({ commit, state }, monthly_allocation_value) { submitARE({ commit, state }, monthly_allocation_value) {
if (monthly_allocation_value != state.monthly_allocation_value) { if (monthly_allocation_value != state.monthly_allocation_value) {
commit('updateMonthlyAllocationValue', monthly_allocation_value) commit('updateMonthlyAllocationValue', monthly_allocation_value)
commit('updateChanged', true) commit('updateChanged', true)
} }
this.$router.push('age') //est-ce vraiment nécessaire si l'âge est déjà renseigné ? // this.$router.push('age') //est-ce vraiment nécessaire si l'âge est déjà renseigné ?
}, },
submitCategory({ commit, state }, category) { submitCategory({ commit, state }, category) {
if (category != state.category) { if (category != state.category) {
commit('updateCategory', category) commit('updateCategory', category)
commit('updateChanged', true) commit('updateChanged', true)
} }
this.$router.push('allocation') //this.$router.push('allocation')
}, },
submitGrade({ commit, state }, diploma) { submitGrade({ commit, state }, diploma) {
if (diploma != state.diploma) { if (diploma != state.diploma) {
commit('updateDiploma', diploma) commit('updateDiploma', diploma)
commit('updateChanged', true) commit('updateChanged', true)
} }
this.$router.push('address')
}, },
submitOther({ commit, state }, disabled, spectacle) { submitDisabled({ commit, state }, disabled) {
if (disabled != state.disabled) { if (disabled != state.disabled) {
commit('updateDisabled', disabled) commit('updateDisabled', disabled)
commit('updateChanged', true) commit('updateChanged', true)
} }
//if (state.filters.length == 0) { put those actions in the result component when loaded.
// dispatch('getFilters')
// //}
// dispatch('getResults')
// dispatch('getEligible')
// dispatch('getNonEligible')
//dispatch('getUncertain') ???
//this.$router.push('results')
},
submitSpectacle({ commit, state }, spectacle) {
if (spectacle != state.spectacle) { if (spectacle != state.spectacle) {
commit('updateSpectacle', spectacle) commit('updateSpectacle', spectacle)
commit('updateChanged', true) commit('updateChanged', true)
...@@ -108,7 +116,7 @@ export default { ...@@ -108,7 +116,7 @@ export default {
// dispatch('getEligible') // dispatch('getEligible')
// dispatch('getNonEligible') // dispatch('getNonEligible')
//dispatch('getUncertain') ??? //dispatch('getUncertain') ???
this.$router.push('results') //this.$router.push('results')
}, },
}, },
......
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
<v-col cols="6" md="4"> <v-col cols="6" md="4">
<v-content> <v-content>
<Filters></Filters> <Filters></Filters>
<Situation></Situation> <SituationSummary></SituationSummary>
</v-content> </v-content>
</v-col> </v-col>
<v-col cols="12" md="8"> <v-col cols="12" md="8">
<v-content> <v-content>
<Eligible></Eligible> <Eligible></Eligible>
<NonEligible></NonEligible> <NonEligible></NonEligible>
<v-alert color="yellow"> <v-alert type="info">
Simulation non contractuelle tenant compte des éléments déclarés et appréciés le 17/12/2019 Simulation non contractuelle tenant compte des éléments déclarés et appréciés le 17/12/2019
Clara n'intègre pas encore les spécificités des aides et mesures applicables dans les régions et collectivités d'Outre Mer. <br />Clara n'intègre pas encore les spécificités des aides et mesures applicables dans les régions et collectivités d'Outre Mer.
</v-alert> </v-alert>
</v-content> </v-content>
</v-col> </v-col>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<script> <script>
import Filters from "@/components/results/Filters"; import Filters from "@/components/results/Filters";
import Situation from "@/components/results/Situation"; import SituationSummary from "@/components/results/SituationSummary";
import Eligible from "@/components/results/Eligible"; import Eligible from "@/components/results/Eligible";
import NonEligible from "@/components/results/NonEligible"; import NonEligible from "@/components/results/NonEligible";
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
components: { components: {
Filters, Filters,
Situation, SituationSummary,
Eligible, Eligible,
NonEligible NonEligible
}, },
......
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
data: () => ({ data: () => ({
monthly_allocation_value: null, monthly_allocation_value: null,
validity: false, validity: false,
rules: [v => !!v || "doit être renseignée"] rules: [v => !!v || "doit être renseigné"]
}), }),
methods: { methods: {
validate() { validate() {
......
<template> <template>
<v-form> <v-form @submit.prevent="submitAddress" ref="formAddress" v-model="validity">
Quel est votre code postal de votre lieu de résidence ? Quel est votre code postal de votre lieu de résidence ?
Code postal - facultatif Code postal - facultatif
**Plus que 2 questions avant d'obtenir vos résultats** <v-row>
<v-text-field single-line type="number" label="Exemple : 44220"></v-text-field> <v-col>
<v-text-field autofocus v-model.number="address" type="number" label="Exemple : 44220"></v-text-field>
</v-col>
<v-col>
<v-alert type="info">
<strong>Plus que 2 questions</strong>
<br />avant d'obtenir vos résultats
</v-alert>
</v-col>
</v-row>
<v-btn @click="back">Revenir</v-btn> <v-btn @click="back">Revenir</v-btn>
<v-btn v-bind:disabled="!validity" type="submit">Continuer</v-btn> <v-btn v-bind:disabled="!validity" type="submit">Continuer</v-btn>
</v-form> </v-form>
...@@ -12,12 +21,25 @@ ...@@ -12,12 +21,25 @@
<script> <script>
export default { export default {
name: "Address", name: "Address",
created() {
this.address = this.$store.state.situation.location_citycode;
},
data: () => ({
address: 0,
validity: false
}),
methods: { methods: {
validate() {
if (this.$refs.formAddress.validate()) {
this.validity = true;
}
},
back() { back() {
this.$router.go(-1); this.$router.go(-1);
}, },
submit() { submitAddress() {
//this.$store.dispatch("submitAddress", this.??); this.validate();
this.$store.dispatch("submitAddress", this.address);
this.$router.push("autres-situations"); this.$router.push("autres-situations");
} }
} }
......
<template> <template>
<v-form @submit.prevent="submitAge" ref="form" v-model="validity" :lazy-validation="lazy"> <v-form @submit.prevent="submitAge" ref="formAge" v-model="validity" :lazy-validation="lazy">
Quel est votre âge ? Quel est votre âge ?
<v-text-field <v-text-field
required required
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
}), }),
methods: { methods: {
validate() { validate() {
if (this.$refs.form.validate()) { if (this.$refs.formAge.validate()) {
this.validity = true; this.validity = true;
} }
}, },
......
<template> <template>
<v-form> <v-form @submit.prevent="submitAllocation" ref="formAllocation" v-model="validity">
Quelle allocation percevez-vous actuellement ? Quelle allocation percevez-vous actuellement ?
<v-radio-group v-model="radios"> <v-row>
<v-radio label="Choix 1" value="radio-1"></v-radio> <v-col>
<v-radio label="Choix 2" value="radio-2"></v-radio> <v-radio-group required :rules="rules" v-model="allocation_type">
<v-radio label="Choix 3" value="radio-3"></v-radio> <v-radio autofocus label="Une prestation d’assurance chômage : ARE / ASP" value="ARE_ASP"></v-radio>
<v-radio label="Choix 4" value="radio-4"></v-radio> <v-radio
<v-radio label="Choix 5" value="radio-5"></v-radio> label="Une prestation de solidarité : ASS / AER / APS / AS-FNE"
<v-radio label="Choix 6" value="radio-6"></v-radio> value="ASS_AER_ATA_APS_ASFNE"