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