feat: use correct description for beds in sidepeek
This commit is contained in:
committed by
Simon.Emanuelsson
parent
38f937f948
commit
07a764211f
@@ -38,7 +38,7 @@ const roomContentSchema = z.object({
|
||||
const roomTypesSchema = z.object({
|
||||
code: nullableStringValidator,
|
||||
description: nullableStringValidator,
|
||||
fixedExtraBed: bedTypeSchema,
|
||||
fixedExtraBed: bedTypeSchema.optional(),
|
||||
isLackingCribs: z.boolean(),
|
||||
isLackingExtraBeds: z.boolean(),
|
||||
mainBed: bedTypeSchema,
|
||||
@@ -81,7 +81,16 @@ export function transformRoomCategories(
|
||||
occupancy: data.attributes.occupancy,
|
||||
roomFacilities: data.attributes.roomFacilities,
|
||||
roomSize: data.attributes.roomSize,
|
||||
roomTypes: data.attributes.roomTypes,
|
||||
roomTypes: data.attributes.roomTypes.map((roomType) => {
|
||||
if (!roomType || roomType.fixedExtraBed?.type.toLowerCase() === "none") {
|
||||
return {
|
||||
...roomType,
|
||||
fixedExtraBed: undefined,
|
||||
}
|
||||
}
|
||||
|
||||
return roomType
|
||||
}),
|
||||
sortOrder: data.attributes.sortOrder,
|
||||
type: data.type,
|
||||
totalOccupancy:
|
||||
|
||||
Reference in New Issue
Block a user