diff --git a/apps/app/src/navigation/vertical/index.ts b/apps/app/src/navigation/vertical/index.ts index e6bf5a2e..7f067dfc 100644 --- a/apps/app/src/navigation/vertical/index.ts +++ b/apps/app/src/navigation/vertical/index.ts @@ -17,6 +17,11 @@ export const orgNavItems = [ to: { name: 'organisation' }, icon: { icon: 'tabler-building' }, }, + { + title: 'Leden', + to: { name: 'organisation-members' }, + icon: { icon: 'tabler-users' }, + }, { title: 'Bedrijven', to: { name: 'organisation-companies' }, diff --git a/apps/app/src/pages/organisation/index.vue b/apps/app/src/pages/organisation/index.vue index 27d7485b..7f6df3d7 100644 --- a/apps/app/src/pages/organisation/index.vue +++ b/apps/app/src/pages/organisation/index.vue @@ -1,21 +1,10 @@ diff --git a/apps/app/src/pages/organisation/members.vue b/apps/app/src/pages/organisation/members.vue index 7e27f95b..fde6f96c 100644 --- a/apps/app/src/pages/organisation/members.vue +++ b/apps/app/src/pages/organisation/members.vue @@ -67,18 +67,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(' ') @@ -90,11 +94,10 @@ function getInitials(name: string): string { } function formatDate(iso: string): string { - return new Date(iso).toLocaleDateString('nl-NL', { - day: '2-digit', - month: '2-digit', - year: 'numeric', - }) + const d = new Date(iso) + const date = d.toLocaleDateString('nl-NL', { day: 'numeric', month: 'long', year: 'numeric' }) + const time = d.toLocaleTimeString('nl-NL', { hour: '2-digit', minute: '2-digit' }) + return `${date} om ${time} uur` } function openEditRole(member: Member) { @@ -196,37 +199,52 @@ function confirmRevokeInvitation() {