fix: RateOverrideApi type to camelCase — transformKeys was converting keys but type was snake_case
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -743,12 +743,12 @@ export interface TariffPayload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface RateOverrideApi {
|
export interface RateOverrideApi {
|
||||||
category_id: string
|
categoryId: string
|
||||||
date: string
|
date: string
|
||||||
price: number
|
price: number
|
||||||
extra_person: number
|
extraPerson: number
|
||||||
min_nights: number
|
minNights: number
|
||||||
channel_prices: Record<string, number>
|
channelPrices: Record<string, number>
|
||||||
closed: boolean
|
closed: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -734,12 +734,12 @@ export function AvailabilityPage() {
|
|||||||
// Build initial grid then apply saved overrides on top
|
// Build initial grid then apply saved overrides on top
|
||||||
const grid = buildPriceGrid(finalCats)
|
const grid = buildPriceGrid(finalCats)
|
||||||
for (const o of apiOverrides) {
|
for (const o of apiOverrides) {
|
||||||
if (!grid[o.category_id]) continue
|
if (!grid[o.categoryId]) continue
|
||||||
grid[o.category_id][o.date] = {
|
grid[o.categoryId][o.date] = {
|
||||||
price: o.price,
|
price: o.price,
|
||||||
extraPerson: o.extra_person,
|
extraPerson: o.extraPerson,
|
||||||
minNights: o.min_nights,
|
minNights: o.minNights,
|
||||||
channelPrices: o.channel_prices,
|
channelPrices: o.channelPrices,
|
||||||
closed: o.closed,
|
closed: o.closed,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user