|
|
|
@ -153,9 +153,9 @@ const openDeleteModal = (user: UserType) => {
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<div data-testid="nc-super-user-list"> |
|
|
|
|
<div class="max-w-195 mx-auto"> |
|
|
|
|
<div class="text-2xl my-4 text-left font-weight-bold">{{ $t('title.userManagement') }}</div> |
|
|
|
|
<div data-testid="nc-super-user-list" class="h-full"> |
|
|
|
|
<div class="max-w-195 mx-auto h-full"> |
|
|
|
|
<div class="text-2xl text-left font-weight-bold mb-4">{{ $t('title.userManagement') }}</div> |
|
|
|
|
<div class="py-2 flex gap-4 items-center justify-between"> |
|
|
|
|
<a-input v-model:value="searchText" class="!max-w-90 !rounded-md" placeholder="Search members" @change="loadUsers()"> |
|
|
|
|
<template #prefix> |
|
|
|
@ -172,35 +172,39 @@ const openDeleteModal = (user: UserType) => {
|
|
|
|
|
</NcButton> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="w-full mt-5 border-1 rounded-md h-[613px] max-w-250"> |
|
|
|
|
<div class="flex w-full bg-gray-50 border-b-1"> |
|
|
|
|
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-1/3 text-start pl-10">{{ $t('labels.email') }}</span> |
|
|
|
|
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-1/3 text-start pl-20">{{ $t('objects.role') }}</span> |
|
|
|
|
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-1/3 text-end pl-42">{{ $t('labels.action') }}</span> |
|
|
|
|
<div class="w-full rounded-md max-w-250 h-[calc(100%-12rem)] rounded-md overflow-hidden mt-5"> |
|
|
|
|
<div class="flex w-full bg-gray-50 border-1 rounded-t-md"> |
|
|
|
|
<div class="py-3.5 text-gray-500 font-medium text-3.5 w-2/3 text-start pl-6">{{ $t('labels.email') }}</div> |
|
|
|
|
<div class="py-3.5 text-gray-500 font-medium text-3.5 w-1/3 text-start">{{ $t('objects.role') }}</div> |
|
|
|
|
<div class="flex py-3.5 text-gray-500 font-medium text-3.5 w-28 justify-end mr-4"> |
|
|
|
|
{{ $t('labels.action') }} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="isLoading" class="flex items-center justify-center text-center h-[513px]"> |
|
|
|
|
<GeneralLoader size="xlarge" /> |
|
|
|
|
</div> |
|
|
|
|
<!-- if users are empty --> |
|
|
|
|
<div v-else-if="!users.length" class="flex items-center justify-center text-center h-128.25"> |
|
|
|
|
<div v-else-if="!users.length" class="flex items-center justify-center text-center h-full"> |
|
|
|
|
<a-empty :image="Empty.PRESENTED_IMAGE_SIMPLE" :description="$t('labels.noData')" /> |
|
|
|
|
</div> |
|
|
|
|
<section v-else class="tbody"> |
|
|
|
|
<section v-else class="tbody h-[calc(100%-4rem)] nc-scrollbar-md border-t-0 !overflow-auto"> |
|
|
|
|
<div |
|
|
|
|
v-for="el of users" |
|
|
|
|
:key="el.id" |
|
|
|
|
data-testid="nc-token-list" |
|
|
|
|
class="flex py-3 justify-around px-5 border-b-1" |
|
|
|
|
class="user flex py-3 justify-around px-1 border-b-1 border-l-1 border-r-1" |
|
|
|
|
:class="{ |
|
|
|
|
'py-4': el.roles?.includes('super'), |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<span class="text-3.5 text-start w-1/3 pl-5"> |
|
|
|
|
{{ el.email }} |
|
|
|
|
</span> |
|
|
|
|
<span class="text-3.5 text-start w-1/3 pl-18"> |
|
|
|
|
<div class="text-3.5 text-start w-2/3 pl-5 flex items-center"> |
|
|
|
|
<GeneralTruncateText length="29"> |
|
|
|
|
{{ el.email }} |
|
|
|
|
</GeneralTruncateText> |
|
|
|
|
</div> |
|
|
|
|
<div class="text-3.5 text-start w-1/3"> |
|
|
|
|
<div v-if="el?.roles?.includes('super')" class="font-weight-bold">{{ $t('labels.superAdmin') }}</div> |
|
|
|
|
<a-select |
|
|
|
|
<NcSelect |
|
|
|
|
v-else |
|
|
|
|
v-model:value="el.roles" |
|
|
|
|
class="w-55 nc-user-roles" |
|
|
|
@ -228,9 +232,9 @@ const openDeleteModal = (user: UserType) => {
|
|
|
|
|
{{ $t('msg.info.roles.orgViewer') }} |
|
|
|
|
</span> |
|
|
|
|
</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
|
</span> |
|
|
|
|
<span class="w-1/3 pl-43"> |
|
|
|
|
</NcSelect> |
|
|
|
|
</div> |
|
|
|
|
<span class="w-26 flex items-center justify-end mr-4"> |
|
|
|
|
<div |
|
|
|
|
class="flex items-center gap-2" |
|
|
|
|
:class="{ |
|
|
|
@ -238,23 +242,26 @@ const openDeleteModal = (user: UserType) => {
|
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<NcDropdown :trigger="['click']"> |
|
|
|
|
<MdiDotsVertical |
|
|
|
|
class="border-1 !text-gray-600 h-5.5 w-5.5 rounded outline-0 p-0.5 nc-workspace-menu transform transition-transform !text-gray-400 cursor-pointer hover:(!text-gray-500 bg-gray-100)" |
|
|
|
|
/> |
|
|
|
|
<NcButton size="xsmall" type="ghost"> |
|
|
|
|
<MdiDotsVertical |
|
|
|
|
class="text-gray-600 h-5.5 w-5.5 rounded outline-0 p-0.5 nc-workspace-menu transform transition-transform !text-gray-400 cursor-pointer hover:(!text-gray-500 bg-gray-100)" |
|
|
|
|
/> |
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
|
|
<template #overlay> |
|
|
|
|
<NcMenu> |
|
|
|
|
<template v-if="!el.roles?.includes('super')"> |
|
|
|
|
<!-- Resend invite Email --> |
|
|
|
|
<NcMenuItem @click="resendInvite(el)"> |
|
|
|
|
<component :is="iconMap.email" class="flex text-gray-500" /> |
|
|
|
|
<component :is="iconMap.email" class="flex text-gray-600" /> |
|
|
|
|
<div>{{ $t('activity.resendInvite') }}</div> |
|
|
|
|
</NcMenuItem> |
|
|
|
|
<NcMenuItem @click="copyInviteUrl(el)"> |
|
|
|
|
<component :is="iconMap.copy" class="flex text-gray-500" /> |
|
|
|
|
<component :is="iconMap.copy" class="flex text-gray-600" /> |
|
|
|
|
<div>{{ $t('activity.copyInviteURL') }}</div> |
|
|
|
|
</NcMenuItem> |
|
|
|
|
<NcMenuItem @click="copyPasswordResetUrl(el)"> |
|
|
|
|
<component :is="iconMap.copy" class="flex text-gray-500" /> |
|
|
|
|
<component :is="iconMap.copy" class="flex text-gray-600" /> |
|
|
|
|
<div>{{ $t('activity.copyPasswordResetURL') }}</div> |
|
|
|
|
</NcMenuItem> |
|
|
|
|
</template> |
|
|
|
@ -271,7 +278,7 @@ const openDeleteModal = (user: UserType) => {
|
|
|
|
|
</div> |
|
|
|
|
</section> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="pagination.total > 10" class="flex items-center justify-center mt-7"> |
|
|
|
|
<div v-if="pagination.total > 10" class="flex items-center justify-center mt-4"> |
|
|
|
|
<a-pagination |
|
|
|
|
v-model:current="currentPage" |
|
|
|
|
:total="pagination.total" |
|
|
|
@ -285,7 +292,7 @@ const openDeleteModal = (user: UserType) => {
|
|
|
|
|
<div class="flex flex-row items-center py-2.25 px-2.5 bg-gray-50 rounded-lg text-gray-700 mb-4"> |
|
|
|
|
<GeneralIcon icon="account" class="nc-view-icon"></GeneralIcon> |
|
|
|
|
<div |
|
|
|
|
class="capitalize text-ellipsis overflow-hidden select-none w-full pl-1.75" |
|
|
|
|
class="text-ellipsis overflow-hidden select-none w-full pl-1.75" |
|
|
|
|
:style="{ wordBreak: 'keep-all', whiteSpace: 'nowrap', display: 'inline' }" |
|
|
|
|
> |
|
|
|
|
{{ deleteModalInfo?.email }} |
|
|
|
@ -301,7 +308,7 @@ const openDeleteModal = (user: UserType) => {
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
.tbody div:nth-child(10) { |
|
|
|
|
border-bottom: none; |
|
|
|
|
.user:last-child { |
|
|
|
|
@apply rounded-b-md; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|