Commit 00ca3138 authored by David Foucher's avatar David Foucher

Merge branch 'fix-sonarQube-bugs' into 'master'

Fix sonar qube bugs

See merge request !77
parents 46329101 70dfca7a
Pipeline #3649 passed with stage
in 2 minutes and 1 second
......@@ -13,18 +13,10 @@
<div id="financement-create-financement" class="col-md-6 col-sm-12 col-xs-12 my-auto">
<div class="form-inline pull-right">
<div class="form-group mx-sm-3 mb-2">
<!--<input type="button" href="#" class="btn main-button form-control" value="Créer un financement" disabled />-->
</div>
</div>
</div>
</div>
<!--
<div class="row">
<div id="financement-last-update" class="col-md-12">
Dernière mise à jour le __ à __
</div>
</div>
-->
</div>
</div>
<hr class="financement-horizontal-separator">
......@@ -83,13 +75,6 @@
</span>
</span>
</span>
<!--
<span class="col-md-1 col-sm-1 pull-right">
<button href="https://git.beta.pole-emploi.fr/open-source/trefle/edit/master/trefle/config/financements.yml" target="_blank" class="text-dark btn btn-outline-light" disabled>
<i class="icon" style="vertical-align: baseline;">edit</i>
</button>
</span>
-->
</li>
</ul>
</div>
......@@ -143,8 +128,7 @@
this.financements = response.body;
this.filteredFinancements = response.body;
this.isLoading = false;
})
.created;
});
},
setSearchTag: function (tag) {
this.search = tag;
......@@ -160,7 +144,7 @@
isCaseSensitive ? searchRegExp = new RegExp(searchWithoutAccents,"g") : searchRegExp = new RegExp(searchWithoutAccents,'ig')
return searchType != "input" ? this.filterable("", financement.tags).match(searchRegExp) : this.filterable(financement.intitule, financement.tags).match(searchRegExp)
}
return true
return true;
})
},
filterable: function (intitule,tags) {
......
......@@ -43,8 +43,7 @@
this.resultsIsEmpty = this.isEmpty(this.results);
}, () => {
this.resultsIsEmpty = this.isEmpty(this.results);
})
.created;
});
},
isEmpty: function (obj) {
for(var key in obj) {
......
......@@ -43,8 +43,7 @@
.then(response => {
this.results = response.body;
this.resultsIsEmpty = this.isEmpty(this.results);
})
.created;
});
},
isEmpty: function (obj) {
for(var key in obj) {
......
......@@ -44,8 +44,7 @@
.then(response => {
this.results = response.body;
this.resultsIsEmpty = this.isEmpty(this.results);
})
.created;
});
},
isEmpty: function (obj) {
for(var key in obj) {
......
......@@ -43,8 +43,7 @@
.then(response => {
this.results = response.body;
this.resultsIsEmpty = this.isEmpty(this.results);
})
.created;
});
},
isEmpty: function (obj) {
for(var key in obj) {
......
......@@ -133,8 +133,7 @@
.then(response => {
this.rules = response.body;
this.isLoading = false;
})
.created;
});
},
forceRerender: function () {
this.rerenderKey +=1;
......
......@@ -279,7 +279,7 @@
email: '',
password: '',
file: this.path
},
};
this.isEditMode=false;
if(this.modification_count!=0) this.viewModification = true;
this.error_flags = {
......
<template>
<div id="Simulateur">
<div class="container form-group pt-5">
<div class="container form-group pt-5 pb-3">
<div v-if="!resultats">
<div class="row">
<div class="col-md-12">
......@@ -10,7 +10,7 @@
<hr class="simulateur-horizontal-separator">
<!---------------- STEP FORMATION ---------------->
<div class="formation-step step" :class="{step_completed_class: formation_step_completed}">
<SimulateurStepFormation :id_formation="formation.numero"/>
<SimulateurStepFormation :id_formation_parent="formation.numero"/>
</div>
<hr v-if="formation_step_completed" class="simulateur-horizontal-separator">
<!---------------- STEP ONE ---------------->
......@@ -35,7 +35,7 @@
<hr v-if="step_four_completed" class="simulateur-horizontal-separator">
<!---------------- STEP FIVE ---------------->
<div v-if="step_four_completed" class="form-step step-five" :class="{step_completed_class: step_five_completed}">
<SimulateurStepFive id="SimulateurStepFive"/>
<SimulateurStepFive id="SimulateurStepFive" :id_naf_parent="naf" :id_idcc_parent="idcc"/>
</div>
<!---------------- STEP FIVE ---------------->
<div v-if="step_five_completed" class="form-step">
......@@ -282,7 +282,7 @@
a_travaille_six_mois: this.situation_6moissur12,
a_travaille_douze_mois: this.situation_6moissur12,
entreprise : {
naf: this.naf.match(/^\d{2}\.?\d{2}[a-zA-Z]$/gi) == null ? null : this.naf.match(/^\d{2}\.?\d{2}[a-zA-Z]$/gi),
naf: this.naf.match(/^\d{2}\.?\d{2}[a-zA-Z]$/gi) == null ? null : this.naf.match(/^\d{2}\.?\d{2}[a-zA-Z]$/gi).pop(),
idcc: this.idcc,
commune: this.commune_entreprise,
opco: null,
......@@ -306,24 +306,28 @@
})
},
simulateFromUrl: function() {
if(window.location.hash.substr(1).match(/^simulate/))
var simulate_link = window.location.hash.substr(9)
if(simulate_link.includes('labonneformation'))
this.$http.get('/explore/decode-lbf-url?url='+simulate_link)
.then(response => {
this.context = response.body
this.$http.get('/explore/catalog?id='+this.context['formation.numero']).then(response => {
if(response.status == 200) {
this.simulate()
}
})
})
if(window.location.hash.substr(1).match(/^simulate/)) {
var simulate_link = window.location.hash.substr(9);
if(simulate_link != undefined && simulate_link != null) {
if(simulate_link.includes('labonneformation')) {
this.$http.get('/explore/decode-lbf-url?url='+simulate_link)
.then(response => {
this.context = response.body
this.$http.get('/explore/catalog?id='+this.context['formation.numero']).then(response_catalog => {
if(response_catalog.status == 200) {
this.simulate()
}
})
});
}
}
}
},
prepareRequest: function() {
if (this.situation_inscrit == 1) {
if (this.allocation_type == 'non') {
this.allocation_type = null;
this.allocation_dateend = null;
this.allocation_type = "";
this.allocation_dateend = "";
}
this.salaire = null;