small fixes

This commit is contained in:
vabene1111
2025-06-19 17:36:39 +02:00
parent d8f444e596
commit 5d65c76686
4 changed files with 13 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
<template> <template>
<v-col :cols="props.cols" :md="props.md" :lg="props.lg"> <v-col :cols="props.cols" :md="props.md" :lg="props.lg">
<v-card :prepend-icon="props.prependIcon" :title="props.title" :subtitle="props.subtitle" variant="outlined" elevation="1" <v-card :prepend-icon="props.prependIcon" :title="props.title" :subtitle="props.subtitle"
:to="props.to" :link="isLink" :href="props.href" :to="props.to" :link="isLink" :href="props.href"
append-icon="fa-solid fa-arrow-right"> append-icon="fa-solid fa-arrow-right">
</v-card> </v-card>
@@ -28,7 +28,7 @@ const props = defineProps({
const isLink = computed(() => { const isLink = computed(() => {
return props.href != '' && props.to == undefined return props.href != '' || props.to != undefined
}) })
</script> </script>

View File

@@ -1,6 +1,6 @@
<template> <template>
<v-col cols="12" md="6" lg="4"> <v-col cols="12" md="6" lg="4">
<v-card :prepend-icon="genericModel.model.icon" :title="$t(genericModel.model.localizationKey)" :subtitle="$t(genericModel.model.localizationKeyDescription)" variant="outlined" elevation="1" <v-card :prepend-icon="genericModel.model.icon" :title="$t(genericModel.model.localizationKey)" :subtitle="$t(genericModel.model.localizationKeyDescription)"
:to="{name: 'ModelListPage', params: {model: genericModel.model.name}}" :to="{name: 'ModelListPage', params: {model: genericModel.model.name}}"
append-icon="fa-solid fa-arrow-right"> append-icon="fa-solid fa-arrow-right">
</v-card> </v-card>

View File

@@ -48,13 +48,15 @@
</template> </template>
<template #clear="{ clear }" v-if="props.canClear"> <template #clear="{ clear }" v-if="props.canClear">
<span @click="clear" aria-hidden="true" tabindex="-1" role="button" data-clear="" aria-roledescription="" class="multiselect-clear"> <span @click="clear" aria-hidden="true" tabindex="-1" role="button" data-clear="" aria-roledescription="" class="multiselect-clear">
<span class="multiselect-clear-icon"></span> <span class="multiselect-clear-icon"></span>
</span> </span>
</template> </template>
<template v-if="hasMoreItems" #afterlist>
<span class="text-disabled font-italic text-caption ms-3">{{$t('ModelSelectResultsHelp')}}</span> <template v-if="hasMoreItems && !loading" #afterlist>
<span class="text-disabled font-italic text-caption ms-3">{{ $t('ModelSelectResultsHelp') }}</span>
</template> </template>
</Multiselect> </Multiselect>
<template #append v-if="$slots.append"> <template #append v-if="$slots.append">
@@ -146,7 +148,7 @@ function search(query: string) {
loading.value = true loading.value = true
return modelClass.value.list({query: query, page: 1, pageSize: props.limit}).then((r: any) => { return modelClass.value.list({query: query, page: 1, pageSize: props.limit}).then((r: any) => {
if (modelClass.value.model.isPaginated) { if (modelClass.value.model.isPaginated) {
if(r.next){ if (r.next) {
hasMoreItems.value = true hasMoreItems.value = true
} }
return r.results return r.results

View File

@@ -32,7 +32,7 @@
</v-row> </v-row>
<v-row> <v-row>
<v-col> <v-col>
<v-text-field prepend-inner-icon="$search" :label="$t('Search')" v-model="searchQuery"></v-text-field> <v-text-field prepend-inner-icon="$search" :label="$t('Search')" v-model="searchQuery" clearable></v-text-field>
<v-data-table-server <v-data-table-server
@update:options="loadItems" @update:options="loadItems"
:items="items" :items="items"
@@ -57,7 +57,7 @@
<v-list-item prepend-icon="fa-solid fa-arrows-to-dot" v-if="genericModel.model.isMerge" link> <v-list-item prepend-icon="fa-solid fa-arrows-to-dot" v-if="genericModel.model.isMerge" link>
{{ $t('Merge') }} {{ $t('Merge') }}
<model-merge-dialog :model="model" :source="item" <model-merge-dialog :model="model" :source="item"
@change="loadItems({page: tablePage, itemsPerPage: useUserPreferenceStore().deviceSettings.general_tableItemsPerPage})"></model-merge-dialog> @change="loadItems({page: tablePage, itemsPerPage: useUserPreferenceStore().deviceSettings.general_tableItemsPerPage, search: searchQuery})"></model-merge-dialog>
</v-list-item> </v-list-item>
<v-list-item prepend-icon="fa-solid fa-table-list" :to="{name: 'IngredientEditorPage', query: {food_id: item.id}}" <v-list-item prepend-icon="fa-solid fa-table-list" :to="{name: 'IngredientEditorPage', query: {food_id: item.id}}"
v-if="genericModel.model.name == 'Food'"> v-if="genericModel.model.name == 'Food'">