feat : finalisation et correctif couleur de affichage reception finie
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
|
||||
<template>
|
||||
<NuxtLink :to="link">
|
||||
<div class="w-[300px] h-[216px] border border-black rounded-lg p-6 flex flex-col justify-between gap-4">
|
||||
<div class="w-[300px] h-[216px] border border-primary-700 rounded-lg p-6 flex flex-col justify-between gap-4">
|
||||
<div class="flex justify-between">
|
||||
<div class="rounded-full w-[80px] h-[80px] bg-[#D9D9D9] flex justify-center items-center">
|
||||
<Icon :name="iconName" style="color: black" size="44" />
|
||||
<Icon :name="iconName" class="!text-primary-700" size="44" />
|
||||
</div>
|
||||
<div>
|
||||
<Icon name="mdi:plus" style="color: black" size="44" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="uppercase font-bold">
|
||||
<p class="text-3xl text-primary-500">
|
||||
<p class="text-3xl text-primary-700">
|
||||
<slot name="label">{{ label }}</slot>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// flex row passer en class wraper class flex col ainsi que le wfull 34
|
||||
<template>
|
||||
<div :class="['flex flex-col', wrapperClass]">
|
||||
<div :class="['flex', wrapperClass]">
|
||||
<label
|
||||
v-if="label"
|
||||
:for="id"
|
||||
|
||||
@@ -218,10 +218,7 @@ import {getDriverList} from '~/services/driver'
|
||||
import type {VehicleData} from '~/services/dto/vehicle-data'
|
||||
import {getVehicleList} from '~/services/vehicle'
|
||||
import {RECEPTION_TYPE_CODES, SUPPLIER_CODE} from "~/utils/constants";
|
||||
import {
|
||||
deleteReceptionBovine,
|
||||
getReceptionBovineList,
|
||||
} from "~/services/reception-bovine";
|
||||
import {deleteReceptionBovine, getReceptionBovineList,} from "~/services/reception-bovine";
|
||||
import type {ReceptionData, ReceptionFormData} from "~/services/dto/reception-data";
|
||||
import {getReception, updateReception} from "~/services/reception";
|
||||
import UpdateWeight from "~/components/reception/update-weight.vue";
|
||||
@@ -279,7 +276,6 @@ const isMerchandise = ref(false)
|
||||
// Empêche les watchers de reset des champs pendant le remplissage initial
|
||||
const isHydrating = ref(false)
|
||||
|
||||
|
||||
// Transporteur sélectionné dans le formulaire
|
||||
const selectedCarrier = computed(() =>
|
||||
carriers.value.find((carrier) => String(carrier.id) === form.carrierId) ?? null
|
||||
@@ -427,6 +423,7 @@ const loadSuppliers = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
//charge la liste des types pour le select
|
||||
const loadTypes = async () => {
|
||||
isLoadingTypes.value = true
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user