Merged in feat/SW-1598-hotel-parking-prices (pull request #1458)

feat(SW-1598): Now only showing "Free parking" when free parking is chosen

* feat(SW-1598): Now only showing "Free parking" when free parking is chosen


Approved-by: Fredrik Thorsson
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-03-04 13:38:35 +00:00
parent edcae22e45
commit f80c2e9583
9 changed files with 44 additions and 198 deletions

View File

@@ -0,0 +1,18 @@
import type { IntlShape } from "react-intl"
import { Periods } from "@/types/components/hotelPage/sidepeek/parking"
export function getPeriod(intl: IntlShape, period?: string) {
switch (period) {
case Periods.hour:
return intl.formatMessage({ id: "Price per hour" })
case Periods.day:
return intl.formatMessage({ id: "Price per day" })
case Periods.night:
return intl.formatMessage({ id: "Price per night" })
case Periods.allDay:
return intl.formatMessage({ id: "Price per 24 hours" })
default:
return period
}
}