refactor(portal): extract shared partner types and data composables

Move partner domain types out of data/customers.ts into types/partner.ts so the fixture data exports can be removed later without breaking type imports. Add usePartnerTenants / usePartnerMrr composables wrapping the shared-key partner fetches.
This commit is contained in:
Ronni Baslund
2026-05-30 08:02:54 +02:00
parent 17ffd95a70
commit a51dc9a732
7 changed files with 163 additions and 20 deletions
+3 -17
View File
@@ -2,23 +2,9 @@
// orgs. Numbers seeded to match partner-screens.jsx (the canonical design
// source) line for line: same customer set, same MRR, seats, status, mark.
export type CustomerStatus = 'healthy' | 'attention' | 'past_due' | 'trial' | 'suspended'
export interface CustomerOrg {
id: string
name: string
domain: string
plan: 'starter' | 'business' | 'enterprise'
planLabel: 'Starter' | 'Business' | 'Enterprise'
seats: { used: number; total: number }
health: number
status: CustomerStatus
mrrDkk: number
brandColor: string
industry: string
createdOn: string
since: string
}
// Types moved to ~/types/partner so the fixture *data* below can be deleted
// page-by-page (as each goes real) without breaking type-only importers.
import type { CustomerOrg } from '~/types/partner'
export const partner = {
id: 'p-nordicmsp',