@things-factory/operato-mms 3.6.47 → 3.6.48

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.
@@ -458,58 +458,66 @@ class ShopeeOrderInitBatchPopup extends localize(i18next)(LitElement) {
458
458
  records = marketplaceOrders.map(itm => {
459
459
  switch (this._type) {
460
460
  case 'pickup':
461
- return {
462
- ...itm,
463
- rowOptionPickupAddress: {
464
- options: [
465
- {
466
- display: '',
467
- value: ''
468
- },
469
- ...itm.fullLogisticsDetail.logisticsDetail.pickup.map(pickup => {
470
- const addressDetail = {
471
- display: pickup.address + ' ,' + pickup.city + ' ,' + pickup.zipcode + ' ,' + pickup.state,
472
- value: pickup.addressId.toString(),
473
- timeSlot: pickup.timeSlot
474
- }
475
-
476
- if (!this.addressList.map(list => list.value).includes(addressDetail.value)) {
477
- this.addressList = Array.from(new Set([...this.addressList, addressDetail]))
478
- }
479
-
480
- return addressDetail
481
- })
482
- ]
461
+ if (itm.fullLogisticsDetail?.pickup?.length > 0) {
462
+ return {
463
+ ...itm,
464
+ rowOptionPickupAddress: {
465
+ options: [
466
+ {
467
+ display: '',
468
+ value: ''
469
+ },
470
+ ...itm.fullLogisticsDetail.logisticsDetail.pickup.map(pickup => {
471
+ const addressDetail = {
472
+ display: pickup.address + ' ,' + pickup.city + ' ,' + pickup.zipcode + ' ,' + pickup.state,
473
+ value: pickup.addressId.toString(),
474
+ timeSlot: pickup.timeSlot
475
+ }
476
+
477
+ if (!this.addressList.map(list => list.value).includes(addressDetail.value)) {
478
+ this.addressList = Array.from(new Set([...this.addressList, addressDetail]))
479
+ }
480
+
481
+ return addressDetail
482
+ })
483
+ ]
484
+ }
483
485
  }
486
+ } else {
487
+ return
484
488
  }
485
489
 
486
490
  case 'dropoff':
487
- return {
488
- ...itm,
489
- requiredBranch: itm.fullLogisticsDetail.dropoff.includes('branch_id'),
490
- requiredSender: itm.fullLogisticsDetail.dropoff.includes('sender_real_name'),
491
- requiredTracking: itm.fullLogisticsDetail.dropoff.includes('tracking_no'),
492
- rowOptionDropoffBranch: {
493
- options: [
494
- {
495
- display: '',
496
- value: ''
497
- },
498
- ...itm.fullLogisticsDetail.logisticsDetail.dropoff.map(dropoff => {
499
- const addressDetail = {
500
- display:
501
- dropoff.address + ' ,' + dropoff.city + ' ,' + dropoff.zipcode + ' ,' + dropoff.state,
502
- value: dropoff.branchId.toString()
503
- }
504
-
505
- if (!this.addressList.map(list => list.value).includes(addressDetail.value)) {
506
- this.addressList = Array.from(new Set([...this.addressList, addressDetail]))
507
- }
508
-
509
- return addressDetail
510
- })
511
- ]
491
+ if (itm.fullLogisticsDetail?.dropoff?.length > 0) {
492
+ return {
493
+ ...itm,
494
+ requiredBranch: itm.fullLogisticsDetail.dropoff.includes('branch_id'),
495
+ requiredSender: itm.fullLogisticsDetail.dropoff.includes('sender_real_name'),
496
+ requiredTracking: itm.fullLogisticsDetail.dropoff.includes('tracking_no'),
497
+ rowOptionDropoffBranch: {
498
+ options: [
499
+ {
500
+ display: '',
501
+ value: ''
502
+ },
503
+ ...itm.fullLogisticsDetail.logisticsDetail.dropoff.map(dropoff => {
504
+ const addressDetail = {
505
+ display:
506
+ dropoff.address + ' ,' + dropoff.city + ' ,' + dropoff.zipcode + ' ,' + dropoff.state,
507
+ value: dropoff.branchId.toString()
508
+ }
509
+
510
+ if (!this.addressList.map(list => list.value).includes(addressDetail.value)) {
511
+ this.addressList = Array.from(new Set([...this.addressList, addressDetail]))
512
+ }
513
+
514
+ return addressDetail
515
+ })
516
+ ]
517
+ }
512
518
  }
519
+ } else {
520
+ return
513
521
  }
514
522
 
515
523
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-mms",
3
- "version": "3.6.47",
3
+ "version": "3.6.48",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -61,7 +61,7 @@
61
61
  "@things-factory/integration-fulfillment": "^3.6.47",
62
62
  "@things-factory/integration-lmd": "^3.6.47",
63
63
  "@things-factory/lite-menu": "^3.6.47",
64
- "@things-factory/marketplace-base": "^3.6.47",
64
+ "@things-factory/marketplace-base": "^3.6.48",
65
65
  "@things-factory/more-ui": "^3.6.45",
66
66
  "@things-factory/notification": "^3.6.47",
67
67
  "@things-factory/oauth2-client": "^3.6.47",
@@ -99,11 +99,11 @@
99
99
  "@things-factory/scene-wheel-sorter": "^3.6.45",
100
100
  "@things-factory/setting-ui": "^3.6.47",
101
101
  "@things-factory/system-ui": "^3.6.45",
102
- "@things-factory/warehouse-base": "^3.6.47"
102
+ "@things-factory/warehouse-base": "^3.6.48"
103
103
  },
104
104
  "devDependencies": {
105
105
  "@things-factory/builder": "^3.6.45",
106
106
  "@types/node-fetch": "^2.5.7"
107
107
  },
108
- "gitHead": "64fc0d782f85fd2fe99893bbf209540fcc2dc0e8"
108
+ "gitHead": "1d70b4e6eee41c8b81a59cffe816de546d64cfa8"
109
109
  }