Skip to content

Commit

Permalink
FEAT ITEM-261-front-modifier-le-workflow-de-suppression :
Browse files Browse the repository at this point in the history
     - création d'un workflow pour les suppressions des EPN
  • Loading branch information
EryneKL committed Oct 14, 2024
1 parent 5256a45 commit 88fc5d8
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions src/views/Suppression/SuppSteps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<span v-html="alertMessage"></span>
</v-alert>
<v-container class="d-flex justify-space-between">
<v-btn @click="prevSelectFileFinal()">
<v-btn @click="prev()">
précédent
</v-btn>
<v-btn
Expand Down Expand Up @@ -286,8 +286,7 @@ function uploadFileFinal() {
} else if (typeFileSelected.value==='EPN') {
itemService.uploadDemande(demande.value.id, fileSelected.value, 'SUPP')
.then(() => {
alertMessage.value = "Fichier envoyé";
alertMessage.value = "Fichier envoyé, veuillez patienter quelques instants.";
itemService.getFile(demande.value.id, 'SUPP','fichier_correspondance', '.csv')
.then(response => {
let blob = new Blob([response.data], {type: 'application/csv'});
Expand Down Expand Up @@ -316,7 +315,14 @@ function changeEtape() {
typeFileSelected.value = null;
}
if ((currentStep.value + 1) === 2 && typeFileSelected.value) { //Changement d'etat pour le chargement du fichier car le back est perdu sinon
if(typeFileSelected.value === 'PPN') {
if(typeFileSelected.value==='EPN') {typeFileSelected.value=null;}
itemService.choixEtape(demande.value.id, 2, 'SUPP')
.then(response => {
demande.value = response.data;
});
}
if ((currentStep.value + 1) === 3 ) {
if(typeFileSelected.value==='EPN'){
itemService.choixEtape(demande.value.id, 2, 'SUPP')
.then(response => {
demande.value = response.data;
Expand All @@ -328,12 +334,6 @@ function changeEtape() {
});
}
}
if ((currentStep.value + 1) === 3 ) {
itemService.choixEtape(demande.value.id, 3, 'SUPP')
.then(response => {
demande.value = response.data;
});
}
}
function prevSelectTypeFile(){
Expand All @@ -345,12 +345,6 @@ function prevSelectFile(){
changeEtape()
raz();
}
function prevSelectFileFinal(){
if(typeFileSelected.value==='EPN'){
typeFileSelected.value = null;
}
prev();
}
function next() {
currentStep.value++;
raz();
Expand Down

0 comments on commit 88fc5d8

Please sign in to comment.