1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 15:49:42 +02:00

feat: Group and household deletion tooltips (#4414)

This commit is contained in:
Kuchenpirat 2024-10-22 17:45:21 +02:00 committed by GitHub
parent 61511d17d3
commit bf2a69735d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 45 additions and 29 deletions

View file

@ -47,20 +47,27 @@
{{ item.users.length }}
</template>
<template #item.actions="{ item }">
<v-btn
:disabled="item && (item.households.length > 0 || item.users.length > 0)"
class="mr-1"
icon
color="error"
@click.stop="
confirmDialog = true;
deleteTarget = item.id;
"
>
<v-icon>
{{ $globals.icons.delete }}
</v-icon>
</v-btn>
<v-tooltip bottom :disabled="!(item && (item.households.length > 0 || item.users.length > 0))">
<template #activator="{ on, attrs }">
<div v-bind="attrs" v-on="on" >
<v-btn
:disabled="item && (item.households.length > 0 || item.users.length > 0)"
class="mr-1"
icon
color="error"
@click.stop="
confirmDialog = true;
deleteTarget = item.id;
"
>
<v-icon>
{{ $globals.icons.delete }}
</v-icon>
</v-btn>
</div>
</template>
<span>{{ $tc("admin.group-delete-note") }}</span>
</v-tooltip>
</template>
</v-data-table>
<v-divider></v-divider>