Files
web/constants/routes/hotelReservation.js
Tobias Johansson d44451d2dc Merged in feat/SW-431-payment-flow (pull request #635)
Feat/SW-431 payment flow

* feat(SW-431): Update mock hotel data

* feat(SW-431): Added route handler and trpc routes

* feat(SW-431): List payment methods and handle booking status and redirection

* feat(SW-431): Updated booking page to poll for booking status

* feat(SW-431): Updated create booking contract

* feat(SW-431): small fix

* fix(SW-431): Added intl string and sorted dictionaries

* fix(SW-431): Changes from PR

* fix(SW-431): fixes from PR

* fix(SW-431): add todo comments

* fix(SW-431): update schema prop

Approved-by: Simon.Emanuelsson
2024-10-04 12:23:31 +02:00

52 lines
1.6 KiB
JavaScript

/** @type {import('@/types/routes').LangRoute} */
export const hotelReservation = {
en: "/en/hotelreservation",
sv: "/sv/hotellbokning",
no: "/no/hotell-reservasjon",
fi: "/fi/hotellivaraus",
da: "/da/hotel-reservation",
de: "/de/hotelreservierung",
}
// TODO: Translate paths
export const selectHotel = {
en: `${hotelReservation.en}/select-hotel`,
sv: `${hotelReservation.sv}/select-hotel`,
no: `${hotelReservation.no}/select-hotel`,
fi: `${hotelReservation.fi}/select-hotel`,
da: `${hotelReservation.da}/select-hotel`,
de: `${hotelReservation.de}/select-hotel`,
}
// TODO: Translate paths
export const selectHotelMap = {
en: `${selectHotel.en}/map`,
sv: `${selectHotel.sv}/map`,
no: `${selectHotel.no}/map`,
fi: `${selectHotel.fi}/map`,
da: `${selectHotel.da}/map`,
de: `${selectHotel.de}/map`,
}
/** @type {import('@/types/routes').LangRoute} */
export const payment = {
en: `${hotelReservation.en}/payment`,
sv: `${hotelReservation.sv}/betalning`,
no: `${hotelReservation.no}/betaling`,
fi: `${hotelReservation.fi}/maksu`,
da: `${hotelReservation.da}/payment`,
de: `${hotelReservation.de}/bezahlung`,
}
/** @type {import('@/types/routes').LangRoute} */
export const bookingConfirmation = {
en: `${hotelReservation.en}/booking-confirmation`,
sv: `${hotelReservation.sv}/bokningsbekraftelse`,
no: `${hotelReservation.no}/booking-confirmation`,
fi: `${hotelReservation.fi}/varausvahvistus`,
da: `${hotelReservation.da}/booking-confirmation`,
de: `${hotelReservation.de}/buchungsbesttigung`,
}
export const bookingFlow = [...Object.values(hotelReservation)]