feat : finalisation et correctif couleur de affichage reception finie
This commit is contained in:
@@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NuxtLink :to="link">
|
<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="flex justify-between">
|
||||||
<div class="rounded-full w-[80px] h-[80px] bg-[#D9D9D9] flex justify-center items-center">
|
<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>
|
||||||
<div>
|
<div>
|
||||||
<Icon name="mdi:plus" style="color: black" size="44" />
|
<Icon name="mdi:plus" style="color: black" size="44" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uppercase font-bold">
|
<div class="uppercase font-bold">
|
||||||
<p class="text-3xl text-primary-500">
|
<p class="text-3xl text-primary-700">
|
||||||
<slot name="label">{{ label }}</slot>
|
<slot name="label">{{ label }}</slot>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-if="receptionStore.current?.receptionType?.code === RECEPTION_TYPE_CODES.BOVINS"
|
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>
|
<h1 class="text-4xl uppercase font-bold text-primary-500">Sélection des races réceptionnées</h1>
|
||||||
<div
|
<div
|
||||||
class="flex flex-row gap-8 items-center">
|
class="flex flex-row gap-8 items-center w-full">
|
||||||
<div
|
<div
|
||||||
v-for="type in bovineType"
|
v-for="type in bovineType"
|
||||||
:key="type.id"
|
:key="type.id"
|
||||||
class="mt-8 flex flex-row mb-2 gap-6">
|
class="mt-8 flex flex-row mb-2 w-full">
|
||||||
<UiNumberInput
|
<UiNumberInput
|
||||||
:id="type.id"
|
:id="type.id"
|
||||||
:label="type.label"
|
:label="type.label"
|
||||||
@@ -17,6 +17,8 @@
|
|||||||
:placeholder="0"
|
:placeholder="0"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="10"
|
:max="10"
|
||||||
|
class="max-w-[150px]"
|
||||||
|
wrapper-class="gap-3"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -24,6 +26,8 @@
|
|||||||
<UiNumberInput
|
<UiNumberInput
|
||||||
label="Autres"
|
label="Autres"
|
||||||
v-model="otherQuantity"
|
v-model="otherQuantity"
|
||||||
|
class="max-w-[80px]"
|
||||||
|
wrapper-class="gap-3"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,15 +13,14 @@
|
|||||||
:placeholder="0"
|
:placeholder="0"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="10"
|
:max="10"
|
||||||
wrapperClass="w-44"
|
wrapperClass="w-44 flex-col"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<UiNumberInput
|
<UiNumberInput
|
||||||
label="Autres"
|
label="Autres"
|
||||||
v-model="otherQuantity"
|
v-model="otherQuantity"
|
||||||
:disabled="!auth.isAdmin"
|
:disabled="!auth.isAdmin"
|
||||||
wrapperClass="w-44"
|
wrapperClass="w-44 flex-col"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -113,7 +112,7 @@ watch(
|
|||||||
|
|
||||||
const existingOther = reception.bovineDetail
|
const existingOther = reception.bovineDetail
|
||||||
const parsedOther =
|
const parsedOther =
|
||||||
typeof existingOther === 'string' && existingOther.trim() !== ''
|
typeof existingOther === 'string' && existingOther.trim() !== ''
|
||||||
? Number(existingOther)
|
? Number(existingOther)
|
||||||
: 0
|
: 0
|
||||||
otherQuantity.value = Number.isFinite(parsedOther) ? parsedOther : 0
|
otherQuantity.value = Number.isFinite(parsedOther) ? parsedOther : 0
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
:disabled="!auth.isAdmin"
|
:disabled="!auth.isAdmin"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="48000"
|
:max="48000"
|
||||||
|
wrapper-class="flex-col"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<UiDateInput
|
<UiDateInput
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
labelClass="font-bold uppercase"
|
labelClass="font-bold uppercase"
|
||||||
v-model="sharedWeightMeta.dsd"
|
v-model="sharedWeightMeta.dsd"
|
||||||
:disabled="!auth.isAdmin"
|
:disabled="!auth.isAdmin"
|
||||||
|
wrapper-class="flex-col"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -41,11 +43,6 @@ const props = defineProps<{
|
|||||||
isValidate: boolean
|
isValidate: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const idReception = props.idReception
|
|
||||||
const weightType = props.weightType
|
|
||||||
|
|
||||||
const auth = useAuthStore()
|
|
||||||
|
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
weights: [
|
weights: [
|
||||||
{id: 0, type: 'tare' as const, weight: 0, dsd: null, weighedAt: null},
|
{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 weight = form.weights.find(w => w.type === weightType)
|
||||||
const initialWeight = ref<{ weight: number | null; dsd: number | null; weighedAt: string | null } | null>(null)
|
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
|
// flex row passer en class wraper class flex col ainsi que le wfull 34
|
||||||
<template>
|
<template>
|
||||||
<div :class="['flex flex-col', wrapperClass]">
|
<div :class="['flex', wrapperClass]">
|
||||||
<label
|
<label
|
||||||
v-if="label"
|
v-if="label"
|
||||||
:for="id"
|
:for="id"
|
||||||
|
|||||||
@@ -218,10 +218,7 @@ import {getDriverList} from '~/services/driver'
|
|||||||
import type {VehicleData} from '~/services/dto/vehicle-data'
|
import type {VehicleData} from '~/services/dto/vehicle-data'
|
||||||
import {getVehicleList} from '~/services/vehicle'
|
import {getVehicleList} from '~/services/vehicle'
|
||||||
import {RECEPTION_TYPE_CODES, SUPPLIER_CODE} from "~/utils/constants";
|
import {RECEPTION_TYPE_CODES, SUPPLIER_CODE} from "~/utils/constants";
|
||||||
import {
|
import {deleteReceptionBovine, getReceptionBovineList,} from "~/services/reception-bovine";
|
||||||
deleteReceptionBovine,
|
|
||||||
getReceptionBovineList,
|
|
||||||
} from "~/services/reception-bovine";
|
|
||||||
import type {ReceptionData, ReceptionFormData} from "~/services/dto/reception-data";
|
import type {ReceptionData, ReceptionFormData} from "~/services/dto/reception-data";
|
||||||
import {getReception, updateReception} from "~/services/reception";
|
import {getReception, updateReception} from "~/services/reception";
|
||||||
import UpdateWeight from "~/components/reception/update-weight.vue";
|
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
|
// Empêche les watchers de reset des champs pendant le remplissage initial
|
||||||
const isHydrating = ref(false)
|
const isHydrating = ref(false)
|
||||||
|
|
||||||
|
|
||||||
// Transporteur sélectionné dans le formulaire
|
// Transporteur sélectionné dans le formulaire
|
||||||
const selectedCarrier = computed(() =>
|
const selectedCarrier = computed(() =>
|
||||||
carriers.value.find((carrier) => String(carrier.id) === form.carrierId) ?? null
|
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 () => {
|
const loadTypes = async () => {
|
||||||
isLoadingTypes.value = true
|
isLoadingTypes.value = true
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user