Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wallet): add user groups to users page #454

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions apps/wallet/src/pages/UsersPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@
<!-- This removes the bottom pagination since we want to display all the results -->
</template>
<template #item.name="{ item: user }">
<div class="d-flex align-center">
{{ user.name }}
</div>
{{ user.name }}
</template>
<template #item.user_groups="{ item: user }">
{{ user.groups.map(ug => ug.name).join(', ') }}
</template>
<template #item.status="{ item: user }">
<UserStatusChip :status="fromUserStatusVariantToEnum(user.status)" />
Expand Down Expand Up @@ -95,6 +96,7 @@
import { mdiEye, mdiPencil } from '@mdi/js';
import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useDisplay } from 'vuetify';
import { VChip, VDataTable } from 'vuetify/components';
import AuthCheck from '~/components/AuthCheck.vue';
import DataLoader from '~/components/DataLoader.vue';
Expand Down Expand Up @@ -126,10 +128,13 @@ const disableRefresh = ref(false);
const pagination = usePagination();
const triggerSearch = throttle(() => (forceReload.value = true), 500);
const headerProps: { class: string } = { class: 'font-weight-bold' };
const headers = ref<TableHeader[]>([

const { xs } = useDisplay();
const headers = computed((): TableHeader[] => [
{ title: i18n.t('terms.name'), key: 'name', headerProps },
{ title: i18n.t('terms.status'), key: 'status', headerProps },
{ title: i18n.t('terms.identity'), key: 'principals', headerProps },
{ title: i18n.t('terms.user_groups'), key: 'user_groups', headerProps },
...(xs.value ? [] : [{ title: i18n.t('terms.identity'), key: 'principals', headerProps }]),
{ title: '', key: 'actions', headerProps },
]);

Expand Down
Loading