Skip to content

Commit

Permalink
Ajout label before et after dans simu
Browse files Browse the repository at this point in the history
ajout route modif/:id
Ajout step selectfile
Ajout step simu
  • Loading branch information
SamuelQuetin committed Jul 2, 2024
1 parent 956fc72 commit 27073dc
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 65 deletions.
2 changes: 0 additions & 2 deletions src/components/Exemp/TypeExemp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ function deleted() {

<style scoped>
.btn-perso:hover {
background-color: lightgrey;
transition-duration: 0.3s;
cursor: pointer;
}
Expand Down
4 changes: 4 additions & 0 deletions src/components/Modif/TypeTraitement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ function deleted() {
</script>

<style scoped>
.btn-perso:hover {
cursor: pointer;
}
.group {
font-size: x-large;
}
Expand Down
9 changes: 7 additions & 2 deletions src/components/RecapDemande.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@
<v-row class="d-flex justify-center pa-1">RCR</v-row>
<v-row class="d-flex justify-center pa-1">{{ demande.rcr }} - {{ demande.shortname }}</v-row>
</v-col>
<v-col>
<v-row class="d-flex justify-center pa-1">Type d'exemplarisation</v-row>
<v-col v-if="demande.typeExemp">
<v-row class="d-flex justify-center pa-1">Type de document</v-row>
<v-row class="d-flex justify-center pa-1">{{ demande.typeExemp }}</v-row>
</v-col>
<v-col v-if="demande.traitement">
<v-row class="d-flex justify-center pa-1">Type de traitement</v-row>
<v-row class="d-flex justify-center pa-1">{{ demande.traitement }}</v-row>
</v-col>
</v-row>
</v-container>
</div>
</template>

<script setup>
const props = defineProps({
demande: {type: Object, required: true}
});
Expand Down
42 changes: 24 additions & 18 deletions src/components/Simulation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
></v-progress-circular>
</v-overlay>
<!-- CONTENU SIMULATION -->
<v-card>
<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>
Expand All @@ -28,13 +28,9 @@
<v-col cols="12" sm="12" md="5"> <!--Exemplaires existants-->
<!--Carte activée si présence exemplaires pour cette notice-->
<v-card class="pa-1" outlined tile>
<span>Exemplaire(s) existant(s)</span>
<v-container id="scroll-target" style="max-height: 400px" class="overflow-y-auto">
<pre style="text-align: left; padding-top: 1em">
<span class="inner-pre" style="text-align: left; padding-top: 1em; overflow-x:scroll;">
{{ noticeAvant }}
</span>
</pre>
<h5 class="d-flex justify-center">{{ labelBefore }}</h5>
<v-container id="scroll-target" style="max-height: 400px" class="overflow-auto">
<pre style="text-align: left" class="py-4">{{ noticeAvant }}</pre>
</v-container>
</v-card>
</v-col>
Expand All @@ -43,10 +39,8 @@
</v-col>
<v-col cols="12" sm="12" md="5"> <!--Exemplaire à créer-->
<v-card class="pa-1" outlined tile>
<span>Exemplaire à créer</span>
<pre style="text-align: left; padding-top: 1em; overflow-x:scroll;">
{{ noticeApres }}
</pre>
<h5 class="d-flex justify-center">{{ labelAfter }}</h5>
<pre style="text-align: left" class="py-4 overflow-auto">{{ noticeApres }}</pre>
</v-card>
</v-col>
</v-row>
Expand All @@ -64,6 +58,14 @@ const props = defineProps({
demande: {
type: Object,
required: true
},
labelBefore: {
type: String,
default: 'Avant'
},
labelAfter: {
type: String,
default: 'Après'
}
});
const emits = defineEmits(['deleted'])
Expand All @@ -73,17 +75,17 @@ const nbNotice = ref({
nbTotalNotice: 0
});
const numeroPPNNotice = ref();
const noticeAvant = ref();
const noticeApres = ref();
const noticeAvant = ref("");
const noticeApres = ref("");
const isLoading = ref(true);
onMounted(() => {
demandesService.getNbLigneFichier(props.demande.id, 'EXEMP')
demandesService.getNbLigneFichier(props.demande.id, props.demande.type)
.then(response => {
console.log(response.data);
nbNotice.value.nbTotalNotice = response.data;
});
demandesService.simulerLigne(props.demande.id, 0, 'EXEMP')
demandesService.simulerLigne(props.demande.id, 0, props.demande.type)
.then(response => {
numeroPPNNotice.value = response.data[0];
noticeAvant.value = response.data[1];
Expand All @@ -96,7 +98,7 @@ onMounted(() => {
function refresh() {
isLoading.value = true;
demandesService.simulerLigne(props.demande.id, nbNotice.value.nbNoticeEnCours, 'EXEMP')
demandesService.simulerLigne(props.demande.id, nbNotice.value.nbNoticeEnCours, props.demande.type)
.then(response => {
numeroPPNNotice.value = response.data[0];
noticeAvant.value = response.data[1];
Expand All @@ -119,7 +121,11 @@ h3 {
}
h4 {
font-size: large;
font-size: x-large;
font-weight: normal;
}
h5 {
font-size: x-large;
font-weight: normal;
}
</style>
7 changes: 7 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ const routes = [
component: ModifSteps,
meta: {requiresAuth: true}
},
{
path: '/modification/:id',
name: 'modificationWithId',
component: ModifSteps,
props: true,
meta: {requiresAuth: true}
},
{
path: '/exemplarisation',
name: 'exemplarisation',
Expand Down
3 changes: 1 addition & 2 deletions src/views/Exemplarisation/ExempSteps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</v-container>
</v-stepper-window-item>
<v-stepper-window-item>
<simulation :demande="demande" @deleted="deleteDemande()"></simulation>
<simulation :demande="demande" label-before="Exemplaire(s) existant(s)" label-after="Exemplaire à créer" @deleted="deleteDemande()"></simulation>
<v-container class="d-flex justify-space-between">
<v-btn @click="prev">
précédent
Expand Down Expand Up @@ -125,7 +125,6 @@ const isLoading = ref(false);
const dialog = ref(false);
onMounted(()=>{
console.log(props.id);
if(props.id){
DemandesService.getDemande(props.id, "EXEMP")
.then(response => {
Expand Down
Loading

0 comments on commit 27073dc

Please sign in to comment.