@subiz/widget-v4 4.0.72 → 4.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,6 +46,7 @@ class Order extends common.Com {
46
46
  loading: true,
47
47
  order: {},
48
48
  err: {},
49
+ shipping_address: 'new',
49
50
  selectedProvince: null,
50
51
  selectedDistrict: null,
51
52
  selectedWard: null,
@@ -350,10 +351,7 @@ class Order extends common.Com {
350
351
 
351
352
  _defineProperty(this, "onCancel", () => {
352
353
  if (this.props.onResponse) this.props.onResponse('rejected');
353
- this.close();
354
- });
355
354
 
356
- _defineProperty(this, "close", () => {
357
355
  if (this.props.cid && !this.state.order.user_confirmation) {
358
356
  let order = _index.default.cloneDeep(this.state.order);
359
357
 
@@ -361,6 +359,10 @@ class Order extends common.Com {
361
359
  this.props.store.updateOrder(order);
362
360
  }
363
361
 
362
+ this.close();
363
+ });
364
+
365
+ _defineProperty(this, "close", () => {
364
366
  if (this.props.onClose) this.props.onClose();
365
367
  });
366
368
 
package/dist/132.js CHANGED
@@ -4101,6 +4101,7 @@ class order_Order extends common/* Com */.up {
4101
4101
  loading: true,
4102
4102
  order: {},
4103
4103
  err: {},
4104
+ shipping_address: 'new',
4104
4105
  selectedProvince: null,
4105
4106
  selectedDistrict: null,
4106
4107
  selectedWard: null,
@@ -4393,16 +4394,17 @@ class order_Order extends common/* Com */.up {
4393
4394
 
4394
4395
  order_defineProperty(this, "onCancel", () => {
4395
4396
  if (this.props.onResponse) this.props.onResponse('rejected');
4396
- this.close();
4397
- });
4398
4397
 
4399
- order_defineProperty(this, "close", () => {
4400
4398
  if (this.props.cid && !this.state.order.user_confirmation) {
4401
4399
  let order = util/* default.cloneDeep */.Z.cloneDeep(this.state.order);
4402
4400
  order.user_confirmation = 'rejected';
4403
4401
  this.props.store.updateOrder(order);
4404
4402
  }
4405
4403
 
4404
+ this.close();
4405
+ });
4406
+
4407
+ order_defineProperty(this, "close", () => {
4406
4408
  if (this.props.onClose) this.props.onClose();
4407
4409
  });
4408
4410
 
@@ -4472,7 +4474,7 @@ class order_Order extends common/* Com */.up {
4472
4474
  return null;
4473
4475
  let editmode = false;
4474
4476
 
4475
- if (!order.status || order.status == 'new') {
4477
+ if (!order.status || order.status == 'open') {
4476
4478
  editmode = !order.user_confirmation;
4477
4479
  }
4478
4480
 
@@ -4563,7 +4565,7 @@ class order_Order extends common/* Com */.up {
4563
4565
  renderDesktopShipping(order) {
4564
4566
  let editmode = false;
4565
4567
 
4566
- if (!order.status || order.status == 'new') {
4568
+ if (!order.status || order.status == 'open') {
4567
4569
  editmode = !order.user_confirmation;
4568
4570
  }
4569
4571
 
@@ -4864,7 +4866,7 @@ class order_Order extends common/* Com */.up {
4864
4866
  }, (0,preact_module.h)("div", null, "Ph\xED v\u1EADn chuy\u1EC3n"), (0,preact_module.h)("div", null, util/* default.get */.Z.get(order, 'shipping.fee', 0), " d"));
4865
4867
  let editmode = false;
4866
4868
 
4867
- if (!order.status || order.status == 'new') {
4869
+ if (!order.status || order.status == 'open') {
4868
4870
  editmode = !order.user_confirmation;
4869
4871
  }
4870
4872
 
@@ -4900,7 +4902,7 @@ class order_Order extends common/* Com */.up {
4900
4902
  }
4901
4903
 
4902
4904
  renderStatusBadge(order) {
4903
- let status = order.status || 'new';
4905
+ let status = order.status || 'open';
4904
4906
  return (0,preact_module.h)("div", {
4905
4907
  style: "float: right !important;",
4906
4908
  class: 'order_status order_status__' + status
@@ -4908,7 +4910,7 @@ class order_Order extends common/* Com */.up {
4908
4910
  }
4909
4911
 
4910
4912
  renderShippingInfo(order) {
4911
- if (order.status != 'new' || order.user_confirmation) {}
4913
+ if (order.status != 'open' || order.user_confirmation) {}
4912
4914
 
4913
4915
  let shipping_provider = util/* default.get */.Z.get(order, 'shipping.shipping_provider');
4914
4916
  if (!shipping_provider) return null;
@@ -5008,7 +5010,7 @@ class order_Order extends common/* Com */.up {
5008
5010
  let $products = null;
5009
5011
  let editmode = false;
5010
5012
 
5011
- if (!order.status || order.status == 'new') {
5013
+ if (!order.status || order.status == 'open') {
5012
5014
  editmode = !order.user_confirmation;
5013
5015
  }
5014
5016
 
@@ -5112,7 +5114,7 @@ class order_Order extends common/* Com */.up {
5112
5114
  onClick: this.onCancel
5113
5115
  }, this.props.t('cancel_order'));
5114
5116
 
5115
- if (order.user_confirmation || order.status != 'new') {
5117
+ if (order.user_confirmation || order.status != 'open') {
5116
5118
  $status = null;
5117
5119
  if (this.props.cid) $close = (0,preact_module.h)("div", {
5118
5120
  class: "order_btn order__btn__light mt-3",
@@ -5144,7 +5146,7 @@ class order_Order extends common/* Com */.up {
5144
5146
  let $actions = null;
5145
5147
  let editmode = false;
5146
5148
 
5147
- if (!order.status || order.status == 'new') {
5149
+ if (!order.status || order.status == 'open') {
5148
5150
  editmode = !order.user_confirmation;
5149
5151
  }
5150
5152