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:
@@ -1,7 +1,18 @@
|
||||
<script lang="ts" setup>
|
||||
import navItems from '@/navigation/vertical'
|
||||
import { orgNavItems, platformNavItems } from '@/navigation/vertical'
|
||||
import { useAuthStore } from '@/stores/useAuthStore'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
|
||||
const navItems = computed(() => {
|
||||
if (authStore.isSuperAdmin) {
|
||||
return [...orgNavItems, ...platformNavItems]
|
||||
}
|
||||
return orgNavItems
|
||||
})
|
||||
|
||||
// Components
|
||||
import ImpersonationBanner from '@/components/platform/ImpersonationBanner.vue'
|
||||
import Footer from '@/layouts/components/Footer.vue'
|
||||
import NavBarNotifications from '@/layouts/components/NavBarNotifications.vue'
|
||||
import NavSearchBar from '@/layouts/components/NavSearchBar.vue'
|
||||
@@ -48,6 +59,9 @@ import { VerticalNavLayout } from '@layouts'
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 👉 Impersonation Banner -->
|
||||
<ImpersonationBanner />
|
||||
|
||||
<!-- 👉 Pages -->
|
||||
<slot />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user