feat(organisation): expand /organisation page to full dashboard

Replace the minimal placeholder with a dashboard: header + edit action,
drie stat-tegels (Leden / Evenementen / Personen — de eerste twee
clickable), organisatiegegevens + leden-top-5 infokaarten en een recente-
activiteit lijst. Nieuwe TypeScript-types en useOrganisationDashboardStats
composable sluiten aan op de nieuwe backend-endpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 10:27:51 +02:00
parent 80f0b535f5
commit 027c5dac4e
2 changed files with 500 additions and 50 deletions

View File

@@ -4,6 +4,7 @@ import { apiClient } from '@/lib/axios'
import { useAuthStore } from '@/stores/useAuthStore'
import type {
Organisation,
OrganisationDashboardStats,
UpdateOrganisationPayload,
} from '@/types/organisation'
@@ -70,6 +71,18 @@ export function useUpdateOrganisation() {
onSuccess: (_data, variables) => {
queryClient.invalidateQueries({ queryKey: ['organisations'] })
queryClient.invalidateQueries({ queryKey: ['organisations', variables.id] })
queryClient.invalidateQueries({ queryKey: ['organisation-dashboard-stats', variables.id] })
},
})
}
export function useOrganisationDashboardStats(id: Ref<string>) {
return useQuery({
queryKey: ['organisation-dashboard-stats', id],
queryFn: async () => {
const { data } = await apiClient.get<ApiResponse<OrganisationDashboardStats>>(`/organisations/${id.value}/dashboard-stats`)
return data.data
},
enabled: () => !!id.value,
})
}