Merge branch 'master' into feature/tracking

This commit is contained in:
Linus Flood
2024-11-21 07:53:58 +01:00
213 changed files with 3486 additions and 1990 deletions

View File

@@ -13,38 +13,33 @@ import {
} from "./output"
import type { RequestOptionsWithOutBody } from "@/types/fetch"
import {
PointOfInterestCategoryNameEnum,
PointOfInterestGroupEnum,
} from "@/types/hotel"
import { PointOfInterestGroupEnum } from "@/types/hotel"
import { HotelLocation } from "@/types/trpc/routers/hotel/locations"
import type { Lang } from "@/constants/languages"
import type { Endpoint } from "@/lib/api/endpoints"
export function getPoiGroupByCategoryName(
category: PointOfInterestCategoryNameEnum
) {
export function getPoiGroupByCategoryName(category: string) {
switch (category) {
case PointOfInterestCategoryNameEnum.AIRPORT:
case PointOfInterestCategoryNameEnum.BUS_TERMINAL:
case PointOfInterestCategoryNameEnum.TRANSPORTATIONS:
case "Airport":
case "Bus terminal":
case "Transportations":
return PointOfInterestGroupEnum.PUBLIC_TRANSPORT
case PointOfInterestCategoryNameEnum.AMUSEMENT_PARK:
case PointOfInterestCategoryNameEnum.MUSEUM:
case PointOfInterestCategoryNameEnum.SPORTS:
case PointOfInterestCategoryNameEnum.THEATRE:
case PointOfInterestCategoryNameEnum.TOURIST:
case PointOfInterestCategoryNameEnum.ZOO:
case "Amusement park":
case "Museum":
case "Sports":
case "Theatre":
case "Tourist":
case "Zoo":
return PointOfInterestGroupEnum.ATTRACTIONS
case PointOfInterestCategoryNameEnum.NEARBY_COMPANIES:
case PointOfInterestCategoryNameEnum.FAIR:
case "Nearby companies":
case "Fair":
return PointOfInterestGroupEnum.BUSINESS
case PointOfInterestCategoryNameEnum.PARKING_GARAGE:
case "Parking / Garage":
return PointOfInterestGroupEnum.PARKING
case PointOfInterestCategoryNameEnum.SHOPPING:
case PointOfInterestCategoryNameEnum.RESTAURANT:
case "Shopping":
case "Restaurant":
return PointOfInterestGroupEnum.SHOPPING_DINING
case PointOfInterestCategoryNameEnum.HOSPITAL:
case "Hospital":
default:
return PointOfInterestGroupEnum.LOCATION
}