feat: users row actions "Cancel invite" on Pending rows and "Renew invite" on Expired rows
This commit is contained in:
1 parent
1ece778caf
commit
142325730d
14 files changed
+1156
-35
No files matched your search
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import InviteStatusBadge from '@/components/InviteStatusBadge.vue'
|
||||
import RoleBadge from '@/components/RoleBadge.vue'
|
||||
import UserRowAction from '@/components/UserRowAction.vue'
|
||||
import UserEmailCell from '@/components/UserEmailCell.vue'
|
||||
import { formatCreatedDate } from '@/lib/relativeDate'
|
||||
import {
|
||||
@@ -19,6 +20,13 @@ defineProps<{
|
||||
loading: boolean
|
||||
sessionUserId?: number
|
||||
highlightedKey?: string
|
||||
canManage?: boolean
|
||||
busyKeys?: string[]
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
cancel: [item: UserListItem]
|
||||
renew: [item: UserListItem]
|
||||
}>()
|
||||
|
||||
function rowKey(item: UserListItem) {
|
||||
@@ -74,7 +82,15 @@ function rowKey(item: UserListItem) {
|
||||
<span><RoleBadge :role="userRole(item)" /></span>
|
||||
<span><InviteStatusBadge :status="item.status" /></span>
|
||||
<span class="text-muted">{{ formatCreatedDate(item.created_at) }}</span>
|
||||
<span></span>
|
||||
<span class="flex justify-end">
|
||||
<UserRowAction
|
||||
v-if="canManage"
|
||||
:item="item"
|
||||
:busy="busyKeys?.includes(rowKey(item))"
|
||||
@cancel="emit('cancel', item)"
|
||||
@renew="emit('renew', item)"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user