Fix/remove old select rate * remove old select-rate * Fix imports * renamed SelectRate2 -> SelectRate
14 lines
403 B
TypeScript
14 lines
403 B
TypeScript
import type { RoomRate } from "@/types/components/hotelReservation/enterDetails/details"
|
|
|
|
export function getMemberPrice(roomRate: RoomRate) {
|
|
if ("member" in roomRate && roomRate.member) {
|
|
return {
|
|
amount: roomRate.member.localPrice.pricePerStay,
|
|
currency: roomRate.member.localPrice.currency,
|
|
pricePerNight: roomRate.member.localPrice.pricePerNight,
|
|
}
|
|
}
|
|
|
|
return null
|
|
}
|