feat(SW-176): add enum
This commit is contained in:
@@ -107,7 +107,8 @@ export default async function SectionsPage({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>Hotel Card TBI</div>
|
{/* TODO: Add Hotel Listing Card */}
|
||||||
|
<div>Hotel Listing Card TBI</div>
|
||||||
|
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
<div className={styles.main}>
|
<div className={styles.main}>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { setLang } from "@/i18n/serverContext"
|
|||||||
|
|
||||||
import styles from "./page.module.css"
|
import styles from "./page.module.css"
|
||||||
|
|
||||||
|
import { AvailabilityEnum } from "@/types/components/hotelReservation/selectHotel/selectHotel"
|
||||||
import { LangParams, PageArgs } from "@/types/params"
|
import { LangParams, PageArgs } from "@/types/params"
|
||||||
|
|
||||||
export default async function SelectHotelPage({
|
export default async function SelectHotelPage({
|
||||||
@@ -35,10 +36,12 @@ export default async function SelectHotelPage({
|
|||||||
|
|
||||||
const { availability } = availabilityResponse
|
const { availability } = availabilityResponse
|
||||||
|
|
||||||
const filterAvailability = availability.data
|
const availableHotels = availability.data
|
||||||
.filter((hotels) => hotels.attributes.status === "Available")
|
.filter((hotels) => hotels.attributes.status === AvailabilityEnum.Available)
|
||||||
.flatMap((hotels) => hotels.attributes)
|
.flatMap((hotels) => hotels.attributes)
|
||||||
|
|
||||||
|
console.log(availableHotels)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className={styles.main}>
|
<main className={styles.main}>
|
||||||
<section>
|
<section>
|
||||||
@@ -56,8 +59,8 @@ export default async function SelectHotelPage({
|
|||||||
<HotelFilter filters={hotelFilters} />
|
<HotelFilter filters={hotelFilters} />
|
||||||
</section>
|
</section>
|
||||||
<section className={styles.hotelCards}>
|
<section className={styles.hotelCards}>
|
||||||
{filterAvailability.length ? (
|
{availableHotels.length ? (
|
||||||
filterAvailability.map((hotel) => (
|
availableHotels.map((hotel) => (
|
||||||
<HotelCard
|
<HotelCard
|
||||||
key={hotel.hotelId}
|
key={hotel.hotelId}
|
||||||
checkInDate={hotel.checkInDate}
|
checkInDate={hotel.checkInDate}
|
||||||
|
|||||||
@@ -136,6 +136,7 @@
|
|||||||
"Phone is required": "Telefonnummer er påkrævet",
|
"Phone is required": "Telefonnummer er påkrævet",
|
||||||
"Phone number": "Telefonnummer",
|
"Phone number": "Telefonnummer",
|
||||||
"Please enter a valid phone number": "Indtast venligst et gyldigt telefonnummer",
|
"Please enter a valid phone number": "Indtast venligst et gyldigt telefonnummer",
|
||||||
|
"points": "Point",
|
||||||
"Points": "Point",
|
"Points": "Point",
|
||||||
"points": "point",
|
"points": "point",
|
||||||
"Points being calculated": "Point udregnes",
|
"Points being calculated": "Point udregnes",
|
||||||
|
|||||||
@@ -133,8 +133,8 @@
|
|||||||
"Phone is required": "Telefon ist erforderlich",
|
"Phone is required": "Telefon ist erforderlich",
|
||||||
"Phone number": "Telefonnummer",
|
"Phone number": "Telefonnummer",
|
||||||
"Please enter a valid phone number": "Bitte geben Sie eine gültige Telefonnummer ein",
|
"Please enter a valid phone number": "Bitte geben Sie eine gültige Telefonnummer ein",
|
||||||
"points": "Punkte",
|
|
||||||
"Points": "Punkte",
|
"Points": "Punkte",
|
||||||
|
"points": "Punkte",
|
||||||
"Points being calculated": "Punkte werden berechnet",
|
"Points being calculated": "Punkte werden berechnet",
|
||||||
"Points earned prior to May 1, 2021": "Zusammengeführte Punkte vor dem 1. Mai 2021",
|
"Points earned prior to May 1, 2021": "Zusammengeführte Punkte vor dem 1. Mai 2021",
|
||||||
"Points may take up to 10 days to be displayed.": "Es kann bis zu 10 Tage dauern, bis Punkte angezeigt werden.",
|
"Points may take up to 10 days to be displayed.": "Es kann bis zu 10 Tage dauern, bis Punkte angezeigt werden.",
|
||||||
|
|||||||
@@ -141,6 +141,7 @@
|
|||||||
"Phone is required": "Phone is required",
|
"Phone is required": "Phone is required",
|
||||||
"Phone number": "Phone number",
|
"Phone number": "Phone number",
|
||||||
"Please enter a valid phone number": "Please enter a valid phone number",
|
"Please enter a valid phone number": "Please enter a valid phone number",
|
||||||
|
"points": "Points",
|
||||||
"Points": "Points",
|
"Points": "Points",
|
||||||
"points": "points",
|
"points": "points",
|
||||||
"Points being calculated": "Points being calculated",
|
"Points being calculated": "Points being calculated",
|
||||||
|
|||||||
@@ -138,8 +138,8 @@
|
|||||||
"Phone is required": "Telefonnummer är obligatorisk",
|
"Phone is required": "Telefonnummer är obligatorisk",
|
||||||
"Phone number": "Telefonnummer",
|
"Phone number": "Telefonnummer",
|
||||||
"Please enter a valid phone number": "Var vänlig och ange ett giltigt telefonnummer",
|
"Please enter a valid phone number": "Var vänlig och ange ett giltigt telefonnummer",
|
||||||
"points": "poäng",
|
|
||||||
"Points": "Poäng",
|
"Points": "Poäng",
|
||||||
|
"points": "poäng",
|
||||||
"Points being calculated": "Poäng beräknas",
|
"Points being calculated": "Poäng beräknas",
|
||||||
"Points earned prior to May 1, 2021": "Intjänade poäng före den 1 maj 2021",
|
"Points earned prior to May 1, 2021": "Intjänade poäng före den 1 maj 2021",
|
||||||
"Points may take up to 10 days to be displayed.": "Det kan ta upp till 10 dagar innan poäng visas.",
|
"Points may take up to 10 days to be displayed.": "Det kan ta upp till 10 dagar innan poäng visas.",
|
||||||
|
|||||||
@@ -500,7 +500,7 @@ const bestPricePerNightSchema = z.object({
|
|||||||
const linksSchema = z.object({
|
const linksSchema = z.object({
|
||||||
links: z.array(
|
links: z.array(
|
||||||
z.object({
|
z.object({
|
||||||
url: z.string(),
|
url: z.string().url(),
|
||||||
type: z.string(),
|
type: z.string(),
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export enum AvailabilityEnum {
|
||||||
|
Available = "Available",
|
||||||
|
NotAvailable = "NotAvailable",
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user