@things-factory/operato-wms 4.3.155 → 4.3.156

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.
Files changed (27) hide show
  1. package/client/pages/bulk-operation/bulk-operation.js +1 -1
  2. package/client/pages/bulk-operation/validate-gan-popup.js +18 -1
  3. package/client/pages/components/select-inventory-popup.js +2 -2
  4. package/client/pages/components/select-product-popup.js +35 -6
  5. package/client/pages/constants/adjustment-code.js +30 -0
  6. package/client/pages/constants/index.js +1 -0
  7. package/client/pages/constants/order.js +6 -4
  8. package/client/pages/inventory/inventory-adjustment-approval.js +67 -0
  9. package/client/pages/inventory/inventory-adjustment.js +106 -12
  10. package/client/pages/order/arrival-notice/arrival-notice-detail.js +7 -0
  11. package/client/pages/order/arrival-notice/create-arrival-notice.js +38 -4
  12. package/client/pages/order/arrival-notice/edit-product-popup.js +4 -1
  13. package/client/pages/order/arrival-notice/proceed-edit-product-popup.js +5 -1
  14. package/client/pages/order/arrival-notice/view-product-changes-popup.js +3 -0
  15. package/client/pages/outbound/inventory-reassign-popup.js +18 -2
  16. package/client/pages/outbound/picking-product.js +20 -16
  17. package/client/pages/outbound/worksheet-batch-picking.js +10 -1
  18. package/client/pages/outbound/worksheet-picking.js +10 -2
  19. package/config.development.js +28 -35
  20. package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +8 -9
  21. package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -1
  22. package/package.json +50 -50
  23. package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +8 -9
  24. package/translations/en.json +6 -0
  25. package/translations/ko.json +7 -1
  26. package/translations/ms.json +7 -1
  27. package/translations/zh.json +7 -1
@@ -719,7 +719,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
719
719
  type: 'float',
720
720
  name: 'unitPrice',
721
721
  header: i18next.t('field.unit_price'),
722
- imex: { header: i18next.t('field.unit_price'), key: 'unitPrice', width: 25, type: 'float' },
722
+ imex: { header: i18next.t('field.unit_price'), key: 'unitPrice', width: 25, type: 'string' },
723
723
  record: { editable: editable },
724
724
  sortable: true,
725
725
  width: 80
@@ -871,6 +871,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
871
871
  }
872
872
 
