Merged in fix/refactor-currency-display (pull request #3434)
fix(SW-3616): Handle EuroBonus point type everywhere * Add tests to formatPrice * formatPrice * More work replacing config with api points type * More work replacing config with api points type * More fixing with currency * maybe actually fixed it * Fix MyStay * Clean up * Fix comments * Merge branch 'master' into fix/refactor-currency-display * Fix calculateTotalPrice for EB points + SF points + cash Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -8,11 +8,7 @@ import { getHotelRoom } from "@scandic-hotels/trpc/routers/booking/helpers"
|
||||
import { mapRoomDetails } from "@/components/HotelReservation/MyStay/utils/mapRoomDetails"
|
||||
import { MyStayContext } from "@/contexts/MyStay"
|
||||
|
||||
import {
|
||||
calculateTotalPoints,
|
||||
calculateTotalPrice,
|
||||
isAllRoomsCancelled,
|
||||
} from "./helpers"
|
||||
import { calculateTotalPrice, isAllRoomsCancelled } from "./helpers"
|
||||
|
||||
import type { InitialState, MyStayState } from "@/types/stores/my-stay"
|
||||
|
||||
@@ -56,8 +52,6 @@ export function createMyStayStore({
|
||||
|
||||
const allRoomsAreCancelled = isAllRoomsCancelled(mappedRooms)
|
||||
|
||||
const totalPoints = calculateTotalPoints(mappedRooms, allRoomsAreCancelled)
|
||||
|
||||
const totalPrice = calculateTotalPrice(
|
||||
mappedRooms,
|
||||
bookedRoom.currencyCode,
|
||||
@@ -80,7 +74,6 @@ export function createMyStayStore({
|
||||
refId,
|
||||
rooms: mappedRooms,
|
||||
savedCreditCards,
|
||||
totalPoints,
|
||||
totalPrice,
|
||||
isPastBooking,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user