mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Fix breakdown unit count in daily bookings
This commit is contained in:
parent
6c643f70f2
commit
12b47968d5
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { FormattedMessage, FormattedHTMLMessage, FormattedDate } from 'react-intl';
|
||||
import moment from 'moment';
|
||||
import { LINE_ITEM_NIGHT, propTypes } from '../../util/types';
|
||||
import { LINE_ITEM_NIGHT, LINE_ITEM_DAY, propTypes } from '../../util/types';
|
||||
import { daysBetween } from '../../util/dates';
|
||||
|
||||
import css from './BookingBreakdown.css';
|
||||
|
|
@ -42,7 +42,7 @@ const LineItemBookingPeriod = props => {
|
|||
|
||||
const { start: startDate, end: endDateRaw } = booking.attributes;
|
||||
const isNightly = unitType === LINE_ITEM_NIGHT;
|
||||
const isDaily = unitType === LINE_ITEM_NIGHT;
|
||||
const isDaily = unitType === LINE_ITEM_DAY;
|
||||
|
||||
const dayCount = daysBetween(startDate, endDateRaw);
|
||||
const isSingleDay = !isNightly && dayCount === 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue