feat: platform admin frontend — pages, composables, navigation, impersonation

Build the frontend for platform admin in apps/app/:
- TypeScript types (admin.ts) and API composable (useAdmin.ts) with
  TanStack Query for all admin endpoints
- ImpersonationStore (Pinia) + ImpersonationBanner component integrated
  in the main layout, with token-based session management
- Platform navigation section (conditionally shown for super_admin users)
- Route guard blocking /platform/* for non-super_admin users
- 6 pages: dashboard with stats cards, organisations list/detail,
  users list/detail with impersonation, activity log with expandable rows
- All pages implement loading/error/empty states per conventions
- Vite build passes cleanly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-14 23:49:36 +02:00
parent 07ba791405
commit 9e7f28420c
15 changed files with 2262 additions and 2 deletions

View File

@@ -0,0 +1,49 @@
<script setup lang="ts">
import { useImpersonationStore } from '@/stores/useImpersonationStore'
const impersonationStore = useImpersonationStore()
const isStopping = ref(false)
async function handleStop() {
isStopping.value = true
await impersonationStore.stopImpersonation()
}
</script>
<template>
<VBanner
v-if="impersonationStore.isImpersonating"
color="warning"
sticky
class="impersonation-banner"
>
<template #prepend>
<VIcon icon="tabler-user-exclamation" />
</template>
<VBannerText>
Je bekijkt het platform als
<strong>{{ impersonationStore.impersonatedUser?.full_name }}</strong>
({{ impersonationStore.impersonatedUser?.email }})
</VBannerText>
<template #actions>
<VBtn
variant="tonal"
color="warning"
:loading="isStopping"
prepend-icon="tabler-arrow-back"
@click="handleStop"
>
Terug naar admin
</VBtn>
</template>
</VBanner>
</template>
<style scoped>
.impersonation-banner {
z-index: 1050;
}
</style>