Review changes

This commit is contained in:
Vesa Luusua 2018-02-02 16:25:18 +02:00
parent 7551fec85e
commit cd0c3932bf
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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;

View file

@ -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",