From 70531c3a9a21dbc23da5771e5079f231f2d09ebc Mon Sep 17 00:00:00 2001 From: HotelSync Date: Mon, 23 Mar 2026 16:26:51 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20RateOverrideApi=20type=20to=20camelCase?= =?UTF-8?q?=20=E2=80=94=20transformKeys=20was=20converting=20keys=20but=20?= =?UTF-8?q?type=20was=20snake=5Fcase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- src/lib/api.ts | 8 ++++---- src/pages/AvailabilityPage.tsx | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/api.ts b/src/lib/api.ts index a4c50cf..11f908c 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -743,12 +743,12 @@ export interface TariffPayload { } export interface RateOverrideApi { - category_id: string + categoryId: string date: string price: number - extra_person: number - min_nights: number - channel_prices: Record + extraPerson: number + minNights: number + channelPrices: Record closed: boolean } diff --git a/src/pages/AvailabilityPage.tsx b/src/pages/AvailabilityPage.tsx index 1e28ae6..af37c42 100644 --- a/src/pages/AvailabilityPage.tsx +++ b/src/pages/AvailabilityPage.tsx @@ -734,12 +734,12 @@ export function AvailabilityPage() { // Build initial grid then apply saved overrides on top const grid = buildPriceGrid(finalCats) for (const o of apiOverrides) { - if (!grid[o.category_id]) continue - grid[o.category_id][o.date] = { + if (!grid[o.categoryId]) continue + grid[o.categoryId][o.date] = { price: o.price, - extraPerson: o.extra_person, - minNights: o.min_nights, - channelPrices: o.channel_prices, + extraPerson: o.extraPerson, + minNights: o.minNights, + channelPrices: o.channelPrices, closed: o.closed, } }