mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:13:32 -04:00 
			
		
		
		
	fix: multiple regressions on data management page (#5758)
This commit is contained in:
		| @@ -3,12 +3,13 @@ | |||||||
|     v-model="selected" |     v-model="selected" | ||||||
|     item-key="id" |     item-key="id" | ||||||
|     show-select |     show-select | ||||||
|     :sort-by="[{ key: 'dateAdded', order: 'desc' }]" |     :sort-by="sortBy" | ||||||
|     :headers="headers" |     :headers="headers" | ||||||
|     :items="recipes" |     :items="recipes" | ||||||
|     :items-per-page="15" |     :items-per-page="15" | ||||||
|     class="elevation-0" |     class="elevation-0" | ||||||
|     :loading="loading" |     :loading="loading" | ||||||
|  |     return-object | ||||||
|   > |   > | ||||||
|     <template #[`item.name`]="{ item }"> |     <template #[`item.name`]="{ item }"> | ||||||
|       <a |       <a | ||||||
| @@ -117,7 +118,7 @@ export default defineNuxtComponent({ | |||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
|   emits: ["click"], |   emits: ["click", "update:modelValue"], | ||||||
|   setup(props, context) { |   setup(props, context) { | ||||||
|     const i18n = useI18n(); |     const i18n = useI18n(); | ||||||
|     const $auth = useMealieAuth(); |     const $auth = useMealieAuth(); | ||||||
| @@ -128,6 +129,9 @@ export default defineNuxtComponent({ | |||||||
|       set: value => context.emit(INPUT_EVENT, value), |       set: value => context.emit(INPUT_EVENT, value), | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|  |     // Initialize sort state with default sorting by dateAdded descending | ||||||
|  |     const sortBy = ref([{ key: "dateAdded", order: "desc" }]); | ||||||
|  |  | ||||||
|     const headers = computed(() => { |     const headers = computed(() => { | ||||||
|       const hdrs: Array<{ title: string; value: string; align?: string; sortable?: boolean }> = []; |       const hdrs: Array<{ title: string; value: string; align?: string; sortable?: boolean }> = []; | ||||||
|  |  | ||||||
| @@ -206,6 +210,7 @@ export default defineNuxtComponent({ | |||||||
|  |  | ||||||
|     return { |     return { | ||||||
|       selected, |       selected, | ||||||
|  |       sortBy, | ||||||
|       groupSlug, |       groupSlug, | ||||||
|       headers, |       headers, | ||||||
|       formatDate, |       formatDate, | ||||||
|   | |||||||
| @@ -126,7 +126,7 @@ | |||||||
|     <!-- Alias Sub-Dialog --> |     <!-- Alias Sub-Dialog --> | ||||||
|     <RecipeDataAliasManagerDialog |     <RecipeDataAliasManagerDialog | ||||||
|       v-if="editTarget" |       v-if="editTarget" | ||||||
|       :value="aliasManagerDialog" |       v-model="aliasManagerDialog" | ||||||
|       :data="editTarget" |       :data="editTarget" | ||||||
|       @submit="updateFoodAlias" |       @submit="updateFoodAlias" | ||||||
|       @cancel="aliasManagerDialog = false" |       @cancel="aliasManagerDialog = false" | ||||||
|   | |||||||
| @@ -44,6 +44,7 @@ | |||||||
|       :title="$t('general.confirm')" |       :title="$t('general.confirm')" | ||||||
|       :icon="$globals.icons.alertCircle" |       :icon="$globals.icons.alertCircle" | ||||||
|       color="error" |       color="error" | ||||||
|  |       can-confirm | ||||||
|       @confirm="deleteTag" |       @confirm="deleteTag" | ||||||
|     > |     > | ||||||
|       <v-card-text> |       <v-card-text> | ||||||
|   | |||||||
| @@ -52,6 +52,7 @@ | |||||||
|       :title="$t('general.confirm')" |       :title="$t('general.confirm')" | ||||||
|       :icon="$globals.icons.alertCircle" |       :icon="$globals.icons.alertCircle" | ||||||
|       color="error" |       color="error" | ||||||
|  |       can-confirm | ||||||
|       @confirm="deleteTool" |       @confirm="deleteTool" | ||||||
|     > |     > | ||||||
|       <v-card-text> |       <v-card-text> | ||||||
|   | |||||||
| @@ -19,30 +19,16 @@ | |||||||
|           v-model="fromUnit" |           v-model="fromUnit" | ||||||
|           return-object |           return-object | ||||||
|           :items="store" |           :items="store" | ||||||
|           item-title="id" |           item-title="name" | ||||||
|           :label="$t('data-pages.units.source-unit')" |           :label="$t('data-pages.units.source-unit')" | ||||||
|         > |         /> | ||||||
|           <template #chip="{ item }"> |  | ||||||
|             {{ item.raw.name }} |  | ||||||
|           </template> |  | ||||||
|           <template #item="{ item }"> |  | ||||||
|             {{ item.raw.name }} |  | ||||||
|           </template> |  | ||||||
|         </v-autocomplete> |  | ||||||
|         <v-autocomplete |         <v-autocomplete | ||||||
|           v-model="toUnit" |           v-model="toUnit" | ||||||
|           return-object |           return-object | ||||||
|           :items="store" |           :items="store" | ||||||
|           item-title="id" |           item-title="name" | ||||||
|           :label="$t('data-pages.units.target-unit')" |           :label="$t('data-pages.units.target-unit')" | ||||||
|         > |         /> | ||||||
|           <template #chip="{ item }"> |  | ||||||
|             {{ item.raw.name }} |  | ||||||
|           </template> |  | ||||||
|           <template #item="{ item }"> |  | ||||||
|             {{ item.raw.name }} |  | ||||||
|           </template> |  | ||||||
|         </v-autocomplete> |  | ||||||
|  |  | ||||||
|         <template v-if="canMerge && fromUnit && toUnit"> |         <template v-if="canMerge && fromUnit && toUnit"> | ||||||
|           <div class="text-center"> |           <div class="text-center"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user