This commit is contained in:
Evert Prants 2023-01-26 20:30:17 +02:00
parent b1f58276d0
commit 4a696eef0d
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 7 additions and 5 deletions

View File

@ -107,7 +107,7 @@ const inputClass = computed(() => {
? 'border-red-300 focus:border-red-500 focus:ring-red-500' ? 'border-red-300 focus:border-red-500 focus:ring-red-500'
: 'border-gray-300 focus:border-blue-500 focus:ring-blue-500', : 'border-gray-300 focus:border-blue-500 focus:ring-blue-500',
`block w-full rounded-md shadow-sm sm:text-sm transition-colors duration-200`, `block w-full rounded-md shadow-sm sm:text-sm transition-colors duration-200`,
'py-2 pl-3 pr-10 text-left cursor-default h-[38px] border-[1px]', 'py-2 pl-3 pr-10 text-left cursor-default h-[38px] border-[1px] focus:ring-1',
]; ];
}); });

View File

@ -5,7 +5,7 @@
:placeholder="placeholder" :placeholder="placeholder"
:disabled="disabled" :disabled="disabled"
> >
<template #input="{ invalid, value, setValue }"> <template #input="{ invalid, forId, value, setValue }">
<SelectVue <SelectVue
:for-id="forId" :for-id="forId"
:invalid="invalid" :invalid="invalid"
@ -26,7 +26,6 @@ import SelectVue, { SelectOption } from '../base/Select.vue';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
forId?: string;
label: string; label: string;
name: string; name: string;
options: SelectOption[]; options: SelectOption[];

View File

@ -30,10 +30,12 @@
</div> </div>
<div <div
:class="`flex items-center space-x-1 ${fontSize} text-gray-500`" :class="`flex items-center space-x-1 ${fontSize} text-gray-500`"
title="Type" :title="`${ItemTypeName[storedItem.item.type]} - ${
ItemTypeDescription[storedItem.item.type]
}`"
> >
<InformationCircleIcon class="h-4 w-4" /> <InformationCircleIcon class="h-4 w-4" />
<span>{{ storedItem.item.type }}</span> <span>{{ ItemTypeName[storedItem.item.type] }}</span>
<span v-if="storedItem.item.consumable">· Consumable</span> <span v-if="storedItem.item.consumable">· Consumable</span>
<span v-if="storedItem.consumedAt" <span v-if="storedItem.consumedAt"
>· Consumed at {{ dateToLocaleString(storedItem.consumedAt) }}</span >· Consumed at {{ dateToLocaleString(storedItem.consumedAt) }}</span
@ -79,6 +81,7 @@ import {
QrCodeIcon, QrCodeIcon,
} from '@heroicons/vue/24/outline'; } from '@heroicons/vue/24/outline';
import { computed } from 'vue'; import { computed } from 'vue';
import { ItemTypeDescription, ItemTypeName } from '../../enums/item-type.enum';
import { StoredItem } from '../../interfaces/storage.interfaces'; import { StoredItem } from '../../interfaces/storage.interfaces';
const props = defineProps<{ const props = defineProps<{