Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store Orders: Edit customer info on an order #18579

Merged
merged 9 commits into from
Oct 11, 2017
Prev Previous commit
Next Next commit
Update proptypes & defaults
  • Loading branch information
ryelle committed Oct 9, 2017
commit 83f439f00c882bb3d9c2157c2f705c35b910efb1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class CustomerAddressDialog extends Component {
closeDialog: PropTypes.func,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want updateAddress() here along with a default below?

isBilling: PropTypes.bool,
isVisible: PropTypes.bool,
updateAddress: PropTypes.func.isRequired,
};

static defaultProps = {
Expand All @@ -60,6 +61,7 @@ class CustomerAddressDialog extends Component {
closeDialog: noop,
isBilling: false,
isVisible: false,
updateAddress: noop,
};

constructor( props ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ import SectionHeader from 'components/section-header';

class OrderCustomerInfo extends Component {
static propTypes = {
editOrder: PropTypes.func.isRequired,
isEditing: PropTypes.bool,
orderId: PropTypes.number.isRequired,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, I know, me and my proptype comments 😆 isEditing, site, and siteId are now being passed in the connect - though looks like site isn't being used, only the id.

order: PropTypes.shape( {
billing: PropTypes.object.isRequired,
shipping: PropTypes.object.isRequired,
} ),
siteId: PropTypes.number.isRequired,
};

state = {
Expand Down