feat : ajout loader skeleton
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<skeletonTable v-if="isPageLoading"/>
|
||||
<div v-else class="ps-20 ">
|
||||
<div class="flex items-center justify-start gap-10">
|
||||
<Icon @click="router.push('/')" name="gg:arrow-left-o" style="color: black" size="44"/>
|
||||
<h1 class="text-3xl font-bold uppercase">listes des expéditions finie</h1>
|
||||
</div>
|
||||
|
||||
<div class="ps-20 ">
|
||||
<div class="mt-6 border border-slate-200 mb-16 ">
|
||||
<div class="grid grid-cols-6 gap-4 bg-slate-100 px-4 py-3 text-sm font-semibold uppercase tracking-wide">
|
||||
<div>Numéro</div>
|
||||
@@ -50,7 +51,7 @@ import {getShipmentList} from "~/services/shipment";
|
||||
|
||||
const shipmentList = ref<ShipmentData[]>()
|
||||
const router = useRouter()
|
||||
|
||||
const isPageLoading = ref(true)
|
||||
const formatWeighing = (shipment: ShipmentData, type: 'gross' | 'tare') => {
|
||||
const entry = shipment.weights?.find((weight) => weight.type === type)
|
||||
if (!entry || entry.weight == null || entry.dsd == null) {
|
||||
@@ -73,9 +74,11 @@ const formatBovinShipmentLines = (shipment: ShipmentData) => {
|
||||
|
||||
const goToshipment = (id: number) => {
|
||||
//router.push(`/shipment/update/${id}`)
|
||||
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
shipmentList.value = await getShipmentList(true)
|
||||
isPageLoading.value = false
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user