Merged in feat/LOY-430-reward-nights (pull request #3295)
Feat/LOY-430 reward nights * chore(LOY-430): add reward nights request and dynamic content * chore(LOY-430): fix Reward Night component * Refactor: use existing endpoint and add rewardNight data to that response instead Approved-by: Linus Flood
This commit is contained in:
@@ -24,7 +24,7 @@ export const tableSchema = z.object({
|
||||
),
|
||||
data: z.array(z.object({}).catchall(z.string())),
|
||||
skipReset: z.boolean(),
|
||||
tableActionEnabled: z.boolean(),
|
||||
tableActionEnabled: z.boolean().optional().default(false),
|
||||
headerRowAdded: z.boolean().optional().default(false),
|
||||
}),
|
||||
}),
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
import { addressSchema } from "./schemas/hotel/address"
|
||||
import { detailedFacilitiesSchema } from "./schemas/hotel/detailedFacility"
|
||||
import { locationSchema } from "./schemas/hotel/location"
|
||||
import { rewardNightSchema } from "./schemas/hotel/rewardNight"
|
||||
import { imageSchema } from "./schemas/image"
|
||||
import { relationshipsSchema } from "./schemas/relationships"
|
||||
import { roomConfigurationSchema } from "./schemas/roomAvailability/configuration"
|
||||
@@ -600,6 +601,7 @@ export const hotelListingHotelDataSchema = z.object({
|
||||
hotelType: z.string(),
|
||||
type: z.literal("hotels"), // No enum here but the standard return appears to be "hotels".
|
||||
description: z.string().nullable(),
|
||||
rewardNight: rewardNightSchema,
|
||||
}),
|
||||
url: z.string().nullable(),
|
||||
meetingUrl: z.string().nullable(),
|
||||
|
||||
@@ -229,7 +229,7 @@ export const hotelQueryRouter = router({
|
||||
return hotels
|
||||
}),
|
||||
}),
|
||||
getDestinationsMapData: serviceProcedure
|
||||
getAllHotelData: serviceProcedure
|
||||
.input(getDestinationsMapDataInput)
|
||||
.query(async function ({ input, ctx }) {
|
||||
const lang = input?.lang ?? ctx.lang
|
||||
|
||||
@@ -94,6 +94,7 @@ export async function getHotelsByHotelIds({
|
||||
address: hotel.address,
|
||||
cityIdentifier: cities[0]?.cityIdentifier || null,
|
||||
description: content.description || null,
|
||||
rewardNight: hotel.rewardNight,
|
||||
},
|
||||
url: content.url,
|
||||
meetingUrl: additionalData.meetingRooms.meetingOnlineLink || null,
|
||||
|
||||
@@ -29,6 +29,7 @@ export namespace DynamicContentEnum {
|
||||
sas_tier_comparison: "sas_tier_comparison",
|
||||
manage_cookie_consent: "manage_cookie_consent",
|
||||
sj_widget: "sj_widget",
|
||||
reward_nights: "reward_nights",
|
||||
unknown: "unknown",
|
||||
} as const
|
||||
|
||||
|
||||
Reference in New Issue
Block a user