Merged in feat/enter-details-multiroom (pull request #1280)

feat(SW-1259): Enter details multiroom

* refactor: remove per-step URLs

* WIP: map multiroom data

* fix: lint errors in details page

* fix: made useEnterDetailsStore tests pass

* fix: WIP refactor enter details store

* fix: WIP enter details store update

* fix: added room index to select correct room

* fix: added logic for navigating between steps and rooms

* fix: update summary to work with store changes

* fix: added room and total price calculation

* fix: removed unused code and added test for breakfast included

* refactor: move store selectors into helpers

* refactor: session storage state for multiroom booking

* feat: update enter details accordion navigation

* fix: added room index to each form component so they select correct room

* fix: added unique id to input to handle case when multiple inputs have same name

* fix: update payment step with store changes

* fix: rebase issues

* fix: now you should only be able to go to a step if previous room is completed

* refactor: cleanup

* fix: if no availability just skip that room for now

* fix: add select-rate Summary and adjust typings


Approved-by: Arvid Norlin
This commit is contained in:
Tobias Johansson
2025-02-11 14:24:24 +00:00
committed by Arvid Norlin
parent f43ee4a0e6
commit b394d54c3f
48 changed files with 1870 additions and 1150 deletions

View File

@@ -82,8 +82,7 @@ const nextConfig = {
// ----------------------------------------
// hotel (hotelId) param missing
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -98,8 +97,7 @@ const nextConfig = {
// ----------------------------------------
// hotel (hotelId) param has to be an integer
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -114,8 +112,7 @@ const nextConfig = {
// ----------------------------------------
// fromdate param missing
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -130,8 +127,7 @@ const nextConfig = {
// ----------------------------------------
// fromdate param has to be a date
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -146,8 +142,7 @@ const nextConfig = {
// ----------------------------------------
// todate param missing
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -162,8 +157,7 @@ const nextConfig = {
// ----------------------------------------
// todate param has to be a date
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -178,8 +172,7 @@ const nextConfig = {
// ----------------------------------------
// room[0].adults param missing
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -194,8 +187,7 @@ const nextConfig = {
// ----------------------------------------
// room[0].adults param has to be an integer
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -210,8 +202,7 @@ const nextConfig = {
// ----------------------------------------
// room[0].ratecode param missing
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -226,8 +217,7 @@ const nextConfig = {
// ----------------------------------------
// room[0].roomtype param missing
// ----------------------------------------
source:
"/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
source: "/:lang/hotelreservation/details",
destination: "/:lang/hotelreservation/select-rate",
missing: [
{
@@ -278,11 +268,6 @@ const nextConfig = {
source: `${myPages.sv}/:path*`,
destination: `/sv/my-pages/:path*`,
},
{
source:
"/:lang/hotelreservation/:step(breakfast|details|payment|select-bed)",
destination: "/:lang/hotelreservation/step?step=:step",
},
{
source: "/:lang/hotelreservation/payment-callback/:status",
destination: