mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 14:21:46 +00:00
Derive client domain types from the shared schema contracts
Add entity/response Zod schemas to @trek/shared (place, trip, assignment, day, budget, packing, reservation), each matched against the producing server service, and re-export them from client types.ts instead of the hand-written duplicates that had drifted (name/title, amount/total_price, owner_id/user_id, cover_url/cover_image, ...). Updates the call sites and test fixtures the corrected types surfaced; type-only, no runtime behaviour change.
This commit is contained in:
@@ -35,7 +35,7 @@ interface VacayYearsResponse {
|
||||
|
||||
interface VacayEntriesResponse {
|
||||
entries: VacayEntry[]
|
||||
companyHolidays: string[]
|
||||
companyHolidays: { date: string; note?: string }[]
|
||||
}
|
||||
|
||||
interface VacayStatsResponse {
|
||||
@@ -109,7 +109,7 @@ interface VacayState {
|
||||
isFused: boolean
|
||||
years: number[]
|
||||
entries: VacayEntry[]
|
||||
companyHolidays: string[]
|
||||
companyHolidays: { date: string; note?: string }[]
|
||||
stats: VacayStat[]
|
||||
selectedYear: number
|
||||
selectedUserId: number | null
|
||||
|
||||
Reference in New Issue
Block a user