From 9e683480ae03d1c3f4da2a7d8db65b149103a5cd Mon Sep 17 00:00:00 2001 From: EryneKL <97091460+EryneKL@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:32:24 +0200 Subject: [PATCH 1/2] =?UTF-8?q?FEAT=20ITEM-213-front-ajouter-ecran-de-simu?= =?UTF-8?q?lation=20:=20=20=20=20=20=20-=20ajout=20de=20l'=C3=A9cran=20de?= =?UTF-8?q?=20simulation=20dans=20SuppSteps.vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Simulation.vue | 4 +-- src/views/Suppression/SuppSteps.vue | 54 +++++++++++++++++++++-------- 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/components/Simulation.vue b/src/components/Simulation.vue index b44d60f..cfe89eb 100644 --- a/src/components/Simulation.vue +++ b/src/components/Simulation.vue @@ -53,7 +53,7 @@ import RecapDemande from '@/components/RecapDemande.vue'; import NavigateNotice from '@/components/NavigateNotice.vue'; import { onMounted, ref } from 'vue'; -import demandesService from '@/service/ItemService'; +import itemService from '@/service/ItemService'; const props = defineProps({ demande: { @@ -103,7 +103,7 @@ onMounted(() => { function refresh() { isLoading.value = true; alertMessageError.value = null; - demandesService.simulerLigne(props.demande.id, nbNotice.value.nbNoticeEnCours, props.demande.type) + itemService.simulerLigne(props.demande.id, nbNotice.value.nbNoticeEnCours, props.demande.type) .then(response => { numeroPPNNotice.value = response.data[0]; noticeAvant.value = response.data[1]; diff --git a/src/views/Suppression/SuppSteps.vue b/src/views/Suppression/SuppSteps.vue index 01dfb33..771aac5 100644 --- a/src/views/Suppression/SuppSteps.vue +++ b/src/views/Suppression/SuppSteps.vue @@ -1,7 +1,7 @@ @@ -161,6 +144,7 @@ import DownloadFile from "@/components/Modif/DownloadFile.vue"; import router from '@/router' import Rcr from '@/components/Rcr.vue'; import Simulation from "@/components/Simulation.vue"; +import DialogLancerTraitement from '@/components/Dialog/DialogLancerTraitement.vue'; import DialogSuppression from '@/components/Dialog/DialogSuppression.vue'; const currentStep = ref(0); @@ -207,12 +191,9 @@ onMounted(()=>{ currentStep.value = 2; break; case 'En simulation': - currentStep.value = 3; rcrSelected.value = demande.value.rcr; - typeDocumentSelected.value = { - id: -1, - libelle: demande.value.typeExemp - }; + typeFileSelected.value = demande.value.typeSuppression; + currentStep.value = 3; break; } }).catch(() => { @@ -339,6 +320,16 @@ function raz(){ isDownloaded.value = false; } +function launchDemande(){ + isLoading.value = true; + itemService.lancerDemande(demande.value.id,'SUPP') + .then(response => { + demande.value = response.data; + }).finally(() => { + isLoading.value = false; + }) +} + function deleteDemande() { suppDialog.value = true; }