Merged in fix/BOOK-584-red-price-strikethrough (pull request #3298)
fix(BOOK-584): show discounted if specialrate or member * fix(BOOK-584): show discounted if specialrate or member Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { isSpecialRate } from "../../../SelectRate/RoomsContainer/RateSummary/utils"
|
||||
|
||||
import type { Product } from "@scandic-hotels/trpc/types/roomAvailability"
|
||||
|
||||
import type { Room } from "../../../../stores/enter-details/types"
|
||||
|
||||
export function getMemberPrice(roomRate: Product) {
|
||||
if ("member" in roomRate && roomRate.member) {
|
||||
return {
|
||||
@@ -11,3 +15,13 @@ export function getMemberPrice(roomRate: Product) {
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export function isDiscounted(room: Room): boolean {
|
||||
return !!(
|
||||
room.guest.join ||
|
||||
room.guest.membershipNo ||
|
||||
room.roomRate.rateDefinition.isCampaignRate ||
|
||||
room.roomRate.bookingCode ||
|
||||
isSpecialRate(room.roomRate)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user