mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Update Prettier
This commit is contained in:
parent
c49c3bb1a0
commit
ae1f89c7b7
7 changed files with 28 additions and 9 deletions
|
|
@ -11,7 +11,9 @@ const LineItemUnitPrice = props => {
|
|||
const isDaily = unitType === LINE_ITEM_DAY;
|
||||
const translationKey = isNightly
|
||||
? 'BookingBreakdown.pricePerNight'
|
||||
: isDaily ? 'BookingBreakdown.pricePerDay' : 'BookingBreakdown.pricePerQuantity';
|
||||
: isDaily
|
||||
? 'BookingBreakdown.pricePerDay'
|
||||
: 'BookingBreakdown.pricePerQuantity';
|
||||
|
||||
const unitPurchase = transaction.attributes.lineItems.find(
|
||||
item => item.code === unitType && !item.reversal
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@ const EditListingLocationPanel = props => {
|
|||
initialValues={initialSearchFormValues}
|
||||
onSubmit={values => {
|
||||
const { building = '', location } = values;
|
||||
const { selectedPlace: { address, origin } } = location;
|
||||
const {
|
||||
selectedPlace: { address, origin },
|
||||
} = location;
|
||||
const updateValues = {
|
||||
geolocation: origin,
|
||||
publicData: {
|
||||
|
|
|
|||
|
|
@ -118,7 +118,10 @@ class CurrencyInputComponent extends Component {
|
|||
onInputBlur(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const { currencyConfig, input: { onBlur } } = this.props;
|
||||
const {
|
||||
currencyConfig,
|
||||
input: { onBlur },
|
||||
} = this.props;
|
||||
this.setState(prevState => {
|
||||
if (onBlur) {
|
||||
// If parent component has provided onBlur function, call it with current price.
|
||||
|
|
@ -134,7 +137,10 @@ class CurrencyInputComponent extends Component {
|
|||
onInputFocus(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const { currencyConfig, input: { onFocus } } = this.props;
|
||||
const {
|
||||
currencyConfig,
|
||||
input: { onFocus },
|
||||
} = this.props;
|
||||
this.setState(prevState => {
|
||||
if (onFocus) {
|
||||
// If parent component has provided onFocus function, call it with current price.
|
||||
|
|
|
|||
|
|
@ -108,7 +108,12 @@ class TokenInputFieldComponent extends Component {
|
|||
* @param {Object} values - values from different input types
|
||||
*/
|
||||
requestToken(values) {
|
||||
const { country, currency, input: { onChange }, intl } = this.props;
|
||||
const {
|
||||
country,
|
||||
currency,
|
||||
input: { onChange },
|
||||
intl,
|
||||
} = this.props;
|
||||
|
||||
// First we have to clear the current token value so the parent
|
||||
// form doesn't submit with an old value.
|
||||
|
|
|
|||
|
|
@ -99,7 +99,9 @@ export const AddressLinkMaybe = props => {
|
|||
const { lat, lng } = geolocation || {};
|
||||
const hrefToGoogleMaps = geolocation
|
||||
? `https://maps.google.com/?q=${lat},${lng}`
|
||||
: address ? `https://maps.google.com/?q=${encodeURIComponent(address)}` : null;
|
||||
: address
|
||||
? `https://maps.google.com/?q=${encodeURIComponent(address)}`
|
||||
: null;
|
||||
|
||||
const fullAddress =
|
||||
typeof building === 'string' && building.length > 0 ? `${building}, ${address}` : address;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,9 @@ const estimatedTransaction = (unitType, bookingStart, bookingEnd, unitPrice, qua
|
|||
|
||||
const unitCount = isNightly
|
||||
? nightsBetween(bookingStart, bookingEnd)
|
||||
: isDaily ? daysBetween(bookingStart, bookingEnd) : quantity;
|
||||
: isDaily
|
||||
? daysBetween(bookingStart, bookingEnd)
|
||||
: quantity;
|
||||
|
||||
const totalPrice = estimatedTotalPrice(unitPrice, unitCount);
|
||||
|
||||
|
|
|
|||
|
|
@ -6498,8 +6498,8 @@ preserve@^0.2.0:
|
|||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||
|
||||
prettier@^1.11.1:
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75"
|
||||
version "1.12.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325"
|
||||
|
||||
pretty-bytes@^4.0.2:
|
||||
version "4.0.2"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue