From beb776bac9f22fbfe41f6904bd345594cfe8c1d8 Mon Sep 17 00:00:00 2001 From: Bianca Widstam Date: Mon, 18 Nov 2024 17:30:55 +0000 Subject: [PATCH] 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 --- i18n/dictionaries/da.json | 1 + i18n/dictionaries/de.json | 1 + i18n/dictionaries/en.json | 1 + i18n/dictionaries/fi.json | 1 + i18n/dictionaries/no.json | 1 + i18n/dictionaries/sv.json | 1 + server/routers/hotels/output.ts | 2 +- server/routers/hotels/query.ts | 9 +++------ server/routers/hotels/schemas/room.ts | 4 ++-- 9 files changed, 12 insertions(+), 9 deletions(-) diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index 076544355..336f5eef9 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -356,6 +356,7 @@ "This room is not available": "Dette værelse er ikke tilgængeligt", "To get the member price {amount} {currency}, log in or join when completing the booking.": "For at få medlemsprisen {amount} {currency}, log ind eller tilmeld dig, når du udfylder bookingen.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "For at sikre din reservation, beder vi om at du giver os dine betalingsoplysninger. Du kan så være sikker på, at ingen gebyrer vil blive opkrævet på dette tidspunkt.", + "Total": "Total", "Total Points": "Samlet antal point", "Total price": "Samlet pris", "Total price (incl VAT)": "Samlet pris (inkl. moms)", diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 433a0ba33..78d9fd5cb 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -354,6 +354,7 @@ "This room is not available": "Dieses Zimmer ist nicht verfügbar", "To get the member price {amount} {currency}, log in or join when completing the booking.": "Um den Mitgliederpreis von {amount} {currency} zu erhalten, loggen Sie sich ein oder treten Sie Scandic Friends bei, wenn Sie die Buchung abschließen.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "Um Ihre Reservierung zu sichern, bitten wir Sie, Ihre Zahlungskarteninformationen zu geben. Sie können sicher sein, dass keine Gebühren zu diesem Zeitpunkt erhoben werden.", + "Total": "Gesamt", "Total Points": "Gesamtpunktzahl", "Total price": "Gesamtpreis", "Total price (incl VAT)": "Gesamtpreis (inkl. MwSt.)", diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index 38a5da82b..cb8a071d9 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -384,6 +384,7 @@ "This room is not available": "This room is not available", "To get the member price {amount} {currency}, log in or join when completing the booking.": "To get the member price {amount} {currency}, log in or join when completing the booking.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.", + "Total": "Total", "Total Points": "Total Points", "Total cost": "Total cost", "Total price": "Total price", diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index 218abed13..48931f7f2 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -356,6 +356,7 @@ "This room is not available": "Tämä huone ei ole käytettävissä", "To get the member price {amount} {currency}, log in or join when completing the booking.": "Jäsenhintaan saavat sisäänkirjautuneet tai liittyneet jäsenet.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "Varmistaaksesi varauksen, pyydämme sinua antamaan meille maksukortin tiedot. Varmista, että ei veloiteta maksusi tällä hetkellä.", + "Total": "Kokonais", "Total Points": "Kokonaispisteet", "Total price": "Kokonaishinta", "Total price (incl VAT)": "Kokonaishinta (sis. ALV)", diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index 7cf8e985a..313d0799d 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -353,6 +353,7 @@ "This room is not available": "Dette rommet er ikke tilgjengelig", "To get the member price {amount} {currency}, log in or join when completing the booking.": "For å få medlemsprisen {amount} {currency}, logg inn eller bli med når du fullfører bestillingen.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "For å sikre din reservasjon, ber vi om at du gir oss dine betalingskortdetaljer. Vær sikker på at ingen gebyrer vil bli belastet på dette tidspunktet.", + "Total": "Total", "Total Points": "Totale poeng", "Total incl VAT": "Sum inkl mva", "Total price": "Totalpris", diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index 7f935f88a..878bce352 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -353,6 +353,7 @@ "This room is not available": "Detta rum är inte tillgängligt", "To get the member price {amount} {currency}, log in or join when completing the booking.": "För att få medlemsprisen {amount} {currency}, logga in eller bli medlem när du slutför bokningen.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "För att säkra din bokning ber vi om att du ger oss dina betalkortdetaljer. Välj säker på att ingen avgifter kommer att debiteras just nu.", + "Total": "Totalt", "Total Points": "Poäng totalt", "Total incl VAT": "Totalt inkl moms", "Total price": "Totalpris", diff --git a/server/routers/hotels/output.ts b/server/routers/hotels/output.ts index b68e87fc0..d4f3d89c9 100644 --- a/server/routers/hotels/output.ts +++ b/server/routers/hotels/output.ts @@ -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(), diff --git a/server/routers/hotels/query.ts b/server/routers/hotels/query.ts index ea094de0f..af9460b7c 100644 --- a/server/routers/hotels/query.ts +++ b/server/routers/hotels/query.ts @@ -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 diff --git a/server/routers/hotels/schemas/room.ts b/server/routers/hotels/schemas/room.ts index 5a1480097..8b9291c1f 100644 --- a/server/routers/hotels/schemas/room.ts +++ b/server/routers/hotels/schemas/room.ts @@ -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(), }), }), })