873
873
  if (changedColumn === 'unitPrice') {
874
+ changeRecord.unitPrice = changeRecord.unitPrice.toFixed(2)
874
875
  let unitPrice = changeRecord.unitPrice
875
876
  if (typeof unitPrice === undefined || unitPrice < 0 || isNaN(unitPrice)) {
876
877
  throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.unit_price') } }))
@@ -1313,6 +1314,9 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1313
1314
 
1314
1315
  _getOrderProducts() {
1315
1316
  return this.productGrist.dirtyData.records.map(record => {
1317
+ if (record.unitPrice) {
1318
+ record.unitPrice = parseFloat(record.unitPrice)
1319
+ }
1316
1320
  let orderProduct = {
1317
1321
  batchId: record.batchId,
1318
1322
  batchIdRef: record?.batchIdRef ? record.batchIdRef : null,
@@ -1663,6 +1667,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1663
1667
  brand
1664
1668
  primaryUnit
1665
1669
  primaryValue
1670
+ costPrice
1666
1671
  }
1667
1672
  productDetail {
1668
1673
  id
@@ -1679,10 +1684,20 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1679
1684
  if (!foundErrors) {
1680
1685
  if (!response.errors) {
1681
1686
  const data = response.data.bulkUploadValidateOrderProducts.map(item => {
1687
+ let unitPrice = item.unitPrice
1688
+ if (item.unitPrice != null) {
1689
+ unitPrice = item.unitPrice
1690
+ }
1691
+ if (item.unitPrice == null && item.unitPrice != 0) {
1692
+ unitPrice = item.product.costPrice
1693
+ if (item.product.costPrice == null) {
1694
+ unitPrice = 0
1695
+ }
1696
+ }
1682
1697
  return {
1683
1698
  ...item,
1684
1699
  productName: item?.productName,
1685
- unitPrice: parseFloat(item.unitPrice) || '',
1700
+ unitPrice: unitPrice.toFixed(2) || 0,
1686
1701
  packQty: parseFloat(item.packQty) || '',
1687
1702
  palletQty: parseFloat(item.palletQty) || ''
1688
1703
  }
@@ -1708,7 +1723,6 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1708
1723
  async importHandler(patches) {
1709
1724
  try {
1710
1725
  patches.map(itm => {
1711
- itm.unitPrice = parseFloat(itm.unitPrice) || ''
1712
1726
  if (itm.manufactureDate) {
1713
1727
  let mdt = new Date(itm.manufactureDate)
1714
1728
  itm.manufactureDate =
@@ -1722,10 +1736,18 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1722
1736
  })
1723
1737
 
1724
1738
  const orderProducts = patches.map(patch => {
1739
+ let unitPrice = patch.unitPrice
1740
+ if (patch.unitPrice == null) {
1741
+ unitPrice = null
1742
+ }
1743
+ if (patch.unitPrice != null) {
1744
+ unitPrice = parseFloat(unitPrice)
1745
+ }
1725
1746
  delete patch.cuFlag
1747
+ // delete patch.costPrice
1726
1748
  return {
1727
1749
  ...patch,
1728
- unitPrice: parseFloat(patch.unitPrice) || 0,
1750
+ unitPrice: unitPrice,
1729
1751
  uomValue: parseFloat(patch.uomValue) || 0,
1730
1752
  packQty: parseInt(patch.packQty) || 0,
1731
1753
  palletQty: parseInt(patch.palletQty) || 0
@@ -1749,6 +1771,18 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1749
1771
  records = records
1750
1772
  .filter(record => record.productSKU)
1751
1773
  .map(record => {
1774
+ if (record.unitPrice) {
1775
+ //here
1776
+ record.unitPrice = parseFloat(record.unitPrice)
1777
+ record.unitPrice = record.unitPrice.toFixed(2)
1778
+ }
1779
+ if (!record.unitPrice && record.unitPrice != 0) {
1780
+ if (record.unitPrice == NaN) {
1781
+ record.unitPrice = NaN
1782
+ } else {
1783
+ record.unitPrice = null
1784
+ }
1785
+ }
1752
1786
  return {
1753
1787
  ...record
1754
1788
  }
@@ -431,6 +431,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
431
431
 
432
432
  if (changedColumn === 'unitPrice') {
433
433
  let unitPrice = changeRecord.unitPrice
434
+ changeRecord.unitPrice = changeRecord.unitPrice.toFixed(2)
434
435
  if (typeof unitPrice === undefined || unitPrice < 0 || isNaN(unitPrice)) {
435
436
  throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.unit_price') } }))
436
437
  }
@@ -644,6 +645,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
644
645
 
645
646
  _getNewOrderProducts() {
646
647
  return this.addProductGrist.dirtyData.records.map(record => {
648
+ record.unitPrice = parseFloat(record.unitPrice)
647
649
  return {
648
650
  batchId: `N/A`,
649
651
  adjustedBatchId: record.batchId,
@@ -677,6 +679,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
677
679
  let editedOrderProducts = []
678
680
  if (this.editProductGrist.dirtyData.records.some(record => record.__dirty__)) {
679
681
  this.editProductGrist.dirtyData.records.map(record => {
682
+ record.unitPrice = parseFloat(record.unitPrice)
680
683
  editedOrderProducts.push({
681
684
  id: record.id,
682
685
  adjustedBatchId: record.batchId === record.__origin__.batchId ? null : record.batchId,
@@ -690,7 +693,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
690
693
  adjustedPackQty: record.packQty == record.__origin__.packQty ? null : record.packQty,
691
694
  adjustedTotalUomValue: record.totalUomValue == record.__origin__.totalUomValue ? null : record.totalUomValue,
692
695
  manufactureDate: record?.manufactureDate ? record.manufactureDate : null,
693
- adjustedUnitPrice: record?.unitPrice ? record.__origin__.unitPrice : null,
696
+ adjustedUnitPrice: record?.unitPrice ? record.unitPrice : null,
694
697
  remark: record?.remark ? record.remark : null
695
698
  })
696
699
  })
@@ -135,6 +135,9 @@ export class ProceedEditProductPopup extends localize(i18next)(LitElement) {
135
135
  if (changedProps.has('data')) {
136
136
  this.approvedData = {
137
137
  ...this.data,
138
+ records: this.data.records.map(item => {
139
+ item.adjustedUnitPrice = item.adjustedUnitPrice.toFixed(2)
140
+ }),
138
141
  records: this.data.records.filter(
139
142
  item => item.status === ORDER_PRODUCT_STATUS.ADDED.value || item.status === ORDER_PRODUCT_STATUS.EDITED.value
140
143
  )
@@ -162,7 +165,8 @@ export class ProceedEditProductPopup extends localize(i18next)(LitElement) {
162
165
  'adjustedTotalUomValue',
163
166
  'batchIdRef',
164
167
  'adjustedBatchIdRef',
165
- 'unitPrice'
168
+ 'unitPrice',
169
+ 'adjustedUnitPrice'
166
170
  ]
167
171
  },
168
172
  pagination: { infinite: true },
@@ -100,6 +100,9 @@ export class ViewProductChangesPopup extends localize(i18next)(LitElement) {
100
100
  if (changedProps.has('data')) {
101
101
  this.productData = {
102
102
  ...this.data,
103
+ records: this.data.records.map(item => {
104
+ item.adjustedUnitPrice = item.adjustedUnitPrice.toFixed(2)
105
+ }),
103
106
  records: this.data.records.filter(
104
107
  item => item.status === ORDER_PRODUCT_STATUS.ADDED.value || item.status === ORDER_PRODUCT_STATUS.EDITED.value
105
108
  )
@@ -420,6 +420,12 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
420
420
  name: 'batchIdRef',
421
421
  header: i18next.t('field.batch_no_ref'),
422
422
  width: 100
423
+ },
424
+ {
425
+ type: 'boolean',
426
+ name: 'obsolete',
427
+ header: i18next.t('field.obsolete'),
428
+ width: 60
423
429
  }
424
430
  ]
425
431
  }
@@ -584,6 +590,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
584
590
  uom
585
591
  uomValue
586
592
  lockedUomValue
593
+ obsolete
587
594
  product {
588
595
  id
589
596
  name
@@ -613,7 +620,11 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
613
620
  })
614
621
 
615
622
  if (!response.errors) {
623
+ let isObsolete
616
624
  const data = response.data.orderInventories.items.map(item => {
625
+ if (item.inventory.obsolete) {
626
+ isObsolete = true
627
+ }
617
628
  return {
618
629
  ...item,
619
630
  product: item.inventory.product,
@@ -624,13 +635,18 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
624
635
  remainQty: Math.round(item.inventory.qty - item.inventory.lockedQty),
625
636
  remainUomValue: Math.round(item.inventory.uomValue - item.inventory.lockedUomValue),
626
637
  remainUomValueWithUom: `${item.inventory.uomValue - item.inventory.lockedUomValue} ${item.inventory.uom}`,
627
- notReassignable: item?.pickedQty ? true : false
638
+ notReassignable: item?.pickedQty && !isObsolete ? true : false
628
639
  }
629
640
  })
630
641
  this.orderInventoryData = {
631
642
  records: data
632
643
  }
633
644
 
645
+ this.orderProductGrist.data.records.map(itm => {
646
+ if (itm.id == this._selectedOrderProduct.id) {
647
+ itm.obsolete = isObsolete
648
+ }
649
+ })
634
650
  this._updateOrderInventoryConfig()
635
651
  }
636
652
  }
@@ -689,7 +705,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
689
705
  throw new Error(i18next.t('text.available_quantity_insufficient'))
690
706
  }
691
707
  } else {
692
- if (changeRecord.releaseQty > remainQty) {
708
+ if (changeRecord.releaseQty > changeRecord.remainQty) {
693
709
  throw new Error(i18next.t('text.available_quantity_insufficient'))
694
710
  }
695
711
  }
@@ -1809,25 +1809,29 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1809
1809
  }
1810
1810
 
1811
1811
  if (!response.errors) {
1812
- this.clearView()
1813
- this._orderNo = ''
1814
- this._bizplaceName = ''
1815
- this._currentBinLocation = ''
1816
- this._selectedOrderInventory = null
1817
- await CustomAlert({
1818
- title: i18next.t('title.picking'),
1819
- text: i18next.t('text.picking_is_completed'),
1820
- confirmButton: { text: i18next.t('button.confirm') }
1821
- })
1812
+ if (!response.data.completePicking) {
1813
+ showToast({ message: i18next.t('text.obsolete_inventory_found_please_reassign') })
1814
+ } else {
1815
+ this.clearView()
1816
+ this._orderNo = ''
1817
+ this._bizplaceName = ''
1818
+ this._currentBinLocation = ''
1819
+ this._selectedOrderInventory = null
1820
+ await CustomAlert({
1821
+ title: i18next.t('title.picking'),
1822
+ text: i18next.t('text.picking_is_completed'),
1823
+ confirmButton: { text: i18next.t('button.confirm') }
1824
+ })
1822
1825
 
1823
- if (!this.orderNo) {
1824
- if (this.refPickingType === PICKING_TYPES.PICKING.value) {
1825
- this.releaseGoodNoInput.value = ''
1826
- } else {
1827
- this.taskNoInput.value = ''
1826
+ if (!this.orderNo) {
1827
+ if (this.refPickingType === PICKING_TYPES.PICKING.value) {
1828
+ this.releaseGoodNoInput.value = ''
1829
+ } else {
1830
+ this.taskNoInput.value = ''
1831
+ }
1828
1832
  }
1833
+ this.updateContext()
1829
1834
  }
1830
- this.updateContext()
1831
1835
  }
1832
1836
  }
1833
1837
 
@@ -353,6 +353,12 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
353
353
  name: 'releaseUomValue',
354
354
  header: i18next.t('field.release_uom_value'),
355
355
  width: 60
356
+ },
357
+ {
358
+ type: 'boolean',
359
+ name: 'obsolete',
360
+ header: i18next.t('field.obsolete'),
361
+ width: 60
356
362
  }
357
363
  ]
358
364
  }
@@ -469,7 +475,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
469
475
 
470
476
  get activatable() {
471
477
  if (this.productGristData?.records.every(record => record.completed)) {
472
- return this._worksheetStatus === WORKSHEET_STATUS.DEACTIVATED.value
478
+ return this._worksheetStatus === WORKSHEET_STATUS.DEACTIVATED.value && !this.worksheetDetailData.obsolete
473
479
  }
474
480
  }
475
481
 
@@ -527,6 +533,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
527
533
  palletId
528
534
  cartonId
529
535
  uom
536
+ obsolete
530
537
  location {
531
538
  name
532
539
  description
@@ -787,6 +794,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
787
794
  packingType
788
795
  packingSize
789
796
  uom
797
+ obsolete
790
798
  product {
791
799
  name
792
800
  sku
@@ -877,6 +885,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
877
885
  cartonId
878
886
  batchId
879
887
  packingType
888
+ obsolete
880
889
  warehouse {
881
890
  name
882
891
  description
@@ -517,6 +517,12 @@ class WorksheetPicking extends localize(i18next)(PageView) {
517
517
  name: 'releaseUomValueWithUom',
518
518
  header: i18next.t('field.release_uom_value'),
519
519
  width: 60
520
+ },
521
+ {
522
+ type: 'boolean',
523
+ name: 'obsolete',
524
+ header: i18next.t('field.obsolete'),
525
+ width: 60
520
526
  }
521
527
  ]
522
528
  }
@@ -698,6 +704,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
698
704
  palletId
699
705
  cartonId
700
706
  uom
707
+ obsolete
701
708
  location {
702
709
  name
703
710
  description
@@ -920,6 +927,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
920
927
  packingType
921
928
  packingSize
922
929
  uom
930
+ obsolete
923
931
  product {
924
932
  sku
925
933
  name
@@ -996,7 +1004,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
996
1004
  batchId
997
1005
  batchIdRef
998
1006
  packingType
999
-
1007
+ obsolete
1000
1008
  warehouse {
1001
1009
  name
1002
1010
  description
@@ -1106,7 +1114,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1106
1114
  this._worksheetStatus === WORKSHEET_STATUS.DEACTIVATED.value
1107
1115
  )
1108
1116
  } else {
1109
- return this._worksheetStatus === WORKSHEET_STATUS.DEACTIVATED.value
1117
+ return this._worksheetStatus === WORKSHEET_STATUS.DEACTIVATED.value && !this.worksheetDetailData.obsolete
1110
1118
  }
1111
1119
  }
1112
1120
  }
@@ -4,45 +4,33 @@ module.exports = {
4
4
  useVirtualHostBasedDomain: false,
5
5
  fallbackRoute: '/',
6
6
  subdomainOffset: 2,
7
- port: 4000,
8
- inspect: '9330',
7
+ port: 1100,
8
+ inspect: '9430',
9
+ // ormconfig: {
10
+ // name: 'default',
11
+ // type: 'postgres',
12
+ // database: 'dev',
13
+ // username: 'postgres',
14
+ // password: 'hatio',
15
+ // host: '192.168.0.153',
16
+ // port: 15432,
17
+ // synchronize: true,
18
+ // logging: false
19
+ // },
9
20
  ormconfig: {
10
21
  name: 'default',
11
22
  type: 'postgres',
12
- database: 'postgres',
23
+ database: 'dev',
13
24
  username: 'postgres',
14
- password: 'hatio',
15
- host: 'localhost',
16
- port: 15432,
25
+ password: 'abcd1234',
26
+ host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
27
+ port: 55432,
17
28
  synchronize: true,
18
29
  logging: true
19
30
  },
20
- // ormconfig: {
21
- // name: 'default',
22
- // type: 'postgres',
23
- // host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
24
- // port: 55432,
25
- // database: 'dev2',
26
- // username: 'postgres',
27
- // password: 'abcd1234',
28
- // synchronize: false,
29
- // logging: true,
30
- // connectTimeoutMS: 30000,
31
- // extra: { poolSize: 30 }
32
- // },
33
- //ormconfig: {
34
- // name: 'default',
35
- // type: 'postgres',
36
- // database: 'dev2',
37
- // username: 'postgres',
38
- // password: 'hatio',
39
- // host: 'localhost',
40
- // port: 15432,
41
- // synchronize: false,
42
- // logging: true,
43
- // connectTimeoutMS: 30000,
44
- // extra: { poolSize: 30 }
45
- //},
31
+ sellercraftIntegrationConfig: {
32
+ apiKey: 'Et0KqtLvA6e92bDvOywy9eCCud4hpAal8akpqI90'
33
+ },
46
34
  SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dfC95',
47
35
  password: {
48
36
  lowerCase: true,
@@ -56,6 +44,13 @@ module.exports = {
56
44
  looseCharacterLength: 4,
57
45
  history: 2
58
46
  },
47
+ // storage: {
48
+ // type: 's3',
49
+ // accessKeyId: 'AKIAUQEOPWEJCDH6AR5H',
50
+ // secretAccessKey: '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',
51
+ // bucketName: 'opa-one',
52
+ // region: 'ap-southeast-1'
53
+ // },
59
54
  uploads: 'uploads',
60
55
  attachmentsPath: 'attachments',
61
56
  logger: {
@@ -105,7 +100,5 @@ module.exports = {
105
100
  // privateKey: '4pmlt3Wk019u7nqU3Q_oGZE6LbUDjjf8DpmAcn9-iss'
106
101
  // }
107
102
  },
108
- reportApiUrl: 'http://localhost:8888/rest/report/show_html'
109
- // reportApiUrl: 'http://192.168.0.153:8888/rest/report/show_html'
110
- // reportApiUrl: 'http://10.100.109.66:8090/rest/report/show_html'
103
+ reportApiUrl: 'http://192.168.0.153:8888/rest/report/show_html'
111
104
  }
@@ -76,10 +76,10 @@ exports.outboundOrderByStatusResolver = {
76
76
  GROUP BY "status"
77
77
  UNION ALL
78
78
  SELECT 'AWAITING DISPATCH' AS "status", count(*) FROM manifests m
79
- INNER JOIN release_goods rg ON rg.manifest_id = m.id
79
+ INNER JOIN order_packages op ON op.manifest_id = m.id
80
80
  WHERE m."status" in ('OPEN', 'IN_QUEUE')
81
81
  AND m."domain_id" = $1
82
- AND rg."bizplace_id" IN (${bizplaceIds})
82
+ AND op."bizplace_id" IN (${bizplaceIds})
83
83
  UNION ALL
84
84
  SELECT 'PICKING ASSIGNED' AS "status", count(*) FROM worksheets w
85
85
  WHERE w."domain_id" = $1
@@ -101,13 +101,12 @@ exports.outboundOrderByStatusResolver = {
101
101
  AND w."status" IN ('DEACTIVATED','EXECUTING')
102
102
  GROUP BY w."status"
103
103
  UNION ALL
104
- SELECT 'PENDING MANIFEST CREATION' AS "status", count(*) FROM release_goods rg
105
- WHERE rg."domain_id" = $1
106
- AND rg."bizplace_id" IN (${bizplaceIds})
107
- AND rg."status" = 'DONE'
108
- AND rg."manifest_id" ISNULL
109
- AND rg."type" = 'b2c'
110
- AND rg."updated_at" >= (CURRENT_DATE - 30)
104
+ SELECT 'PENDING MANIFEST CREATION' AS "status", count(*) FROM order_packages op
105
+ WHERE op."domain_id" = $1
106
+ AND op."bizplace_id" IN (${bizplaceIds})
107
+ AND op."status" = 'DONE'
108
+ AND op."manifest_id" ISNULL
109
+ AND op."updated_at" >= (CURRENT_DATE - 30)
111
110
  UNION ALL
112
111
  SELECT 'DRAFT' AS "status", count(*) FROM draft_release_goods drg
113
112
  WHERE drg."domain_id" = $1
@@ -1 +1 @@
1
- {"version":3,"file":"outbound-order-by-status.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/dashboard/outbound-order-by-status.ts"],"names":[],"mappings":";;;AAIA,uDAAkE;AAErD,QAAA,6BAA6B,GAAG;IAC3C,KAAK,CAAC,qBAAqB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;;QACjE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAC7F,MAAM,UAAU,GAAW,CAAA,MAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,0CAAE,KAAK,KAAI,KAAK,CAAA;QAC3G,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,wEAAwE,CAAC,CAAA;QAC/F,IAAI,WAAmB,CAAA;QAEvB,IAAI,UAAU,IAAI,CAAC,UAAU,IAAI,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE;YAC/D,IAAI,SAAS,GACX,UAAU,IAAI,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,IAAA,kCAAuB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAChG,WAAW,GAAG,SAAS;iBACpB,GAAG,CAAC,QAAQ,CAAC,EAAE;gBACd,OAAO,GAAG,IAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,EAAE,CAAA,GAAG,GAAG,CAAA;YACrC,CAAC,CAAC;iBACD,IAAI,CAAC,GAAG,CAAC,CAAA;SACb;;YAAM,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAE5C,MAAM,WAAW,GAAwC,MAAM,EAAE,CAAC,KAAK,CACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAsCiC,WAAW;;;;;;;;;;;uCAWX,WAAW;;;;;;;;;;;qCAWb,WAAW;;;;oCAIZ,WAAW;;;;;;;oCAOX,WAAW;;;;;;;oCAOX,WAAW;;;;;;qCAMV,WAAW;;;;;;;;sCAQV,WAAW;;;;;;KAM5C,EACC,CAAC,MAAM,CAAC,EAAE,CAAC,CACZ,CAAA;QAED,OAAO,WAAW,CAAA;IACpB,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"outbound-order-by-status.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/dashboard/outbound-order-by-status.ts"],"names":[],"mappings":";;;AAIA,uDAAkE;AAErD,QAAA,6BAA6B,GAAG;IAC3C,KAAK,CAAC,qBAAqB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;;QACjE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAC7F,MAAM,UAAU,GAAW,CAAA,MAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,0CAAE,KAAK,KAAI,KAAK,CAAA;QAC3G,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,wEAAwE,CAAC,CAAA;QAC/F,IAAI,WAAmB,CAAA;QAEvB,IAAI,UAAU,IAAI,CAAC,UAAU,IAAI,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE;YAC/D,IAAI,SAAS,GACX,UAAU,IAAI,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,IAAA,kCAAuB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAChG,WAAW,GAAG,SAAS;iBACpB,GAAG,CAAC,QAAQ,CAAC,EAAE;gBACd,OAAO,GAAG,IAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,EAAE,CAAA,GAAG,GAAG,CAAA;YACrC,CAAC,CAAC;iBACD,IAAI,CAAC,GAAG,CAAC,CAAA;SACb;;YAAM,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAE5C,MAAM,WAAW,GAAwC,MAAM,EAAE,CAAC,KAAK,CACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAsCiC,WAAW;;;;;;;;;;;uCAWX,WAAW;;;;;;;;;;;qCAWb,WAAW;;;;oCAIZ,WAAW;;;;;;;oCAOX,WAAW;;;;;;;oCAOX,WAAW;;;;;;qCAMV,WAAW;;;;;;;sCAOV,WAAW;;;;;;KAM5C,EACC,CAAC,MAAM,CAAC,EAAE,CAAC,CACZ,CAAA;QAED,OAAO,WAAW,CAAA;IACpB,CAAC;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.155",
3
+ "version": "4.3.156",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -62,60 +62,60 @@
62
62
  "@operato/scene-tab": "^0.1.8",
63
63
  "@operato/scene-table": "^0.1.8",
64
64
  "@operato/scene-wheel-sorter": "^0.1.8",
65
- "@things-factory/apptool-ui": "^4.3.151",
66
- "@things-factory/attachment-ui": "^4.3.151",
67
- "@things-factory/auth-ui": "^4.3.151",
68
- "@things-factory/barcode-ui": "^4.3.151",
69
- "@things-factory/biz-ui": "^4.3.155",
70
- "@things-factory/board-service": "^4.3.151",
71
- "@things-factory/board-ui": "^4.3.155",
72
- "@things-factory/code-ui": "^4.3.155",
73
- "@things-factory/context-ui": "^4.3.151",
74
- "@things-factory/export-ui": "^4.3.151",
75
- "@things-factory/export-ui-csv": "^4.3.151",
76
- "@things-factory/export-ui-excel": "^4.3.151",
77
- "@things-factory/fav-base": "^4.3.151",
78
- "@things-factory/form-ui": "^4.3.151",
79
- "@things-factory/geography": "^4.3.151",
80
- "@things-factory/grist-ui": "^4.3.155",
81
- "@things-factory/help": "^4.3.151",
82
- "@things-factory/i18n-base": "^4.3.151",
83
- "@things-factory/id-rule-base": "^4.3.155",
84
- "@things-factory/import-ui": "^4.3.155",
85
- "@things-factory/import-ui-excel": "^4.3.155",
86
- "@things-factory/menu-ui": "^4.3.155",
87
- "@things-factory/more-ui": "^4.3.151",
88
- "@things-factory/notification": "^4.3.151",
89
- "@things-factory/pdf": "^4.3.151",
90
- "@things-factory/print-proxy-service": "^4.3.151",
91
- "@things-factory/print-ui": "^4.3.151",
92
- "@things-factory/product-base": "^4.3.151",
93
- "@things-factory/resource-ui": "^4.3.155",
94
- "@things-factory/sales-ui": "^4.3.155",
95
- "@things-factory/scene-data-transform": "^4.3.151",
96
- "@things-factory/scene-excel": "^4.3.151",
97
- "@things-factory/scene-firebase": "^4.3.151",
98
- "@things-factory/scene-form": "^4.3.151",
99
- "@things-factory/scene-google-map": "^4.3.151",
100
- "@things-factory/scene-graphql": "^4.3.151",
101
- "@things-factory/scene-label": "^4.3.151",
102
- "@things-factory/scene-marker": "^4.3.151",
103
- "@things-factory/scene-mqtt": "^4.3.151",
104
- "@things-factory/scene-restful": "^4.3.151",
105
- "@things-factory/scene-visualizer": "^4.3.151",
106
- "@things-factory/setting-ui": "^4.3.155",
107
- "@things-factory/system-ui": "^4.3.151",
108
- "@things-factory/transport-base": "^4.3.151",
109
- "@things-factory/tutorial-ui": "^4.3.151",
110
- "@things-factory/warehouse-base": "^4.3.155",
111
- "@things-factory/worksheet-base": "^4.3.155"
65
+ "@things-factory/apptool-ui": "^4.3.156",
66
+ "@things-factory/attachment-ui": "^4.3.156",
67
+ "@things-factory/auth-ui": "^4.3.156",
68
+ "@things-factory/barcode-ui": "^4.3.156",
69
+ "@things-factory/biz-ui": "^4.3.156",
70
+ "@things-factory/board-service": "^4.3.156",
71
+ "@things-factory/board-ui": "^4.3.156",
72
+ "@things-factory/code-ui": "^4.3.156",
73
+ "@things-factory/context-ui": "^4.3.156",
74
+ "@things-factory/export-ui": "^4.3.156",
75
+ "@things-factory/export-ui-csv": "^4.3.156",
76
+ "@things-factory/export-ui-excel": "^4.3.156",
77
+ "@things-factory/fav-base": "^4.3.156",
78
+ "@things-factory/form-ui": "^4.3.156",
79
+ "@things-factory/geography": "^4.3.156",
80
+ "@things-factory/grist-ui": "^4.3.156",
81
+ "@things-factory/help": "^4.3.156",
82
+ "@things-factory/i18n-base": "^4.3.156",
83
+ "@things-factory/id-rule-base": "^4.3.156",
84
+ "@things-factory/import-ui": "^4.3.156",
85
+ "@things-factory/import-ui-excel": "^4.3.156",
86
+ "@things-factory/menu-ui": "^4.3.156",
87
+ "@things-factory/more-ui": "^4.3.156",
88
+ "@things-factory/notification": "^4.3.156",
89
+ "@things-factory/pdf": "^4.3.156",
90
+ "@things-factory/print-proxy-service": "^4.3.156",
91
+ "@things-factory/print-ui": "^4.3.156",
92
+ "@things-factory/product-base": "^4.3.156",
93
+ "@things-factory/resource-ui": "^4.3.156",
94
+ "@things-factory/sales-ui": "^4.3.156",
95
+ "@things-factory/scene-data-transform": "^4.3.156",
96
+ "@things-factory/scene-excel": "^4.3.156",
97
+ "@things-factory/scene-firebase": "^4.3.156",
98
+ "@things-factory/scene-form": "^4.3.156",
99
+ "@things-factory/scene-google-map": "^4.3.156",
100
+ "@things-factory/scene-graphql": "^4.3.156",
101
+ "@things-factory/scene-label": "^4.3.156",
102
+ "@things-factory/scene-marker": "^4.3.156",
103
+ "@things-factory/scene-mqtt": "^4.3.156",
104
+ "@things-factory/scene-restful": "^4.3.156",
105
+ "@things-factory/scene-visualizer": "^4.3.156",
106
+ "@things-factory/setting-ui": "^4.3.156",
107
+ "@things-factory/system-ui": "^4.3.156",
108
+ "@things-factory/transport-base": "^4.3.156",
109
+ "@things-factory/tutorial-ui": "^4.3.156",
110
+ "@things-factory/warehouse-base": "^4.3.156",
111
+ "@things-factory/worksheet-base": "^4.3.156"
112
112
  },
113
113
  "devDependencies": {
114
- "@things-factory/builder": "^4.3.151",
114
+ "@things-factory/builder": "^4.3.156",
115
115
  "cypress": "^9.4.1",
116
116
  "cypress-file-upload": "^5.0.8",
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "bd238fd69858d34c41931f719cdf34cc9f8fc60a"
120
+ "gitHead": "cbdf5546969663ba03bb1f4f10666599aa6d00bc"
121
121
  }
@@ -79,10 +79,10 @@ export const outboundOrderByStatusResolver = {
79
79
  GROUP BY "status"
80
80
  UNION ALL
81
81
  SELECT 'AWAITING DISPATCH' AS "status", count(*) FROM manifests m
82
- INNER JOIN release_goods rg ON rg.manifest_id = m.id
82
+ INNER JOIN order_packages op ON op.manifest_id = m.id
83
83
  WHERE m."status" in ('OPEN', 'IN_QUEUE')
84
84
  AND m."domain_id" = $1
85
- AND rg."bizplace_id" IN (${bizplaceIds})
85
+ AND op."bizplace_id" IN (${bizplaceIds})
86
86
  UNION ALL
87
87
  SELECT 'PICKING ASSIGNED' AS "status", count(*) FROM worksheets w
88
88
  WHERE w."domain_id" = $1
@@ -104,13 +104,12 @@ export const outboundOrderByStatusResolver = {
104
104
  AND w."status" IN ('DEACTIVATED','EXECUTING')
105
105
  GROUP BY w."status"
106
106
  UNION ALL
107
- SELECT 'PENDING MANIFEST CREATION' AS "status", count(*) FROM release_goods rg
108
- WHERE rg."domain_id" = $1
109
- AND rg."bizplace_id" IN (${bizplaceIds})
110
- AND rg."status" = 'DONE'
111
- AND rg."manifest_id" ISNULL
112
- AND rg."type" = 'b2c'
113
- AND rg."updated_at" >= (CURRENT_DATE - 30)
107
+ SELECT 'PENDING MANIFEST CREATION' AS "status", count(*) FROM order_packages op
108
+ WHERE op."domain_id" = $1
109
+ AND op."bizplace_id" IN (${bizplaceIds})
110
+ AND op."status" = 'DONE'
111
+ AND op."manifest_id" ISNULL
112
+ AND op."updated_at" >= (CURRENT_DATE - 30)
114
113
  UNION ALL
115
114
  SELECT 'DRAFT' AS "status", count(*) FROM draft_release_goods drg
116
115
  WHERE drg."domain_id" = $1