Files
speckle-server/packages/frontend-2/components/settings/shared/DeleteUserDialog.vue
T
andrewwallacespeckle b7db51649d feat(fe2): Guest table should show what they have access to (#3047)
* Initial work

* Update role dialog

* useDebouncedTextInput

* Only show dialog if user has projects

* Update Cache on updating role

* Remove unused cache eviction

* Fix reactivity bug

* Handle pluralisation. Empty state when no projects left

* Hide owner from Permission Select
2024-09-23 15:20:38 +01:00

46 lines
981 B
Vue

<template>
<LayoutDialog v-model:open="open" max-width="xs" :buttons="dialogButtons">
<template #header>{{ title }}</template>
<div class="flex flex-col gap-4 text-body-xs text-foreground">
<p>
Are you sure you want to remove
<span class="font-medium">
{{ name }}
</span>
from the workspace?
</p>
</div>
</LayoutDialog>
</template>
<script setup lang="ts">
import type { LayoutDialogButton } from '@speckle/ui-components'
const emit = defineEmits<{
(e: 'removeUser'): void
}>()
defineProps<{
title: string
name: string
}>()
const open = defineModel<boolean>('open', { required: true })
const dialogButtons = computed((): LayoutDialogButton[] => [
{
text: 'Cancel',
props: { color: 'outline' },
onClick: () => (open.value = false)
},
{
text: 'Remove',
props: { color: 'primary' },
onClick: () => {
open.value = false
emit('removeUser')
}
}
])
</script>