mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-02 20:15:24 +02:00
feat: Add Households to Mealie (#3970)
This commit is contained in:
parent
0c29cef17d
commit
eb170cc7e5
315 changed files with 6975 additions and 3577 deletions
|
@ -24,17 +24,18 @@ export default defineComponent({
|
|||
|
||||
const groupName = ref<string>("");
|
||||
const queryFilter = ref<string>("");
|
||||
async function fetchGroup() {
|
||||
const { data } = await api.groups.getCurrentUserGroup();
|
||||
async function fetchHousehold() {
|
||||
const { data } = await api.households.getCurrentUserHousehold();
|
||||
if (data) {
|
||||
queryFilter.value = `recipe.group_id="${data.id}"`;
|
||||
groupName.value = data.name;
|
||||
// TODO: once users are able to fetch other households' recipes, remove the household filter
|
||||
queryFilter.value = `recipe.group_id="${data.groupId}" AND recipe.household_id="${data.id}"`;
|
||||
groupName.value = data.group;
|
||||
}
|
||||
|
||||
ready.value = true;
|
||||
}
|
||||
|
||||
fetchGroup();
|
||||
fetchHousehold();
|
||||
return {
|
||||
groupName,
|
||||
queryFilter,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue