92a5c48e5e
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | #332 | Refonte écran réception terminée | ## Description de la PR ## Modification du .env ## Check list - [x] Pas de régression - [ ] TU/TI/TF rédigée - [x] TU/TI/TF OK - [x] CHANGELOG modifié Co-authored-by: tristan <tristan@yuno.malio.fr> Reviewed-on: https://gitea.malio.fr/MALIO-DEV/Ferme/pulls/31 Reviewed-by: Autin <tristan@yuno.malio.fr> Co-authored-by: sroy <sebastien@yuno.malio.fr> Co-committed-by: sroy <sebastien@yuno.malio.fr>
64 lines
1.5 KiB
Vue
64 lines
1.5 KiB
Vue
<template>
|
|
<form>
|
|
<div class="grid grid-cols-3 gap-x-40 gap-y-8 mb-8">
|
|
<UiNumberInput
|
|
:key="localWeight.type"
|
|
:label="'POIDS'"
|
|
labelClass="font-bold uppercase text-xl "
|
|
v-model="localWeight.weight"
|
|
:disabled="!isAdmin"
|
|
:min="0"
|
|
:max="48000"
|
|
wrapper-class="flex-col"
|
|
/>
|
|
|
|
<UiDateInput
|
|
label="Date pesée"
|
|
v-model="localWeight.weighedAt"
|
|
:disabled="!isAdmin"
|
|
/>
|
|
|
|
<UiNumberInput
|
|
label="Dsd"
|
|
class="col-start-2"
|
|
labelClass="font-bold uppercase"
|
|
v-model="localWeight.dsd"
|
|
:disabled="!isAdmin"
|
|
wrapper-class="flex-col"
|
|
/>
|
|
</div>
|
|
</form>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type {WeightEntryData} from '~/services/dto/reception-data'
|
|
import {reactive, watch} from "vue";
|
|
|
|
const props = defineProps<{
|
|
modelValue: WeightEntryData
|
|
isAdmin: boolean
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
(event: 'update:modelValue', value: WeightEntryData): void
|
|
}>()
|
|
|
|
const localWeight = reactive<WeightEntryData>({...props.modelValue})
|
|
|
|
watch(
|
|
() => props.modelValue,
|
|
(value) => {
|
|
Object.assign(localWeight, value)
|
|
},
|
|
{deep: true}
|
|
)
|
|
|
|
watch(
|
|
localWeight,
|
|
(value) => {
|
|
emit('update:modelValue', {...value})
|
|
},
|
|
{deep: true}
|
|
)
|
|
</script>
|