mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 16:24:31 -04:00
feat: bulk deletion on "Manage Data" page (#3056)
* labels bulk delete * add foods * bulk delete units * add categories * add tags * add tools * update translations * fix types for text * fix reactivity for stores --------- Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { useStoreActions } from "../partials/use-actions-factory";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { IngredientUnit } from "~/lib/api/types/recipe";
|
||||
|
||||
let unitStore: Ref<IngredientUnit[] | null> | null = null;
|
||||
let unitStore: Ref<IngredientUnit[] | null> = ref([]);
|
||||
|
||||
/**
|
||||
* useUnitData returns a template reactive object
|
||||
@@ -40,11 +40,11 @@ export const useUnitStore = function () {
|
||||
const actions = {
|
||||
...useStoreActions<IngredientUnit>(api.units, unitStore, loading),
|
||||
flushStore() {
|
||||
unitStore = null;
|
||||
unitStore.value = [];
|
||||
},
|
||||
};
|
||||
|
||||
if (!unitStore) {
|
||||
if (!unitStore.value) {
|
||||
unitStore = actions.getAll();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user