Skip to content

Commit

Permalink
feat: update user remove check-table Modal with userGroup field
Browse files Browse the repository at this point in the history
Signed-off-by: 이승연 <sylee1274@mz.co.kr>
  • Loading branch information
seungyeoneeee committed Jan 8, 2025
1 parent b5a61ed commit b257366
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions apps/web/src/services/iam/components/UserManagementStatusModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const state = reactive({
{ name: 'name', label: 'Name' },
{ name: 'state', label: 'State' },
{ name: 'service', label: 'Service' },
{ name: 'user_group', label: 'User Group' },
];
return userPageState.isAdminMode ? [
...baseField,
Expand Down Expand Up @@ -163,7 +164,7 @@ const disableUser = async (userId?: string): Promise<boolean> => {
/* Watcher */
watch([() => storeState.serviceList, () => storeState.selectedUsers], ([nv_service_list, nv_selected_users]) => {
if (nv_service_list) {
const list: UserListItemType[] | (UserListItemType & { service: string })[] = [];
const list: UserListItemType[] | (UserListItemType & { service: string; })[] = [];
Object.values(nv_service_list).forEach((service) => {
if (service && service.data && service.data.members) {
nv_selected_users.forEach((selectedUser) => {
Expand Down Expand Up @@ -218,21 +219,44 @@ watch([() => storeState.serviceList, () => storeState.selectedUsers], ([nv_servi
</template>
<template #col-service-format="{value}">
<div v-if="value.length > 0">
<span v-for="(v, i) in value"
<span v-for="(service, i) in value"
:key="i"
class="mr-2"
>
<p-badge v-if="i < 3"
badge-type="gray200"
shape="square"
>
{{ v }}
{{ service }}
</p-badge>
<p-badge v-else-if="i >= 3"
badge-type="blue700"
badge-type="blue300"
shape="round"
>
{{ value.length - i }}

+ {{ value.length - i }}
</p-badge>
</span>
</div>
<div v-else />
</template>
<template #col-user_group-format="{value}">
<div v-if="value.length > 0">
<span v-for="(userGroup, i) in value"
:key="i"
class="mr-2"
>
<p-badge v-if="i < 3"
badge-type="gray200"
shape="square"
>
{{ userGroup.name }}
</p-badge>
<p-badge v-else-if="i >= 3"
badge-type="blue300"
shape="round"
>
+ {{ value.length - i }}
</p-badge>
</span>
</div>
Expand Down

0 comments on commit b257366

Please sign in to comment.