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:
parent
61511d17d3
commit
bf2a69735d
3 changed files with 45 additions and 29 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue