Admin users add disabled badge when user is disabled

This commit is contained in:
William Buezas 2024-09-16 09:43:44 -03:00
parent 2a43ab023a
commit 85eee7bb7a
2 changed files with 8 additions and 5 deletions

View File

@ -24,14 +24,14 @@ const handleClick = () => {
> >
<div <div
class="no-padding content-container" class="no-padding content-container"
:class="$slots.actions ? 'col-10' : 'col-12'" :class="{ 'full-width': !$slots.actions }"
> >
<slot name="prepend" /> <slot name="prepend" />
<div class="content"> <div class="content">
<slot name="content" /> <slot name="content" />
</div> </div>
</div> </div>
<div class="no-padding flex full-width justify-center"> <div class="no-padding flex column justify-center">
<slot name="actions" /> <slot name="actions" />
</div> </div>
</QItem> </QItem>

View File

@ -74,14 +74,17 @@ const supplantUser = async user => {
</template> </template>
<template #actions> <template #actions>
<QBtn <QBtn
v-if="user.active"
icon="people" icon="people"
flat flat
rounded rounded
@click="supplantUser(user.name)" @click="supplantUser(user.name)"
><QTooltip>
{{ t('Impersonate user') }}
</QTooltip></QBtn
> >
<QTooltip>
{{ t('Impersonate user') }}
</QTooltip>
</QBtn>
<QBadge v-else color="negative">{{ t('Disabled') }}</QBadge>
</template> </template>
</CardList> </CardList>
</QList> </QList>