diff --git a/components/BookingWidget/bookingWidget.module.css b/components/BookingWidget/bookingWidget.module.css new file mode 100644 index 000000000..0437c2c48 --- /dev/null +++ b/components/BookingWidget/bookingWidget.module.css @@ -0,0 +1,21 @@ +.container { + display: none; +} + +/** +* Update the styles after mobile UX is ready +*/ + +@media screen and (min-width: 1367px) { + .container { + display: grid; + padding: 0 var(--Spacing-x5); + gap: var(--Spacing-x3); + } + .form { + display: grid; + gap: var(--Spacing-x5); + grid-template-columns: repeat(6, auto); + align-items: center; + } +} diff --git a/components/BookingWidget/index.tsx b/components/BookingWidget/index.tsx new file mode 100644 index 000000000..c3c32437b --- /dev/null +++ b/components/BookingWidget/index.tsx @@ -0,0 +1,62 @@ +"use client" +import { zodResolver } from "@hookform/resolvers/zod" +import { FormProvider, useForm } from "react-hook-form" + +import { dt } from "@/lib/dt" + +import Button from "../TempDesignSystem/Button" +import { bookingWidgetSchema } from "./schema" + +import styles from "./bookingWidget.module.css" + +import { type BookingWidgetSchema } from "@/types/components/bookingWidget" + +export function BookingWidget() { + const methods = useForm({ + defaultValues: { + search: { + stayType: "", + stayValue: "", + }, + nights: { + // UTC is required to handle requests from far away timezones https://scandichotels.atlassian.net/browse/SWAP-6375 & PET-507 + // This is specifically to handle timezones falling in different dates. + fromDate: dt().utc().format("DD/MM/YYYY"), + toDate: dt().utc().add(1, "day").format("DD/MM/YYYY"), + }, + bookingCode: "", + redemption: false, + voucher: false, + rooms: [ + { + adults: 1, + childs: [], + }, + ], + }, + mode: "all", + resolver: zodResolver(bookingWidgetSchema), + reValidateMode: "onChange", + }) + + function onSubmit(data: BookingWidgetSchema) { + console.log(data) + // Parse data and route accordignly to Select hotel or select room-rate page + console.log("to be routing") + } + + return ( +
+
+ +
Search
+
Nights
+
Rooms
+
Bonus code
+
Bonus cheque or reward nights
+ +
+
+
+ ) +} diff --git a/components/BookingWidget/schema.ts b/components/BookingWidget/schema.ts new file mode 100644 index 000000000..057b5496e --- /dev/null +++ b/components/BookingWidget/schema.ts @@ -0,0 +1,28 @@ +import { z } from "zod" + +export const bookingWidgetSchema = z.object({ + search: z.object({ + stayType: z.string(), + stayValue: z.string(), + }), + nights: z.object({ + // Update this as required once started working with Date picker in Nights component + fromDate: z.string(), + toDate: z.string(), + }), + bookingCode: z.string(), // Update this as required when working with booking codes component + redemption: z.boolean().default(false), + voucher: z.boolean().default(false), + rooms: z.array( + // This will be updated when working in guests component + z.object({ + adults: z.number().default(1), + childs: z.array( + z.object({ + age: z.number(), + bed: z.number(), + }) + ), + }) + ), +}) diff --git a/components/Current/Header/index.tsx b/components/Current/Header/index.tsx index dd74dd4cb..34e4db5ea 100644 --- a/components/Current/Header/index.tsx +++ b/components/Current/Header/index.tsx @@ -3,6 +3,7 @@ import { env } from "@/env/server" import { serverClient } from "@/lib/trpc/server" import { auth } from "@/auth" +import { BookingWidget } from "@/components/BookingWidget" import { MainMenu } from "./MainMenu" import OfflineBanner from "./OfflineBanner" @@ -25,6 +26,11 @@ export default async function Header({ const user = await serverClient().user.name() + /** + * ToDo: Create logic to get this info from ContentStack based on page + * */ + const hideBookingWidget = true + if (!data) { return null } @@ -58,6 +64,7 @@ export default async function Header({ user={user} lang={lang} /> + {hideBookingWidget ? null : } ) } diff --git a/components/Icons/ScandicLogo.tsx b/components/Icons/ScandicLogo.tsx index 896eb367e..d3710f666 100644 --- a/components/Icons/ScandicLogo.tsx +++ b/components/Icons/ScandicLogo.tsx @@ -19,8 +19,8 @@ export default function ScandicLogoIcon({ {...props} > @@ -29,32 +29,32 @@ export default function ScandicLogoIcon({ fill="#CD092F" /> diff --git a/components/Icons/TripAdvisor.tsx b/components/Icons/TripAdvisor.tsx index 95a8e843c..a1fc6d416 100644 --- a/components/Icons/TripAdvisor.tsx +++ b/components/Icons/TripAdvisor.tsx @@ -31,8 +31,8 @@ export default function TripAdvisorIcon({ diff --git a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DA.json b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DA.json index 26702c99d..36eb387e3 100644 --- a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DA.json +++ b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DA.json @@ -306,7 +306,7 @@ { "level": 5, "name": "Loyal Friend", - "requirement": "50 000p", + "requirement": "100 000p", "description": "Du har været hos os på mange ophold, så derfor vil vi gerne give dig nogle af vores bedste bonusser.", "icon": "/_static/icons/loyaltylevels/loyal-friend.svg", "benefits": [ @@ -383,7 +383,7 @@ { "level": 6, "name": "True Friend", - "requirement": "100 000p", + "requirement": "250 000p", "description": "Vi er glade for, at du besøger os, uanset om det er høj- eller lavsæson. Derfor får du endnu flere skræddersyede fordele.", "icon": "/_static/icons/loyaltylevels/true-friend.svg", "benefits": [ @@ -460,7 +460,7 @@ { "level": 7, "name": "Best Friend", - "requirement": "400 000p", + "requirement": "400 000p / 100 nætter", "description": "Det bliver simpelthen ikke bedre end det her, når det kommer til de helt eksklusive oplevelser!", "icon": "/_static/icons/loyaltylevels/best-friend.svg", "benefits": [ diff --git a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DE.json b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DE.json index 749b7e1af..54711c163 100644 --- a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DE.json +++ b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DE.json @@ -306,7 +306,7 @@ { "level": 5, "name": "Loyal Friend", - "requirement": "50 000p", + "requirement": "100 000p", "description": "Sie haben uns während zahlreicher Aufenthalte, Happy Hours und Workouts im Fitnessstudio die Treue gehalten – deshalb wollen wir uns mit einigen unserer großartigsten Belohnungen bei Ihnen revanchieren.", "icon": "/_static/icons/loyaltylevels/loyal-friend.svg", "benefits": [ @@ -383,7 +383,7 @@ { "level": 6, "name": "True Friend", - "requirement": "100 000p", + "requirement": "250 000p", "description": "Es spielt keine Rolle, ob Haupt- oder Nebensaison: Sie sind immer für uns da. Genießen Sie noch mehr individuelle Vorteile – genau nach Ihrem Geschmack.", "icon": "/_static/icons/loyaltylevels/true-friend.svg", "benefits": [ @@ -460,7 +460,7 @@ { "level": 7, "name": "Best Friend", - "requirement": "400 000p", + "requirement": "400 000p / 100 nächte", "description": "Für eine Freundschaft wie diese gibt es im Grunde keine passenden Worte, aber wir versuchen es trotzdem: Denn es könnte gar nichts Besseres geben, wenn es um sehr, sehr exklusive Erlebnisse geht!", "icon": "/_static/icons/loyaltylevels/best-friend.svg", "benefits": [ diff --git a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/EN.json b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/EN.json index f852048db..ff27f8a62 100644 --- a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/EN.json +++ b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/EN.json @@ -306,7 +306,7 @@ { "level": 5, "name": "Loyal Friend", - "requirement": "50 000p", + "requirement": "100 000p", "description": "You've stuck with us through stays, after works and gym sessions - so we'll stick with you through some of our very best rewards.", "icon": "/_static/icons/loyaltylevels/loyal-friend.svg", "benefits": [ @@ -383,7 +383,7 @@ { "level": 6, "name": "True Friend", - "requirement": "100 000p", + "requirement": "250 000p", "description": "It doesn't matter if it's peak or off season, you're always there for us. Enjoy even more tailored perks - just the way you like them.", "icon": "/_static/icons/loyaltylevels/true-friend.svg", "benefits": [ @@ -460,7 +460,7 @@ { "level": 7, "name": "Best Friend", - "requirement": "400 000p", + "requirement": "400 000p / 100 nights", "description": "There are no words for a bond like this, but here's a few anyway: It simply doesn't get any better when it comes to very, very exclusive experiences!", "icon": "/_static/icons/loyaltylevels/best-friend.svg", "benefits": [ diff --git a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/FI.json b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/FI.json index af8422628..0d37dac92 100644 --- a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/FI.json +++ b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/FI.json @@ -306,7 +306,7 @@ { "level": 5, "name": "Loyal Friend", - "requirement": "50 000p", + "requirement": "100 000p", "description": "Kiva, että olemme saaneet jakaa paljon yhteisiä hetkiä. Olet tosiaan nimesi arvoinen Loyal Friend! Haluamme panostaa ystävyyteemme myös jatkossa ja annammekin sinulle kasan uusia, ihania etuja.", "icon": "/_static/icons/loyaltylevels/loyal-friend.svg", "benefits": [ @@ -383,7 +383,7 @@ { "level": 6, "name": "True Friend", - "requirement": "100 000p", + "requirement": "250 000p", "description": "Onpa ollut ihana nähdä sinua näin paljon viime aikoina. Tosiystävän tapaan haluamme palkita sinua entistä yksilöllisemmillä eduilla.", "icon": "/_static/icons/loyaltylevels/true-friend.svg", "benefits": [ @@ -460,7 +460,7 @@ { "level": 7, "name": "Best Friend", - "requirement": "400 000p", + "requirement": "400 000p / 100 yötä", "description": "Ystävyytemme on vailla vertaa. Koska sanat eivät riitä kiittämään ystävyydestämme, pääset nyt käsiksi kaikkein eksklusiivisimpiin elämyksiin.", "icon": "/_static/icons/loyaltylevels/best-friend.svg", "benefits": [ diff --git a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/NO.json b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/NO.json index 8b744a7da..8b5738d14 100644 --- a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/NO.json +++ b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/NO.json @@ -306,7 +306,7 @@ { "level": 5, "name": "Loyal Friend", - "requirement": "50 000p", + "requirement": "100 000p", "description": "Du har vært lojal mot oss gjennom opphold, happy hours og treningsøkter – så vi er der for deg med noen av de aller beste fordelene våre.", "icon": "/_static/icons/loyaltylevels/loyal-friend.svg", "benefits": [ @@ -383,7 +383,7 @@ { "level": 6, "name": "True Friend", - "requirement": "100 000p", + "requirement": "250 000p", "description": "Det spiller ingen rolle om det er høysesong eller lavsesong, du er alltid der for oss. Nyt enda flere skreddersydde fordeler – akkurat slik du liker dem.", "icon": "/_static/icons/loyaltylevels/true-friend.svg", "benefits": [ @@ -460,7 +460,7 @@ { "level": 7, "name": "Best Friend", - "requirement": "400 000p", + "requirement": "400 000p / 100 netter", "description": "Det finnes ikke ord for et bånd som dette, men vi gjør et forsøk allikevel: Det blir bare ikke bedre når det gjelder svært eksklusive opplevelser!", "icon": "/_static/icons/loyaltylevels/best-friend.svg", "benefits": [ diff --git a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/SV.json b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/SV.json index 31dd52f5d..df7e6eedf 100644 --- a/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/SV.json +++ b/components/Loyalty/Blocks/DynamicContent/OverviewTable/data/SV.json @@ -306,7 +306,7 @@ { "level": 5, "name": "Loyal Friend", - "requirement": "50 000p", + "requirement": "100 000p", "description": "Du har bott hos oss under otaliga resor, hängt med oss under sena timmar och genom ur och skur. Det är dags att du får några av våra allra bästa förmåner.", "icon": "/_static/icons/loyaltylevels/loyal-friend.svg", "benefits": [ @@ -383,7 +383,7 @@ { "level": 6, "name": "True Friend", - "requirement": "100 000p", + "requirement": "250 000p", "description": "Dig kan man lita på, oavsett tid på året finns du där för oss. Därför vill vi att du ska få njuta av fler förmåner anpassade efter dig, precis som du vill ha dem.", "icon": "/_static/icons/loyaltylevels/true-friend.svg", "benefits": [ @@ -460,7 +460,7 @@ { "level": 7, "name": "Best Friend", - "requirement": "400 000p", + "requirement": "400 000p / 100 nätter", "description": "Det finns inga ord för en vänskap som vår, men vi vill ändå säga: Bättre upplevelser än så här går inte att få, nu vi talar om riktigt exklusiva upplevelser!", "icon": "/_static/icons/loyaltylevels/best-friend.svg", "benefits": [ diff --git a/components/MyPages/AccountPage/Content.tsx b/components/MyPages/AccountPage/Content.tsx index aa73adceb..2074e79b9 100644 --- a/components/MyPages/AccountPage/Content.tsx +++ b/components/MyPages/AccountPage/Content.tsx @@ -2,7 +2,6 @@ import JsonToHtml from "@/components/JsonToHtml" import CurrentBenefitsBlock from "@/components/MyPages/Blocks/Benefits/CurrentLevel" import NextLevelBenefitsBlock from "@/components/MyPages/Blocks/Benefits/NextLevel" import Overview from "@/components/MyPages/Blocks/Overview" -import CurrentPointsBalance from "@/components/MyPages/Blocks/Points/CurrentPointsBalance" import EarnAndBurn from "@/components/MyPages/Blocks/Points/EarnAndBurn" import Shortcuts from "@/components/MyPages/Blocks/Shortcuts" import PreviousStays from "@/components/MyPages/Blocks/Stays/Previous" @@ -37,8 +36,6 @@ function DynamicComponent({ component, props }: AccountPageContentProps) { return case DynamicContentComponents.next_benefits: return - case DynamicContentComponents.my_points: - return case DynamicContentComponents.expiring_points: // TODO: Add once available // return diff --git a/components/MyPages/AccountPage/Webview/Content.tsx b/components/MyPages/AccountPage/Webview/Content.tsx index 45899a42f..cae5312f3 100644 --- a/components/MyPages/AccountPage/Webview/Content.tsx +++ b/components/MyPages/AccountPage/Webview/Content.tsx @@ -6,7 +6,6 @@ import { modWebviewLink } from "@/utils/webviews" import CurrentBenefitsBlock from "../../Blocks/Benefits/CurrentLevel" import NextLevelBenefitsBlock from "../../Blocks/Benefits/NextLevel" -import CurrentPointsBalance from "../../Blocks/Points/CurrentPointsBalance" import EarnAndBurn from "../../Blocks/Points/EarnAndBurn" import PointsOverview from "../../Blocks/Points/Overview" @@ -29,8 +28,6 @@ function DynamicComponent({ component, props }: AccountPageContentProps) { return case DynamicContentComponents.next_benefits: return - case DynamicContentComponents.my_points: - return case DynamicContentComponents.expiring_points: // TODO: Add once available // return diff --git a/components/MyPages/Blocks/Overview/Stats/ExpiringPoints/index.tsx b/components/MyPages/Blocks/Overview/Stats/ExpiringPoints/index.tsx index 69cbc835c..179d01fbb 100644 --- a/components/MyPages/Blocks/Overview/Stats/ExpiringPoints/index.tsx +++ b/components/MyPages/Blocks/Overview/Stats/ExpiringPoints/index.tsx @@ -23,7 +23,8 @@ export default async function ExpiringPoints({ user }: UserProps) {
{formatter.format(membership.pointsToExpire)}{" "} - {formatMessage({ id: "points expiring by" })} {d.format("YYYY-MM-DD")} + {formatMessage({ id: "spendable points expiring by" })}{" "} + {d.format("YYYY-MM-DD")}
) diff --git a/components/MyPages/Blocks/Overview/Stats/Points/PointsColumn/index.tsx b/components/MyPages/Blocks/Overview/Stats/Points/PointsColumn/index.tsx index 09764eeed..6ae2d39cd 100644 --- a/components/MyPages/Blocks/Overview/Stats/Points/PointsColumn/index.tsx +++ b/components/MyPages/Blocks/Overview/Stats/Points/PointsColumn/index.tsx @@ -13,7 +13,7 @@ import type { export const YourPointsColumn = ({ points }: PointsColumn) => PointsColumn({ points, - title: "Your points", + title: "Your points to spend", subtitle: "as of today", }) diff --git a/components/MyPages/Blocks/Points/CurrentPointsBalance/currentPointsBalance.module.css b/components/MyPages/Blocks/Points/CurrentPointsBalance/currentPointsBalance.module.css deleted file mode 100644 index 45d8eaab7..000000000 --- a/components/MyPages/Blocks/Points/CurrentPointsBalance/currentPointsBalance.module.css +++ /dev/null @@ -1,20 +0,0 @@ -.card { - background-color: var(--Scandic-Brand-Pale-Peach); - border-radius: var(--Corner-radius-xLarge); - color: var(--Main-Brand-Burgundy); - display: flex; - flex-direction: column; - align-items: center; - gap: var(--Spacing-x2); -} - -.points { - font-size: var(--typography-Title-2-Mobile-fontSize); - margin: 0; -} - -@media screen and (min-width: 768px) { - .points { - font-size: var(--typography-Title-2-Desktop-fontSize); - } -} diff --git a/components/MyPages/Blocks/Points/CurrentPointsBalance/index.tsx b/components/MyPages/Blocks/Points/CurrentPointsBalance/index.tsx deleted file mode 100644 index d92caceef..000000000 --- a/components/MyPages/Blocks/Points/CurrentPointsBalance/index.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { serverClient } from "@/lib/trpc/server" - -import SectionContainer from "@/components/Section/Container" -import SectionHeader from "@/components/Section/Header" -import SectionLink from "@/components/Section/Link" -import { getIntl } from "@/i18n" -import { getMembership } from "@/utils/user" - -import styles from "./currentPointsBalance.module.css" - -import { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage" - -async function CurrentPointsBalance({ - title, - subtitle, - link, -}: AccountPageComponentProps) { - const user = await serverClient().user.get() - const { formatMessage } = await getIntl() - if (!user) { - return null - } - const membership = getMembership(user.memberships) - return ( - - -
-

{`${formatMessage({ id: "Your points" })}*`}

-

- {`${formatMessage({ id: "Points" })}: ${membership ? membership.currentPoints : "N/A"}`} -

-

- {`*${formatMessage({ id: "Points may take up to 10 days to be displayed." })}`} -

-
- -
- ) -} - -export default CurrentPointsBalance diff --git a/components/MyPages/Blocks/Points/EarnAndBurn/Mobile/index.tsx b/components/MyPages/Blocks/Points/EarnAndBurn/Mobile/index.tsx index ad4e896e4..9dc880c78 100644 --- a/components/MyPages/Blocks/Points/EarnAndBurn/Mobile/index.tsx +++ b/components/MyPages/Blocks/Points/EarnAndBurn/Mobile/index.tsx @@ -48,7 +48,7 @@ export default async function MobileTable({ lang, transactions }: TableProps) { ) : ( - {formatMessage({ id: "Empty" })} + {formatMessage({ id: "There are no transactions to display" })} )} diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index 5d81d6fb6..77f96b5de 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -41,7 +41,7 @@ "Edit": "Redigere", "Edit profile": "Rediger profil", "Email": "E-mail", - "Empty": "Empty", + "There are no transactions to display": "Der er ingen transaktioner at vise", "Explore all levels and benefits": "Udforsk alle niveauer og fordele", "Find booking": "Find booking", "Flexibility": "Fleksibilitet", @@ -89,7 +89,7 @@ "Points may take up to 10 days to be displayed.": "Det kan tage op til 10 dage at få vist point.", "Points needed to level up": "Point nødvendige for at komme i niveau", "Points needed to stay on level": "Point nødvendige for at holde sig på niveau", - "points expiring by": "point udløber den", + "spendable points expiring by": "Brugbare point udløber den", "Previous victories": "Tidligere sejre", "Read more": "Læs mere", "Read more about the hotel": "Læs mere om hotellet", @@ -106,7 +106,7 @@ "Street": "Gade", "special character": "speciel karakter", "Total Points": "Samlet antal point", - "Your points": "Dine pointer", + "Your points to spend": "Dine brugbare pointer", "Transaction date": "Overførselsdato", "Transactions": "Transaktioner", "Tripadvisor reviews": "{rating} ({count} anmeldelser på Tripadvisor)", diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 1db259912..5f9c4e996 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -41,7 +41,7 @@ "Edit": "Bearbeiten", "Edit profile": "Profil bearbeiten", "Email": "Email", - "Empty": "Empty", + "There are no transactions to display": "Es sind keine Transaktionen zum Anzeigen vorhanden", "Explore all levels and benefits": "Entdecken Sie alle Levels und Vorteile", "Find booking": "Buchung finden", "Flexibility": "Flexibilität", @@ -89,7 +89,7 @@ "Points may take up to 10 days to be displayed.": "Es kann bis zu 10 Tage dauern, bis Punkte angezeigt werden.", "Points needed to level up": "Punkte, die zum Levelaufstieg benötigt werden", "Points needed to stay on level": "Erforderliche Punkte, um auf diesem Niveau zu bleiben", - "points expiring by": "punkte verfallen bis zum", + "spendable points expiring by": "Einlösbare punkte verfallen bis zum", "Previous victories": "Bisherige Siege", "Read more": "Mehr lesen", "Read more about the hotel": "Lesen Sie mehr über das Hotel", @@ -106,7 +106,7 @@ "Street": "Straße", "special character": "sonderzeichen", "Total Points": "Gesamtpunktzahl", - "Your points": "Deine Punkte", + "Your points to spend": "Deine Punkte", "Transaction date": "Transaktionsdatum", "Transactions": "Transaktionen", "Tripadvisor reviews": "{rating} ({count} Bewertungen auf Tripadvisor)", diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index 6a3263509..b2f0d47eb 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -42,7 +42,7 @@ "Edit": "Edit", "Edit profile": "Edit profile", "Email": "Email", - "Empty": "Empty", + "There are no transactions to display": "There are no transactions to display", "Explore all levels and benefits": "Explore all levels and benefits", "Find booking": "Find booking", "Flexibility": "Flexibility", @@ -94,7 +94,7 @@ "Points may take up to 10 days to be displayed.": "Points may take up to 10 days to be displayed.", "Points needed to level up": "Points needed to level up", "Points needed to stay on level": "Points needed to stay on level", - "points expiring by": "points expiring by", + "spendable points expiring by": "spendable points expiring by", "Previous victories": "Previous victories", "Read more": "Read more", "Read more about the hotel": "Read more about the hotel", @@ -111,7 +111,7 @@ "Street": "Street", "special character": "special character", "Total Points": "Total Points", - "Your points": "Your points", + "Your points to spend": "Your points to spend", "Transaction date": "Transaction date", "Transactions": "Transactions", "Tripadvisor reviews": "{rating} ({count} reviews on Tripadvisor)", diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index acec115ae..d991b7630 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -41,7 +41,7 @@ "Edit": "Muokata", "Edit profile": "Muokkaa profiilia", "Email": "Sähköposti", - "Empty": "Empty", + "There are no transactions to display": "Näytettäviä tapahtumia ei ole", "Explore all levels and benefits": "Tutustu kaikkiin tasoihin ja etuihin", "Find booking": "Etsi varaus", "Flexibility": "Joustavuus", @@ -89,7 +89,7 @@ "Points may take up to 10 days to be displayed.": "Pisteiden näyttäminen voi kestää jopa 10 päivää.", "Points needed to level up": "Pisteitä tarvitaan tasolle pääsemiseksi", "Points needed to stay on level": "Tällä tasolla pysymiseen tarvittavat pisteet", - "points expiring by": "pisteet vanhenevat viimeistään", + "spendable points expiring by": "Käytettävät pisteet vanhenevat viimeistään", "Previous victories": "Edelliset voitot", "Read more": "Lue lisää", "Read more about the hotel": "Lue lisää hotellista", @@ -106,7 +106,7 @@ "Street": "Katu", "special character": "erikoishahmo", "Total Points": "Kokonaispisteet", - "Your points": "Sinun pisteesi", + "Your points to spend": "Sinun pisteesi käytettäväksi", "Transaction date": "Tapahtuman päivämäärä", "Transactions": "Tapahtumat", "Tripadvisor reviews": "{rating} ({count} arvostelua TripAdvisorissa)", diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index 87ec73ab7..2f0cb8e3e 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -41,7 +41,7 @@ "Edit": "Redigere", "Edit profile": "Rediger profil", "Email": "E-post", - "Empty": "Empty", + "There are no transactions to display": "Det er ingen transaksjoner å vise", "Explore all levels and benefits": "Utforsk alle nivåer og fordeler", "Find booking": "Finn booking", "Flexibility": "Fleksibilitet", @@ -89,7 +89,7 @@ "Points may take up to 10 days to be displayed.": "Det kan ta opptil 10 dager før poeng vises.", "Points needed to level up": "Poeng som trengs for å komme opp i nivå", "Points needed to stay on level": "Poeng som trengs for å holde seg på nivå", - "points expiring by": "poeng utløper innen", + "spendable points expiring by": "Brukbare poeng utløper innen", "Previous victories": "Tidligere seire", "Read more": "Les mer", "Read more about the hotel": "Les mer om hotellet", @@ -106,7 +106,7 @@ "Street": "Gate", "special character": "spesiell karakter", "Total Points": "Totale poeng", - "Your points": "Dine poeng", + "Your points to spend": "Dine brukbare poeng", "Transaction date": "Transaksjonsdato", "Transactions": "Transaksjoner", "Tripadvisor reviews": "{rating} ({count} anmeldelser på Tripadvisor)", diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index be44e4402..a5bb53782 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -41,7 +41,7 @@ "Edit": "Redigera", "Edit profile": "Redigera profil", "Email": "E-post", - "Empty": "Tom", + "There are no transactions to display": "Det finns inga transaktioner att visa", "Explore all levels and benefits": "Utforska alla nivåer och fördelar", "Find booking": "Hitta bokning", "Flexibility": "Flexibilitet", @@ -93,7 +93,7 @@ "Points may take up to 10 days to be displayed.": "Det kan ta upp till 10 dagar innan poäng visas.", "Points needed to level up": "Poäng som behövs för att gå upp i nivå", "Points needed to stay on level": "Poäng som behövs för att hålla sig på nivå", - "points expiring by": "poäng förfaller till", + "spendable points expiring by": "Spenderbara poäng förfaller till", "Previous victories": "Tidigare segrar", "Read more": "Läs mer", "Read more about the hotel": "Läs mer om hotellet", @@ -110,7 +110,7 @@ "Street": "Gata", "special character": "speciell karaktär", "Total Points": "Total poäng", - "Your points": "Dina poäng", + "Your points to spend": "Dina spenderbara poäng", "Transaction date": "Transaktionsdatum", "Transactions": "Transaktioner", "Tripadvisor reviews": "{rating} ({count} recensioner på Tripadvisor)", diff --git a/lib/dt.ts b/lib/dt.ts index f6e8faf0b..083032505 100644 --- a/lib/dt.ts +++ b/lib/dt.ts @@ -6,6 +6,7 @@ import "dayjs/locale/sv" import d from "dayjs" import isToday from "dayjs/plugin/isToday" import relativeTime from "dayjs/plugin/relativeTime" +import utc from "dayjs/plugin/utc" /** * dayjs export Norwegian as nb [Norwegian Bokmål] so here we create the same @@ -56,5 +57,6 @@ d.locale("no", { */ d.extend(isToday) d.extend(relativeTime) +d.extend(utc) export const dt = d diff --git a/types/components/bookingWidget/index.ts b/types/components/bookingWidget/index.ts new file mode 100644 index 000000000..d6032dc3b --- /dev/null +++ b/types/components/bookingWidget/index.ts @@ -0,0 +1,5 @@ +import { z } from "zod" + +import { bookingWidgetSchema } from "@/components/BookingWidget/schema" + +export type BookingWidgetSchema = z.output