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:
@@ -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:
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
|
||||
@@ -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,
|
||||
}))
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
|
||||
@@ -91,7 +91,7 @@ export function mapRoomDetails({
|
||||
|
||||
const priceType = getPriceType(
|
||||
booking.cheques,
|
||||
booking.roomPoints,
|
||||
booking.totalPoints,
|
||||
booking.vouchers
|
||||
)
|
||||
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user