mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-25 22:37:18 +10:00
Use updated BookingBreakdown component
This commit is contained in:
parent
770a487c4d
commit
6e40507ea8
4 changed files with 7 additions and 26 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { FormattedMessage } from '../../util/reactIntl';
|
||||
import classNames from 'classnames';
|
||||
import config from '../../config';
|
||||
import { DATE_TYPE_DATE } from '../../util/types';
|
||||
import { BookingBreakdown } from '../../components';
|
||||
|
||||
import css from './TransactionPanel.css';
|
||||
|
|
@ -16,15 +16,13 @@ const BreakdownMaybe = props => {
|
|||
|
||||
return loaded ? (
|
||||
<div className={classes}>
|
||||
<h3 className={css.bookingBreakdownTitle}>
|
||||
<FormattedMessage id="TransactionPanel.bookingBreakdownTitle" />
|
||||
</h3>
|
||||
<BookingBreakdown
|
||||
className={breakdownClasses}
|
||||
userRole={transactionRole}
|
||||
unitType={config.bookingUnitType}
|
||||
transaction={transaction}
|
||||
booking={transaction.booking}
|
||||
dateType={DATE_TYPE_DATE}
|
||||
/>
|
||||
</div>
|
||||
) : null;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import classNames from 'classnames';
|
|||
import config from '../../config';
|
||||
import routeConfiguration from '../../routeConfiguration';
|
||||
import { pathByRouteName, findRouteByRouteName } from '../../util/routes';
|
||||
import { propTypes, LINE_ITEM_NIGHT, LINE_ITEM_DAY } from '../../util/types';
|
||||
import { propTypes, LINE_ITEM_NIGHT, LINE_ITEM_DAY, DATE_TYPE_DATE } from '../../util/types';
|
||||
import {
|
||||
ensureListing,
|
||||
ensureCurrentUser,
|
||||
|
|
@ -586,6 +586,7 @@ export class CheckoutPageComponent extends Component {
|
|||
unitType={config.bookingUnitType}
|
||||
transaction={tx}
|
||||
booking={txBooking}
|
||||
dateType={DATE_TYPE_DATE}
|
||||
/>
|
||||
) : null;
|
||||
|
||||
|
|
@ -769,9 +770,6 @@ export class CheckoutPageComponent extends Component {
|
|||
</div>
|
||||
|
||||
<div className={css.priceBreakdownContainer}>
|
||||
<h3 className={css.priceBreakdownTitle}>
|
||||
<FormattedMessage id="CheckoutPage.priceBreakdownTitle" />
|
||||
</h3>
|
||||
{speculateTransactionErrorMessage}
|
||||
{breakdown}
|
||||
</div>
|
||||
|
|
@ -837,9 +835,6 @@ export class CheckoutPageComponent extends Component {
|
|||
<h2 className={css.detailsTitle}>{listingTitle}</h2>
|
||||
<p className={css.detailsSubtitle}>{detailsSubTitle}</p>
|
||||
</div>
|
||||
<h3 className={css.bookingBreakdownTitle}>
|
||||
<FormattedMessage id="CheckoutPage.priceBreakdownTitle" />
|
||||
</h3>
|
||||
{speculateTransactionErrorMessage}
|
||||
{breakdown}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -77,14 +77,7 @@ exports[`CheckoutPage matches snapshot 1`] = `
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>
|
||||
<FormattedMessage
|
||||
id="CheckoutPage.priceBreakdownTitle"
|
||||
values={Object {}}
|
||||
/>
|
||||
</h3>
|
||||
</div>
|
||||
<div />
|
||||
<section>
|
||||
<injectIntl(StripePaymentForm)
|
||||
authorDisplayName="author display name"
|
||||
|
|
@ -154,12 +147,6 @@ exports[`CheckoutPage matches snapshot 1`] = `
|
|||
55 CheckoutPage.perNight
|
||||
</p>
|
||||
</div>
|
||||
<h3>
|
||||
<FormattedMessage
|
||||
id="CheckoutPage.priceBreakdownTitle"
|
||||
values={Object {}}
|
||||
/>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</Page>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import Decimal from 'decimal.js';
|
|||
import { types as sdkTypes } from '../../util/sdkLoader';
|
||||
import { dateFromLocalToAPI, nightsBetween, daysBetween } from '../../util/dates';
|
||||
import { TRANSITION_REQUEST_PAYMENT, TX_TRANSITION_ACTOR_CUSTOMER } from '../../util/transaction';
|
||||
import { LINE_ITEM_DAY, LINE_ITEM_NIGHT, LINE_ITEM_UNITS } from '../../util/types';
|
||||
import { LINE_ITEM_DAY, LINE_ITEM_NIGHT, LINE_ITEM_UNITS, DATE_TYPE_DATE } from '../../util/types';
|
||||
import { unitDivisor, convertMoneyToNumber, convertUnitToSubUnit } from '../../util/currency';
|
||||
import { BookingBreakdown } from '../../components';
|
||||
|
||||
|
|
@ -136,6 +136,7 @@ const EstimatedBreakdownMaybe = props => {
|
|||
unitType={unitType}
|
||||
transaction={tx}
|
||||
booking={tx.booking}
|
||||
dateType={DATE_TYPE_DATE}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue