fix : corrections de tous les retours + modification de la seed et fixtures
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="flex items-center justify-start gap-10 mt-16">
|
||||
<Icon @click="router.push('/')" name="gg:arrow-left-o" style="color: black" size="44" class="cursor-pointer"/>
|
||||
<h1 class="text-3xl font-bold uppercase">listes des expéditions finie</h1>
|
||||
<div class="flex items-center justify-start gap-10">
|
||||
<Icon @click="router.push('/')" name="gg:arrow-left-o" size="44" class="cursor-pointer text-primary-500"/>
|
||||
<h1 class="text-3xl font-bold uppercase text-primary-500">listes des expéditions finie</h1>
|
||||
</div>
|
||||
|
||||
<div class="px-[86px]">
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div>Vide : {{ formatWeighing(shipment, 'tare') }} <br> Plein :{{ formatWeighing(shipment, 'gross') }}</div>
|
||||
<div>{{ formatWeighing(shipment) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -51,12 +51,15 @@ import {getShipmentList} from "~/services/shipment";
|
||||
const shipmentList = ref<ShipmentData[]>()
|
||||
const router = useRouter()
|
||||
|
||||
const formatWeighing = (shipment: ShipmentData, type: 'gross' | 'tare') => {
|
||||
const entry = shipment.weights?.find((weight) => weight.type === type)
|
||||
if (!entry || entry.weight == null || entry.dsd == null) {
|
||||
const formatWeighing = (shipment: ShipmentData) => {
|
||||
const gross = shipment.weights?.find((weight) => weight.type === 'gross')?.weight
|
||||
const tare = shipment.weights?.find((weight) => weight.type === 'tare')?.weight
|
||||
|
||||
if (gross == null || tare == null) {
|
||||
return '—'
|
||||
}
|
||||
return `${entry.weight} kg`
|
||||
|
||||
return `${gross - tare} kg`
|
||||
}
|
||||
|
||||
const formatBovinShipmentLines = (shipment: ShipmentData) => {
|
||||
|
||||
Reference in New Issue
Block a user