1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 23:59:45 +02:00

feat: Add Households to Mealie (#3970)

This commit is contained in:
Michael Genson 2024-08-22 10:14:32 -05:00 committed by GitHub
parent 0c29cef17d
commit eb170cc7e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
315 changed files with 6975 additions and 3577 deletions

View file

@ -1,15 +1,14 @@
// TODO: Edit Group
<template>
<v-container fluid>
<BaseDialog
v-model="createDialog"
:title="$t('group.create-group')"
:icon="$globals.icons.group"
@submit="createGroup(createUserForm.data)"
@submit="createGroup(createGroupForm.data)"
>
<template #activator> </template>
<v-card-text>
<AutoForm v-model="createUserForm.data" :update-mode="updateMode" :items="createUserForm.items" />
<AutoForm v-model="createGroupForm.data" :update-mode="updateMode" :items="createGroupForm.items" />
</v-card-text>
</BaseDialog>
@ -27,7 +26,7 @@
<BaseCardSectionTitle :title="$tc('group.group-management')"> </BaseCardSectionTitle>
<section>
<v-toolbar flat color="background" class="justify-between">
<v-toolbar flat color="transparent" class="justify-between">
<BaseButton @click="openDialog"> {{ $t("general.create") }} </BaseButton>
</v-toolbar>
@ -41,15 +40,15 @@
:search="search"
@click:row="handleRowClick"
>
<template #item.households="{ item }">
{{ item.households.length }}
</template>
<template #item.users="{ item }">
{{ item.users.length }}
</template>
<template #item.webhookEnable="{ item }">
{{ item.webhooks.length > 0 ? $t("general.yes") : $t("general.no") }}
</template>
<template #item.actions="{ item }">
<v-btn
:disabled="item && item.users.length > 0"
:disabled="item && (item.households.length > 0 || item.users.length > 0)"
class="mr-1"
icon
color="error"
@ -94,12 +93,12 @@ export default defineComponent({
value: "id",
},
{ text: i18n.t("general.name"), value: "name" },
{ text: i18n.t("group.total-households"), value: "households" },
{ text: i18n.t("user.total-users"), value: "users" },
{ text: i18n.t("user.webhooks-enabled"), value: "webhookEnable" },
{ text: i18n.t("general.delete"), value: "actions" },
],
updateMode: false,
createUserForm: {
createGroupForm: {
items: [
{
label: i18n.t("group.group-name"),
@ -116,7 +115,7 @@ export default defineComponent({
function openDialog() {
state.createDialog = true;
state.createUserForm.data.name = "";
state.createGroupForm.data.name = "";
}
const router = useRouter();