[state, states.order[state]])}
- placeholder={'Order state'}
+ placeholder="Order state"
value={order.orderState}
onChange={this.onStateChange}
- changeable={false}
- renderNullTitle={(value, placeholder) => {
- if (value in states.order) {
- return states.order[value];
- }
- return placeholder;
- }}
+ stateless
/>
);
}
@@ -205,11 +193,10 @@ export default class Order extends React.Component {
const order = this.order;
const claims = getClaims();
const shippingState = isPermitted(shippingClaims, claims)
- ? (
-
-
-
- ) : null;
+ ? (
+
+ )
+ : null;
return (
diff --git a/ashes/src/components/products/custom-property.jsx b/ashes/src/components/products/custom-property.jsx
index 75fd492c7d..b6b5a45e8d 100644
--- a/ashes/src/components/products/custom-property.jsx
+++ b/ashes/src/components/products/custom-property.jsx
@@ -6,10 +6,11 @@
import React, { Component, Element } from 'react';
import { autobind } from 'core-decorators';
import _ from 'lodash';
+import classNames from 'classnames';
// components
import Modal from 'components/core/modal';
-import { Dropdown } from 'components/dropdown';
+import { TextDropdown } from 'components/core/dropdown';
import { FormField } from 'components/forms';
import SaveCancel from 'components/core/save-cancel';
import TextInput from 'components/core/text-input';
@@ -112,9 +113,8 @@ export default class CustomProperty extends Component {
label="Field Type"
labelClassName="fc-product-details__field-label"
>
- [entry.type, entry.title]);
return (
- {item.title};
- }
+ },
};
type Props = {
- onChange: (attrs: Object) => any;
- attr: string;
- descriptions: Array;
- discount: Object;
- dropdownId: string;
- blockId: string;
+ onChange: (attrs: Object) => any,
+ attr: string,
+ descriptions: Array,
+ discount: Object,
+ dropdownId: string,
+ blockId: string,
};
const DiscountAttrs = (props: Props) => {
@@ -67,9 +67,9 @@ const DiscountAttrs = (props: Props) => {
});
};
const setType = (type: any) => {
- const newDiscountParams = attrs[type] || _.find(props.descriptions, {type}).default || {};
+ const newDiscountParams = attrs[type] || _.find(props.descriptions, { type }).default || {};
props.onChange({
- [type]: newDiscountParams
+ [type]: newDiscountParams,
});
};
diff --git a/ashes/src/components/promotions/discounts/discounts.css b/ashes/src/components/promotions/discounts/discounts.css
index 8510f82164..feff01d5cb 100644
--- a/ashes/src/components/promotions/discounts/discounts.css
+++ b/ashes/src/components/promotions/discounts/discounts.css
@@ -1,10 +1,5 @@
@import 'variables.css';
-.discount_qualifier :global .autowidth_dd {
- width: auto;
- margin-right: 10px;
-}
-
.discount_qualifier :global .inline-container {
display: inline-block;
vertical-align: top;
diff --git a/ashes/src/components/promotions/discounts/index.jsx b/ashes/src/components/promotions/discounts/index.jsx
index 2e22041e1d..5e4da565d3 100644
--- a/ashes/src/components/promotions/discounts/index.jsx
+++ b/ashes/src/components/promotions/discounts/index.jsx
@@ -1,7 +1,9 @@
+// @todo this file not used anywhere
+
import _ from 'lodash';
import React, { Component } from 'react';
import { autobind } from 'core-decorators';
-import { Dropdown } from '../../dropdown';
+import { TextDropdown } from 'components/core/dropdown';
import Currency from 'components/utils/currency';
import Counter from './counter';
@@ -136,12 +138,7 @@ export default class Discounts extends Component {
@autobind
renderDiscount() {
return (
-
+
);
}
@@ -149,14 +146,8 @@ export default class Discounts extends Component {
renderQualifier() {
let discountType = this.qualifier.discountType;
let items = _.find(QUALIFIER_TYPES, i => i.scope == discountType).list;
- return (
-
- );
+
+ return ;
}
@autobind
@@ -252,12 +243,7 @@ export default class Discounts extends Component {
onChange={this.toggleExGiftCardOffer}
/>
-
+
);
}
diff --git a/ashes/src/components/promotions/promotion-form.jsx b/ashes/src/components/promotions/promotion-form.jsx
index 417bbe7744..1a3ac54a5f 100644
--- a/ashes/src/components/promotions/promotion-form.jsx
+++ b/ashes/src/components/promotions/promotion-form.jsx
@@ -120,11 +120,11 @@ export default class PromotionForm extends ObjectDetails {
const makeKey = prefix => `${prefix}-${disc.id || index}`;
return [
...acc,
- Qualifier
,
+ Qualifier promotion
,
Offer