Skip to content

Commit

Permalink
FIX Ajout de l'affichage du message d'erreur sur les pages de simu + …
Browse files Browse the repository at this point in the history
…ajout ptit espace entre les boutons de navigation
  • Loading branch information
SamuelQuetin committed Aug 28, 2024
1 parent 3befdbc commit a7d931f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/components/NavigateNotice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!--Conteneur bouton 1-->
<v-row class="d-flex justify-center">
<v-btn
class="mt-3"
:disabled="nbNotice.nbNoticeEnCours === 0"
large
dark
Expand All @@ -17,6 +18,7 @@
<!--Conteneur bouton 2-->
<v-row class="d-flex justify-center">
<v-btn
class="mt-3"
:disabled="nbNotice.nbNoticeEnCours === 0"
large
dark
Expand All @@ -31,6 +33,7 @@
<!--Conteneur bouton 3-->
<v-row class="d-flex justify-center">
<v-btn
class="mt-3"
:disabled="nbNotice.nbNoticeEnCours === nbNotice.nbTotalNotice - 1"
large
dark
Expand All @@ -45,6 +48,7 @@
<!--Conteneur bouton 4-->
<v-row class="d-flex justify-center">
<v-btn
class="mt-3"
:disabled="nbNotice.nbNoticeEnCours === nbNotice.nbTotalNotice - 1"
large
dark
Expand Down
15 changes: 12 additions & 3 deletions src/components/Simulation.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<template>
<recap-demande :demande="demande"></recap-demande>

<v-overlay v-model="isLoading" class="justify-center align-center">
<v-progress-circular
color="blue-lighten-3"
Expand All @@ -9,14 +7,17 @@
:width="12"
></v-progress-circular>
</v-overlay>

<recap-demande :demande="demande"></recap-demande>
<!-- CONTENU SIMULATION -->
<v-alert icon="mdi-alert" type="error" v-if="alertMessageError" class="my-3" border="left">Simulation impossible : {{ alertMessageError }}</v-alert>
<v-card flat class="pb-2">
<v-card-title style="background-color: #295494; color: white" class="d-flex justify-space-between">
<span>Ecran de simulation</span>
<v-btn depressed variant="text" @click="deleted()" prepend-icon="mdi-delete">Supprimer</v-btn>
</v-card-title>
<!--TEMPLATE DE SIMULATION-->
<v-alert type="warning" align="center" class="my-3 pa-2" dense prominent border="left">
<v-alert type="warning" class="my-3 pa-2" dense prominent border="left">
Cet écran est une <strong>prévisualisation</strong> du traitement.<br>
Il s'agit de la <strong>dernière étape</strong> avant de lancer le traitement en <strong>base de
production</strong>. Merci de <strong>vérifier vos données</strong>.
Expand Down Expand Up @@ -78,6 +79,7 @@ const numeroPPNNotice = ref();
const noticeAvant = ref("");
const noticeApres = ref("");
const isLoading = ref(true);
const alertMessageError = ref();
onMounted(() => {
demandesService.getNbLigneFichier(props.demande.id, props.demande.type)
Expand All @@ -90,19 +92,26 @@ onMounted(() => {
noticeAvant.value = response.data[1];
noticeApres.value = response.data[2];
})
.catch(err => {
alertMessageError.value = err.response.data.message
})
.finally(() => {
isLoading.value = false;
});
});
function refresh() {
isLoading.value = true;
alertMessageError.value = null;
demandesService.simulerLigne(props.demande.id, nbNotice.value.nbNoticeEnCours, props.demande.type)
.then(response => {
numeroPPNNotice.value = response.data[0];
noticeAvant.value = response.data[1];
noticeApres.value = response.data[2];
})
.catch(err => {
alertMessageError.value = err.response.data.message
})
.finally(() => {
isLoading.value = false;
});
Expand Down

0 comments on commit a7d931f

Please sign in to comment.