Archivage fiches
This commit is contained in:
16
src/App.vue
16
src/App.vue
@@ -1,5 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {onMounted, ref} from 'vue';
|
import {onMounted, ref, watch} from 'vue';
|
||||||
import {storeToRefs} from "pinia";
|
import {storeToRefs} from "pinia";
|
||||||
import {useGlobalStore} from "@/stores/global";
|
import {useGlobalStore} from "@/stores/global";
|
||||||
import {useTicketStore} from "@/stores/ticket";
|
import {useTicketStore} from "@/stores/ticket";
|
||||||
@@ -72,15 +72,23 @@ onMounted(async () => {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const refreshTicketList = async () => {
|
||||||
|
await storeTicket.registerTicketList()
|
||||||
|
apiCounter.value++
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<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>
|
<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>
|
{{ currentTicket.last_name }}</h2>
|
||||||
|
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:modal-body>
|
<template v-slot:modal-body>
|
||||||
<Messenger :key="showModal" v-if="showModal"></Messenger>
|
<Messenger :key="showModal" v-if="showModal"></Messenger>
|
||||||
@@ -144,7 +152,7 @@ onMounted(async () => {
|
|||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="#" @click="showModal2++"><i
|
<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>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
|||||||
@@ -111,12 +111,14 @@ const goToShipment = computed(() => {
|
|||||||
<span><Icon icon="mdi:email" class="text-primary"/> {{ currentTicket.email }}</span><br/>
|
<span><Icon icon="mdi:email" class="text-primary"/> {{ currentTicket.email }}</span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<Teleport to="#messengerModal">
|
||||||
<div class="col-auto" v-if="currentTicket.hasOwnProperty('id_order') && currentTicket.id_order!==''">
|
<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>
|
<a target="_blank" class="btn btn-primary" :href="goToOrder"><i class="fa-solid fa-cart-shopping"></i> Voir la commande</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto" v-if="currentTicket.hasOwnProperty('id_order') && currentTicket.id_order!==''">
|
<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>
|
<a target="_blank" class="btn btn-primary ms-4" :href="goToShipment"><i class="fa-solid fa-truck"></i> Voir l'expédition</a>
|
||||||
</div>
|
</div>
|
||||||
|
</Teleport>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,10 +153,10 @@ const goToShipment = computed(() => {
|
|||||||
<span v-for="(document, i) in message.document">
|
<span v-for="(document, i) in message.document">
|
||||||
<a target="_blank" class="btn me-2 mb-2" :class="document.color"
|
<a target="_blank" class="btn me-2 mb-2" :class="document.color"
|
||||||
:key="'document-'+i"
|
: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>
|
<Icon width="40" :icon="document.icon"></Icon>
|
||||||
</a>
|
</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>
|
<Icon width="40" icon="fa6-solid:file-pdf"></Icon>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const refModal = ref(null)
|
const refModal = ref(null)
|
||||||
|
const emit = defineEmits(['hide-modal']);
|
||||||
|
const onHide = () => {
|
||||||
|
emit('hide-modal');
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const show = computed(() => {
|
const show = computed(() => {
|
||||||
return props.show
|
return props.show
|
||||||
@@ -30,6 +35,7 @@ let BsModal = null
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
BsModal = new Modal(refModal.value)
|
BsModal = new Modal(refModal.value)
|
||||||
|
refModal.value.addEventListener('hide.bs.modal', onHide);
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(show, async (to, from) => {
|
watch(show, async (to, from) => {
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ export default defineConfig({
|
|||||||
'/App': {
|
'/App': {
|
||||||
target: 'https://gta-pprod.parapharmacie-et-medicament.com/',
|
target: 'https://gta-pprod.parapharmacie-et-medicament.com/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
},
|
||||||
|
'/interface': {
|
||||||
|
target: 'https://gta-pprod.parapharmacie-et-medicament.com/',
|
||||||
|
changeOrigin: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user