From 66e4167c03e7d7dd65f2dd87659554e2c40b1734 Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Wed, 15 Apr 2026 01:22:01 +0200 Subject: [PATCH] refactor: identical VDataTable for members on both organisation pages Both org pages now use the same VDataTable with: - Search field (name/email filter) - Sortable columns (Naam, E-mail, Rol) with default sort on name - Pagination (10 per page) - Avatar with initials, role chips with color mapping - Consistent empty state with icon Platform page: replaced VTable with VDataTable, added role chips (replacing inline AppSelect), role editing via menu on edit button. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/app/src/pages/organisation/index.vue | 80 ++++-- .../src/pages/platform/organisations/[id].vue | 247 ++++++++++++------ 2 files changed, 215 insertions(+), 112 deletions(-) diff --git a/apps/app/src/pages/organisation/index.vue b/apps/app/src/pages/organisation/index.vue index 2c68f974..27d7485b 100644 --- a/apps/app/src/pages/organisation/index.vue +++ b/apps/app/src/pages/organisation/index.vue @@ -95,18 +95,22 @@ const roleLabelMap: Record = { volunteer_coordinator: 'Vrijwilliger Coördinator', } +const memberSearch = ref('') + const memberHeaders = computed(() => { - const headers: Array<{ title: string; key: string; sortable?: boolean }> = [ - { title: 'Naam', key: 'full_name' }, - { title: 'E-mailadres', key: 'email' }, - { title: 'Rol', key: 'role' }, + const headers: Array<{ title: string; key: string; sortable?: boolean; align?: 'start' | 'end' }> = [ + { title: 'Naam', key: 'full_name', sortable: true }, + { title: 'E-mailadres', key: 'email', sortable: true }, + { title: 'Rol', key: 'role', sortable: true }, ] if (isOrgAdmin.value) { - headers.push({ title: 'Acties', key: 'actions', sortable: false }) + headers.push({ title: 'Acties', key: 'actions', sortable: false, align: 'end' }) } return headers }) +const memberSortBy = [{ key: 'full_name', order: 'asc' as const }] + function getInitials(name: string): string { return name .split(' ') @@ -328,32 +332,43 @@ function confirmRevokeInvitation() {