Archivage fiches

This commit is contained in:
2024-06-28 18:15:18 +02:00
parent e8c8297305
commit 1441ba1e56
4 changed files with 26 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
<script setup>
import {onMounted, ref} from 'vue';
import {onMounted, ref, watch} from 'vue';
import {storeToRefs} from "pinia";
import {useGlobalStore} from "@/stores/global";
import {useTicketStore} from "@/stores/ticket";
@@ -72,15 +72,23 @@ onMounted(async () => {
})
const refreshTicketList = async () => {
await storeTicket.registerTicketList()
apiCounter.value++
}
</script>
<template>
<Modal :show="showModal" :hide="hideModal" class="modal-xl messenger">
<Modal :show="showModal" :hide="hideModal" class="modal-xl messenger" @hide-modal="refreshTicketList()">
<template v-slot:modal-title>
<h2 v-if="idTicket !== 0">Fiche n° {{ currentTicket.code }} - {{ currentTicket.first_name }}
<div class="row" id="messengerModal">
<h2 class="col-auto" v-if="idTicket !== 0">Fiche n° {{ currentTicket.code }} - {{ currentTicket.first_name }}
{{ currentTicket.last_name }}</h2>
</div>
</template>
<template v-slot:modal-body>
<Messenger :key="showModal" v-if="showModal"></Messenger>
@@ -144,7 +152,7 @@ onMounted(async () => {
</li>
<li class="nav-item">
<a class="nav-link" href="#" @click="showModal2++"><i
class="fa-solid fa-box-archive"></i> Archiver les fiches en cours ?
class="fa-solid fa-box-archive"></i> Archiver les fiches en cours
</a>
</li>
<li class="nav-item">

View File

@@ -111,12 +111,14 @@ const goToShipment = computed(() => {
<span><Icon icon="mdi:email" class="text-primary"/> {{ currentTicket.email }}</span><br/>
</div>
</div>
<Teleport to="#messengerModal">
<div class="col-auto" v-if="currentTicket.hasOwnProperty('id_order') && currentTicket.id_order!==''">
<a target="_blank" class="btn btn-primary" :href="goToOrder"><i class="fa-solid fa-cart-shopping"></i> Voir la commande</a>
</div>
<div class="col-auto" v-if="currentTicket.hasOwnProperty('id_order') && currentTicket.id_order!==''">
<a target="_blank" class="btn btn-primary ms-4" :href="goToShipment"><i class="fa-solid fa-truck"></i> Voir l'expédition</a>
</div>
</Teleport>
</div>
</div>
@@ -151,10 +153,10 @@ const goToShipment = computed(() => {
<span v-for="(document, i) in message.document">
<a target="_blank" class="btn me-2 mb-2" :class="document.color"
:key="'document-'+i"
:href="'https://gta.parapharmacie-et-medicament.com/interface/ase_get_doc.php?prj=pharmamp&display=html&id='+document.id">
:href="'/interface/ase_get_doc.php?prj=pharmamp&display=html&id='+document.id">
<Icon width="40" :icon="document.icon"></Icon>
</a>
<a v-if="document.pdf" target="_blank" class="btn me-2 mb-2 btn-outline-danger" :href="'https://gta.parapharmacie-et-medicament.com'+getPdfLinkConverter(message.id, message.document[0].id, message.document[0].type)">
<a v-if="document.pdf" target="_blank" class="btn me-2 mb-2 btn-outline-danger" :href="getPdfLinkConverter(message.id, message.document[0].id, message.document[0].type)">
<Icon width="40" icon="fa6-solid:file-pdf"></Icon>
</a>
</span>

View File

@@ -17,6 +17,11 @@ const props = defineProps({
})
const refModal = ref(null)
const emit = defineEmits(['hide-modal']);
const onHide = () => {
emit('hide-modal');
};
const show = computed(() => {
return props.show
@@ -30,6 +35,7 @@ let BsModal = null
onMounted(() => {
BsModal = new Modal(refModal.value)
refModal.value.addEventListener('hide.bs.modal', onHide);
})
watch(show, async (to, from) => {

View File

@@ -15,6 +15,10 @@ export default defineConfig({
'/App': {
target: 'https://gta-pprod.parapharmacie-et-medicament.com/',
changeOrigin: true,
},
'/interface': {
target: 'https://gta-pprod.parapharmacie-et-medicament.com/',
changeOrigin: true,
}
}
},