mandant-crm/frontend/types/index.ts
Tim Stollberg e5e0be57da feat(frontend): scaffold Nuxt 3 CSR SPA with full auth + client/history UI
- Nuxt 3 CSR (ssr:false), @nuxtjs/tailwindcss, dev proxy to backend
- useAuth composable: CSRF cookie, XSRF token, login/logout/fetchUser
- auth middleware: redirects to /login if no session
- Login page, client list with search + create modal
- Client detail with editable name, dynamic notes (JSON), history feed
- History form with type select, inline edit/delete per entry
- Print layout at /clients/:id/print (calls window.print on mount)
- TypeScript interfaces: User, Client, HistoryEntry, PaginatedResponse
- German UI labels throughout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 17:33:39 +07:00

38 lines
735 B
TypeScript

export interface User {
id: number
name: string
email: string
role: 'admin' | 'staff'
}
export interface Client {
id: number
client_number: string
name: string
notes: Record<string, string>
created_at: string
updated_at: string
}
export interface HistoryEntry {
id: number
client_id: number
type: 'phone_call' | 'consultation' | 'recommendation' | 'instruction' | 'remark' | 'other'
body: string
author_id: number
author_name: string | null
updated_by: number | null
updated_by_name: string | null
created_at: string
updated_at: string
}
export interface PaginatedResponse<T> {
data: T[]
meta: {
current_page: number
last_page: number
total: number
per_page: number
}
}