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:
|
case PriceTypeEnum.points:
|
||||||
{
|
{
|
||||||
total.local.currency = CurrencyEnum.POINTS
|
total.local.currency = CurrencyEnum.POINTS
|
||||||
total.local.price = total.local.price + room.roomPoints
|
total.local.price = total.local.price + room.totalPoints
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case PriceTypeEnum.voucher:
|
case PriceTypeEnum.voucher:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ interface PriceTypeProps
|
|||||||
| "cheques"
|
| "cheques"
|
||||||
| "currencyCode"
|
| "currencyCode"
|
||||||
| "rateDefinition"
|
| "rateDefinition"
|
||||||
| "roomPoints"
|
| "totalPoints"
|
||||||
| "totalPrice"
|
| "totalPrice"
|
||||||
| "vouchers"
|
| "vouchers"
|
||||||
> {
|
> {
|
||||||
@@ -30,7 +30,7 @@ export default function PriceType({
|
|||||||
currencyCode,
|
currencyCode,
|
||||||
priceType,
|
priceType,
|
||||||
rateDefinition,
|
rateDefinition,
|
||||||
roomPoints,
|
totalPoints,
|
||||||
totalPrice,
|
totalPrice,
|
||||||
vouchers,
|
vouchers,
|
||||||
}: PriceTypeProps) {
|
}: PriceTypeProps) {
|
||||||
@@ -56,7 +56,7 @@ export default function PriceType({
|
|||||||
return (
|
return (
|
||||||
<Points
|
<Points
|
||||||
isCancelled={isCancelled}
|
isCancelled={isCancelled}
|
||||||
points={roomPoints}
|
points={totalPoints}
|
||||||
price={totalPrice}
|
price={totalPrice}
|
||||||
currencyCode={currencyCode}
|
currencyCode={currencyCode}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default function Room({ booking, roomNr, user }: RoomProps) {
|
|||||||
rateDefinition,
|
rateDefinition,
|
||||||
room,
|
room,
|
||||||
roomName,
|
roomName,
|
||||||
roomPoints,
|
totalPoints,
|
||||||
isCancelled,
|
isCancelled,
|
||||||
priceType,
|
priceType,
|
||||||
vouchers,
|
vouchers,
|
||||||
@@ -279,7 +279,7 @@ export default function Room({ booking, roomNr, user }: RoomProps) {
|
|||||||
currencyCode={currencyCode}
|
currencyCode={currencyCode}
|
||||||
priceType={priceType}
|
priceType={priceType}
|
||||||
rateDefinition={rateDefinition}
|
rateDefinition={rateDefinition}
|
||||||
roomPoints={roomPoints}
|
totalPoints={totalPoints}
|
||||||
totalPrice={totalPrice}
|
totalPrice={totalPrice}
|
||||||
vouchers={vouchers}
|
vouchers={vouchers}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default function PriceDetails() {
|
|||||||
packages: state.bookedRoom.packages,
|
packages: state.bookedRoom.packages,
|
||||||
priceType: state.bookedRoom.priceType,
|
priceType: state.bookedRoom.priceType,
|
||||||
rateDefinition: state.bookedRoom.rateDefinition,
|
rateDefinition: state.bookedRoom.rateDefinition,
|
||||||
roomPoints: state.bookedRoom.roomPoints,
|
totalPoints: state.bookedRoom.totalPoints,
|
||||||
totalPrice: state.bookedRoom.totalPrice,
|
totalPrice: state.bookedRoom.totalPrice,
|
||||||
vouchers: state.bookedRoom.vouchers,
|
vouchers: state.bookedRoom.vouchers,
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default function TotalPrice() {
|
|||||||
currencyCode={bookedRoom.currencyCode}
|
currencyCode={bookedRoom.currencyCode}
|
||||||
priceType={bookedRoom.priceType}
|
priceType={bookedRoom.priceType}
|
||||||
rateDefinition={bookedRoom.rateDefinition}
|
rateDefinition={bookedRoom.rateDefinition}
|
||||||
roomPoints={totalPoints}
|
totalPoints={totalPoints}
|
||||||
totalPrice={totalPrice}
|
totalPrice={totalPrice}
|
||||||
vouchers={bookedRoom.vouchers}
|
vouchers={bookedRoom.vouchers}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export function mapRoomDetails({
|
|||||||
|
|
||||||
const priceType = getPriceType(
|
const priceType = getPriceType(
|
||||||
booking.cheques,
|
booking.cheques,
|
||||||
booking.roomPoints,
|
booking.totalPoints,
|
||||||
booking.vouchers
|
booking.vouchers
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export type Room = Pick<
|
|||||||
| "currencyCode"
|
| "currencyCode"
|
||||||
| "guest"
|
| "guest"
|
||||||
| "rateDefinition"
|
| "rateDefinition"
|
||||||
| "roomPoints"
|
| "totalPoints"
|
||||||
| "totalPrice"
|
| "totalPrice"
|
||||||
| "vouchers"
|
| "vouchers"
|
||||||
> & {
|
> & {
|
||||||
@@ -98,7 +98,7 @@ export default function BookedRoomSidePeek({
|
|||||||
priceType,
|
priceType,
|
||||||
rateDefinition,
|
rateDefinition,
|
||||||
roomNumber,
|
roomNumber,
|
||||||
roomPoints,
|
totalPoints,
|
||||||
terms,
|
terms,
|
||||||
totalPrice,
|
totalPrice,
|
||||||
vouchers,
|
vouchers,
|
||||||
@@ -390,7 +390,7 @@ export default function BookedRoomSidePeek({
|
|||||||
priceType={priceType}
|
priceType={priceType}
|
||||||
currencyCode={currencyCode}
|
currencyCode={currencyCode}
|
||||||
rateDefinition={rateDefinition}
|
rateDefinition={rateDefinition}
|
||||||
roomPoints={roomPoints}
|
totalPoints={totalPoints}
|
||||||
totalPrice={totalRoomPrice}
|
totalPrice={totalRoomPrice}
|
||||||
vouchers={vouchers}
|
vouchers={vouchers}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user