mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 03:43:28 +10:00
Review changes
This commit is contained in:
parent
7551fec85e
commit
cd0c3932bf
3 changed files with 3 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ const LineItemUnitPrice = props => {
|
|||
const isDaily = unitType === LINE_ITEM_DAY;
|
||||
const translationKey = isNightly
|
||||
? 'BookingBreakdown.pricePerNight'
|
||||
: isDaily ? 'BookingBreakdown.pricePerDay' : 'BookingBreakdown.pricePerUnit';
|
||||
: isDaily ? 'BookingBreakdown.pricePerDay' : 'BookingBreakdown.pricePerQuantity';
|
||||
|
||||
const unitPurchase = transaction.attributes.lineItems.find(
|
||||
item => item.code === unitType && !item.reversal
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ const estimatedTransaction = (unitType, bookingStart, bookingEnd, unitPrice, qua
|
|||
|
||||
const estimatedBreakdown = (unitType, bookingStart, bookingEnd, unitPrice, quantity) => {
|
||||
const isUnits = unitType === LINE_ITEM_UNITS;
|
||||
const quantityIfUsingUnits = !isUnits || !Number.isInteger(quantity);
|
||||
const quantityIfUsingUnits = !isUnits || Number.isInteger(quantity);
|
||||
const canEstimatePrice = bookingStart && bookingEnd && unitPrice && quantityIfUsingUnits;
|
||||
if (!canEstimatePrice) {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
"BookingBreakdown.nightCount": "{count, number} {count, plural, one {night} other {nights}}",
|
||||
"BookingBreakdown.pricePerDay": "Price per day",
|
||||
"BookingBreakdown.pricePerNight": "Price per night",
|
||||
"BookingBreakdown.pricePerUnit": "Price per person",
|
||||
"BookingBreakdown.pricePerQuantity": "Price per person",
|
||||
"BookingBreakdown.providerTotalCanceled": "Total price",
|
||||
"BookingBreakdown.providerTotalDeclined": "You would have made",
|
||||
"BookingBreakdown.providerTotalDefault": "You'll make",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue