Commit 3808e6ed authored by David Foucher's avatar David Foucher

Merge branch '26-pourvoir-modifier-les-informations-du-formulaire-de-simulation' into 'master'

Resolve "Pourvoir modifier les informations du formulaire de simulation"

Closes #26

See merge request !65
parents 58b8968d 6d0a8690
Pipeline #3448 passed with stage
in 3 minutes and 11 seconds
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<div class="row"> <div class="row">
<div class="col-md-12 mt-5"> <div class="col-md-12 mt-5">
<div id="chart-container" class="text-center"> <div id="chart-container" class="text-center">
<ModificationChart width="1200" height="200" @on-receive="update" :values="modification_chart_datas.datasets" :labels="modification_chart_datas.labels"></ModificationChart> <ModificationChart :width="1200" :height="200" @on-receive="update" :values="modification_chart_datas.datasets" :labels="modification_chart_datas.labels"></ModificationChart>
</div> </div>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<hr class="simulateur-horizontal-separator"> <hr class="simulateur-horizontal-separator">
<!---------------- STEP FORMATION ----------------> <!---------------- STEP FORMATION ---------------->
<div class="formation-step step" :class="{step_completed_class: formation_step_completed}"> <div class="formation-step step" :class="{step_completed_class: formation_step_completed}">
<SimulateurStepFormation/> <SimulateurStepFormation :id_formation="formation.numero"/>
</div> </div>
<hr v-if="formation_step_completed" class="simulateur-horizontal-separator"> <hr v-if="formation_step_completed" class="simulateur-horizontal-separator">
<!---------------- STEP ONE ----------------> <!---------------- STEP ONE ---------------->
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<!------------------- RESULTATS --------------> <!------------------- RESULTATS -------------->
<div v-if="resultats" id="simulate-results"> <div v-if="resultats" id="simulate-results">
<div v-if="!isLoading" class="mt-5"> <div v-if="!isLoading" class="mt-5">
<SimulateurResultats :schema="schema" :financements="financements" :financements_eligibles="financements_eligibles" :scenario="scenario" :context="context"></SimulateurResultats> <SimulateurResultats :schema="schema" :financements="financements" :financements_eligibles="financements_eligibles" :scenario="scenario" :context="context" :id_formation="formation.numero"></SimulateurResultats>
</div> </div>
<div v-else class="text-center loading-gif"> <div v-else class="text-center loading-gif">
<img src="./../assets/images/loading.gif" alt="loading..."> <img src="./../assets/images/loading.gif" alt="loading...">
...@@ -256,8 +256,8 @@ ...@@ -256,8 +256,8 @@
inscrit_pe: this.situation_inscrit == 2 ? false : true, inscrit_pe: this.situation_inscrit == 2 ? false : true,
solde_cpf: this.situation_creditheurescpf == '' ? 0 : this.situation_creditheurescpf, solde_cpf: this.situation_creditheurescpf == '' ? 0 : this.situation_creditheurescpf,
remuneration: this.salaire == '' ? 0 : this.salaire, remuneration: this.salaire == '' ? 0 : this.salaire,
allocation: this.allocation_cost == ''? 0 : this.allocation_cost, allocation: this.allocation_cost == '' ? 0 : this.allocation_cost,
type_allocation: this.allocation_type, type_allocation: this.allocation_type == 'non' ? null : this.allocation_type,
fin_allocation: this.allocation_dateend, fin_allocation: this.allocation_dateend,
naissance: this.birthdate, naissance: this.birthdate,
age: this.age_beneficiaire, age: this.age_beneficiaire,
...@@ -365,15 +365,11 @@ ...@@ -365,15 +365,11 @@
simulate: function () { simulate: function () {
this.isLoading = true; this.isLoading = true;
var context = null; if(!this.objectIsEmpty(this.context)) {
if(this.context) {
context=this.context
} else {
this.prepareRequest()