feat: move room charge to top in price details modal

This commit is contained in:
Simon Emanuelsson
2025-05-08 11:28:22 +02:00
committed by Michael Zetterberg
parent 194a401a56
commit a99e434d84
28 changed files with 264 additions and 136 deletions

View File

@@ -17,20 +17,16 @@ export function mapToPrice(rooms: (Room | null)[], nights: number) {
if (room.cheques) {
price = {
corporateCheque: {
additionalPricePerStay: room.totalPrice
? room.totalPrice
: undefined,
currency: room.totalPrice ? room.currencyCode : undefined,
additionalPricePerStay: room.roomPrice ? room.roomPrice : undefined,
currency: room.roomPrice ? room.currencyCode : undefined,
numberOfCheques: room.cheques,
},
}
} else if (room.roomPoints) {
price = {
redemption: {
additionalPricePerStay: room.totalPrice
? room.totalPrice
: undefined,
currency: room.totalPrice ? room.currencyCode : undefined,
additionalPricePerStay: room.roomPrice ? room.roomPrice : undefined,
currency: room.roomPrice ? room.currencyCode : undefined,
pointsPerNight: room.roomPoints / nights,
pointsPerStay: room.roomPoints,
},
@@ -46,7 +42,7 @@ export function mapToPrice(rooms: (Room | null)[], nights: number) {
regular: {
currency: room.currencyCode,
pricePerNight: room.roomPrice / nights,
pricePerStay: room.totalPrice,
pricePerStay: room.roomPrice,
},
}
}