mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
refresh all cookbooks, just in case
This commit is contained in:
parent
5eea5ee6ba
commit
8e7d76651a
1 changed files with 8 additions and 5 deletions
|
@ -138,7 +138,14 @@ export default defineNuxtComponent({
|
|||
const groupSlug = computed(() => route.params.groupSlug as string || $auth.user.value?.groupSlug || "");
|
||||
|
||||
const cookbookPreferences = useCookbookPreferences();
|
||||
const { store: cookbooks } = isOwnGroup.value ? useCookbookStore() : usePublicCookbookStore(groupSlug.value || "");
|
||||
const { store: cookbooks, actions: cookbooksActions } = isOwnGroup.value ? useCookbookStore() : usePublicCookbookStore(groupSlug.value || "");
|
||||
onMounted(() => {
|
||||
if (!cookbooks.value.length) {
|
||||
cookbooksActions.refresh();
|
||||
console.log("test");
|
||||
}
|
||||
});
|
||||
|
||||
const { store: households } = isOwnGroup.value ? useHouseholdStore() : usePublicHouseholdStore(groupSlug.value || "");
|
||||
|
||||
const householdsById = computed(() => {
|
||||
|
@ -172,10 +179,6 @@ export default defineNuxtComponent({
|
|||
|
||||
const currentUserHouseholdId = computed(() => $auth.user.value?.householdId);
|
||||
const cookbookLinks = computed<SideBarLink[]>(() => {
|
||||
if (!cookbooks.value || !households.value) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const sortedCookbooks = [...cookbooks.value].sort((a, b) => (a.position || 0) - (b.position || 0));
|
||||
|
||||
const ownLinks: SideBarLink[] = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue