|
|
@ -1,4 +1,5 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
|
|
|
|
import { OrgUserRoles } from 'nocodb-sdk' |
|
|
|
import type { RequestParams } from 'nocodb-sdk' |
|
|
|
import type { RequestParams } from 'nocodb-sdk' |
|
|
|
import { |
|
|
|
import { |
|
|
|
extractSdkResponseErrorMsg, |
|
|
|
extractSdkResponseErrorMsg, |
|
|
@ -160,6 +161,10 @@ onBeforeMount(async () => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 }) |
|
|
|
watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isSuperAdmin = (user: { main_roles?: string }) => { |
|
|
|
|
|
|
|
return user.main_roles?.split(',').includes(OrgUserRoles.SUPER_ADMIN) |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -246,14 +251,20 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 }) |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div v-for="(user, index) of users" :key="index" class="flex flex-row items-center border-b-1 py-2 px-2 nc-user-row"> |
|
|
|
<div v-for="(user, index) of users" :key="index" |
|
|
|
|
|
|
|
class="flex flex-row items-center border-b-1 py-2 px-2 nc-user-row"> |
|
|
|
<div class="flex w-4/6 flex-wrap nc-user-email"> |
|
|
|
<div class="flex w-4/6 flex-wrap nc-user-email"> |
|
|
|
{{ user.email }} |
|
|
|
{{ user.email }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex w-1/6 justify-center flex-wrap ml-4"> |
|
|
|
<div class="flex w-1/6 justify-center flex-wrap ml-4"> |
|
|
|
|
|
|
|
<div v-if="isSuperAdmin(user)" class="rounded-full px-2 py-1 nc-user-role" |
|
|
|
|
|
|
|
:style="{ backgroundColor: projectRoleTagColors[OrgUserRoles.SUPER_ADMIN] }" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
Super Admin |
|
|
|
|
|
|
|
</div> |
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if="user.roles" |
|
|
|
v-else-if="user.roles" |
|
|
|
class="rounded-full px-2 py-1 nc-user-role" |
|
|
|
class="rounded-full px-2 py-1 nc-user-role" |
|
|
|
:style="{ backgroundColor: projectRoleTagColors[user.roles] }" |
|
|
|
:style="{ backgroundColor: projectRoleTagColors[user.roles] }" |
|
|
|
> |
|
|
|
> |
|
|
@ -261,6 +272,7 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 }) |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex w-1/6 flex-wrap justify-end"> |
|
|
|
<div class="flex w-1/6 flex-wrap justify-end"> |
|
|
|
|
|
|
|
<template v-if="!isSuperAdmin(user)"> |
|
|
|
<a-tooltip v-if="user.project_id" placement="bottom"> |
|
|
|
<a-tooltip v-if="user.project_id" placement="bottom"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
<span>{{ $t('activity.editUser') }}</span> |
|
|
|
<span>{{ $t('activity.editUser') }}</span> |
|
|
@ -299,7 +311,8 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 }) |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
</a-tooltip> |
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
<a-dropdown :trigger="['click']" class="flex" placement="bottomRight" overlay-class-name="nc-dropdown-user-mgmt"> |
|
|
|
<a-dropdown :trigger="['click']" class="flex" placement="bottomRight" |
|
|
|
|
|
|
|
overlay-class-name="nc-dropdown-user-mgmt"> |
|
|
|
<div class="flex flex-row items-center"> |
|
|
|
<div class="flex flex-row items-center"> |
|
|
|
<a-button type="text" class="!px-0"> |
|
|
|
<a-button type="text" class="!px-0"> |
|
|
|
<div class="flex flex-row items-center h-[1.2rem]"> |
|
|
|
<div class="flex flex-row items-center h-[1.2rem]"> |
|
|
@ -326,6 +339,7 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 }) |
|
|
|
</a-menu> |
|
|
|
</a-menu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</a-dropdown> |
|
|
|
</a-dropdown> |
|
|
|
|
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|