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>
63 lines
1.6 KiB
Vue
63 lines
1.6 KiB
Vue
<template>
|
|
<div :class="['flex flex-col', wrapperClass]">
|
|
<label
|
|
v-if="label"
|
|
:for="id"
|
|
class="font-bold uppercase text-xl text-primary-700"
|
|
:class="labelClass"
|
|
>
|
|
{{ label }}
|
|
</label>
|
|
<input
|
|
:id="id"
|
|
type="date"
|
|
:value="modelValue ?? ''"
|
|
:disabled="disabled"
|
|
v-bind="attrs"
|
|
class="border-b border-primary-700 justify-self-start text-xl text-primary-700 py-[6px] uppercase bg-transparent appearance-none h-[34px]"
|
|
:class="[
|
|
isEmpty ? 'text-neutral-400' : 'text-primary-700',
|
|
disabled ? 'cursor-not-allowed' : 'cursor-pointer',
|
|
inputClass
|
|
]"
|
|
@input="onInput"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed, useAttrs } from 'vue'
|
|
|
|
defineOptions({ inheritAttrs: false })
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
id?: string
|
|
label?: string
|
|
modelValue: string | null | undefined
|
|
disabled?: boolean
|
|
wrapperClass?: string
|
|
labelClass?: string
|
|
inputClass?: string
|
|
}>(),
|
|
{
|
|
disabled: false,
|
|
wrapperClass: '',
|
|
labelClass: '',
|
|
inputClass: ''
|
|
}
|
|
)
|
|
|
|
const emit = defineEmits<{
|
|
(event: 'update:modelValue', value: string): void
|
|
}>()
|
|
|
|
const attrs = useAttrs()
|
|
const isEmpty = computed(() => !props.modelValue)
|
|
|
|
const onInput = (event: Event) => {
|
|
const target = event.target as HTMLInputElement
|
|
emit('update:modelValue', target.value)
|
|
}
|
|
</script>
|