Merged in SW-2728-mystay-totalpoints (pull request #2201)

fix(SW-2728): add totalpoints to mystay

* fix(2728): add totalpoints to mystay

* fix(SW-2728): add totalPoints everywhere


Approved-by: Anton Gunnarsson
This commit is contained in:
Bianca Widstam
2025-05-23 13:46:27 +00:00
parent afd9b3b246
commit fed24b9012
7 changed files with 12 additions and 12 deletions

View File

@@ -70,7 +70,7 @@ export function calculateTotalPrice(rooms: Room[], currency: CurrencyEnum) {
case PriceTypeEnum.points:
{
total.local.currency = CurrencyEnum.POINTS
total.local.price = total.local.price + room.roomPoints
total.local.price = total.local.price + room.totalPoints
}
break
case PriceTypeEnum.voucher:

View File

@@ -14,7 +14,7 @@ interface PriceTypeProps
| "cheques"
| "currencyCode"
| "rateDefinition"
| "roomPoints"
| "totalPoints"
| "totalPrice"
| "vouchers"
> {
@@ -30,7 +30,7 @@ export default function PriceType({
currencyCode,
priceType,
rateDefinition,
roomPoints,
totalPoints,
totalPrice,
vouchers,
}: PriceTypeProps) {
@@ -56,7 +56,7 @@ export default function PriceType({
return (
<Points
isCancelled={isCancelled}
points={roomPoints}
points={totalPoints}
price={totalPrice}
currencyCode={currencyCode}
/>

View File

@@ -46,7 +46,7 @@ export default function Room({ booking, roomNr, user }: RoomProps) {
rateDefinition,
room,
roomName,
roomPoints,
totalPoints,
isCancelled,
priceType,
vouchers,
@@ -279,7 +279,7 @@ export default function Room({ booking, roomNr, user }: RoomProps) {
currencyCode={currencyCode}
priceType={priceType}
rateDefinition={rateDefinition}
roomPoints={roomPoints}
totalPoints={totalPoints}
totalPrice={totalPrice}
vouchers={vouchers}
/>

View File

@@ -21,7 +21,7 @@ export default function PriceDetails() {
packages: state.bookedRoom.packages,
priceType: state.bookedRoom.priceType,
rateDefinition: state.bookedRoom.rateDefinition,
roomPoints: state.bookedRoom.roomPoints,
totalPoints: state.bookedRoom.totalPoints,
totalPrice: state.bookedRoom.totalPrice,
vouchers: state.bookedRoom.vouchers,
}))

View File

@@ -32,7 +32,7 @@ export default function TotalPrice() {
currencyCode={bookedRoom.currencyCode}
priceType={bookedRoom.priceType}
rateDefinition={bookedRoom.rateDefinition}
roomPoints={totalPoints}
totalPoints={totalPoints}
totalPrice={totalPrice}
vouchers={bookedRoom.vouchers}
/>

View File

@@ -91,7 +91,7 @@ export function mapRoomDetails({
const priceType = getPriceType(
booking.cheques,
booking.roomPoints,
booking.totalPoints,
booking.vouchers
)

View File

@@ -50,7 +50,7 @@ export type Room = Pick<
| "currencyCode"
| "guest"
| "rateDefinition"
| "roomPoints"
| "totalPoints"
| "totalPrice"
| "vouchers"
> & {
@@ -98,7 +98,7 @@ export default function BookedRoomSidePeek({
priceType,
rateDefinition,
roomNumber,
roomPoints,
totalPoints,
terms,
totalPrice,
vouchers,
@@ -390,7 +390,7 @@ export default function BookedRoomSidePeek({
priceType={priceType}
currencyCode={currencyCode}
rateDefinition={rateDefinition}
roomPoints={roomPoints}
totalPoints={totalPoints}
totalPrice={totalRoomPrice}
vouchers={vouchers}
/>