feat : finalisation et correctif couleur de affichage reception finie
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="receptionStore.current?.receptionType?.code === RECEPTION_TYPE_CODES.BOVINS"
|
||||
class="flex flex-col items-center gap-16">
|
||||
class="flex flex-col gap-16">
|
||||
<h1 class="text-4xl uppercase font-bold text-primary-500">Sélection des races réceptionnées</h1>
|
||||
<div
|
||||
class="flex flex-row gap-8 items-center">
|
||||
class="flex flex-row gap-8 items-center w-full">
|
||||
<div
|
||||
v-for="type in bovineType"
|
||||
:key="type.id"
|
||||
class="mt-8 flex flex-row mb-2 gap-6">
|
||||
class="mt-8 flex flex-row mb-2 w-full">
|
||||
<UiNumberInput
|
||||
:id="type.id"
|
||||
:label="type.label"
|
||||
@@ -17,6 +17,8 @@
|
||||
:placeholder="0"
|
||||
:min="0"
|
||||
:max="10"
|
||||
class="max-w-[150px]"
|
||||
wrapper-class="gap-3"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@@ -24,6 +26,8 @@
|
||||
<UiNumberInput
|
||||
label="Autres"
|
||||
v-model="otherQuantity"
|
||||
class="max-w-[80px]"
|
||||
wrapper-class="gap-3"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,15 +13,14 @@
|
||||
:placeholder="0"
|
||||
:min="0"
|
||||
:max="10"
|
||||
wrapperClass="w-44"
|
||||
wrapperClass="w-44 flex-col"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<UiNumberInput
|
||||
label="Autres"
|
||||
v-model="otherQuantity"
|
||||
:disabled="!auth.isAdmin"
|
||||
wrapperClass="w-44"
|
||||
wrapperClass="w-44 flex-col"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -113,7 +112,7 @@ watch(
|
||||
|
||||
const existingOther = reception.bovineDetail
|
||||
const parsedOther =
|
||||
typeof existingOther === 'string' && existingOther.trim() !== ''
|
||||
typeof existingOther === 'string' && existingOther.trim() !== ''
|
||||
? Number(existingOther)
|
||||
: 0
|
||||
otherQuantity.value = Number.isFinite(parsedOther) ? parsedOther : 0
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
:disabled="!auth.isAdmin"
|
||||
:min="0"
|
||||
:max="48000"
|
||||
wrapper-class="flex-col"
|
||||
/>
|
||||
|
||||
<UiDateInput
|
||||
@@ -23,6 +24,7 @@
|
||||
labelClass="font-bold uppercase"
|
||||
v-model="sharedWeightMeta.dsd"
|
||||
:disabled="!auth.isAdmin"
|
||||
wrapper-class="flex-col"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -41,11 +43,6 @@ const props = defineProps<{
|
||||
isValidate: boolean
|
||||
}>()
|
||||
|
||||
const idReception = props.idReception
|
||||
const weightType = props.weightType
|
||||
|
||||
const auth = useAuthStore()
|
||||
|
||||
const form = reactive({
|
||||
weights: [
|
||||
{id: 0, type: 'tare' as const, weight: 0, dsd: null, weighedAt: null},
|
||||
@@ -53,6 +50,9 @@ const form = reactive({
|
||||
]
|
||||
})
|
||||
|
||||
const idReception = props.idReception
|
||||
const weightType = props.weightType
|
||||
const auth = useAuthStore()
|
||||
const weight = form.weights.find(w => w.type === weightType)
|
||||
const initialWeight = ref<{ weight: number | null; dsd: number | null; weighedAt: string | null } | null>(null)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user