Merged in fix/remove-filter-to-show-all-hotels (pull request #925)

Fix/remove filter to show all hotels

* fix: remove filter to show all hotels on select-hotel-page

* fix: add missing translations


Approved-by: Pontus Dreij
This commit is contained in:
Bianca Widstam
2024-11-18 17:30:55 +00:00
parent 6bd9d8e3b7
commit beb776bac9
9 changed files with 12 additions and 9 deletions

View File

@@ -105,7 +105,7 @@ const hotelContentSchema = z.object({
imageSizes: imageSizesSchema,
}),
texts: z.object({
facilityInformation: z.string(),
facilityInformation: z.string().optional(),
surroundingInformation: z.string(),
descriptions: z.object({
short: z.string(),

View File

@@ -468,12 +468,9 @@ export const hotelQueryRouter = router({
})
)
return {
availability: validateAvailabilityData.data.data
.filter(
(hotels) =>
hotels.attributes.status === AvailabilityEnum.Available
)
.flatMap((hotels) => hotels.attributes),
availability: validateAvailabilityData.data.data.flatMap(
(hotels) => hotels.attributes
),
}
}),
rooms: serviceProcedure

View File

@@ -11,8 +11,8 @@ const roomContentSchema = z.object({
),
texts: z.object({
descriptions: z.object({
short: z.string(),
medium: z.string(),
short: z.string().optional(),
medium: z.string().optional(),
}),
}),
})