@things-factory/operato-wms 4.3.138 → 4.3.142

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.
@@ -133,12 +133,6 @@ class InventoryByProduct extends localize(i18next)(PageView) {
133
133
  type: 'string',
134
134
  props: { searchOper: 'eq' }
135
135
  },
136
- {
137
- label: i18next.t('field.expiry_date'),
138
- name: 'expirationDate',
139
- type: 'date',
140
- props: { searchOper: 'eq' }
141
- },
142
136
  {
143
137
  label: i18next.t('field.available_qty_only'),
144
138
  name: 'availableStock',
@@ -356,7 +350,6 @@ class InventoryByProduct extends localize(i18next)(PageView) {
356
350
  quarantineQty
357
351
  reserveQty
358
352
  draftQty
359
- expirationDate
360
353
  warehouseQty
361
354
  }
362
355
  total
@@ -16,7 +16,6 @@ import { client, CustomAlert, PageView, store } from '@things-factory/shell'
16
16
  import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
17
17
  import { isMobileDevice } from '@things-factory/utils'
18
18
 
19
- import { getCodeByName } from '@things-factory/code-base'
20
19
  import { LOCATION_LABEL_SETTING_KEY, LOCATION_STATUS, LOCATION_TYPE } from '../constants'
21
20
  import { showToast } from '../../util'
22
21
 
@@ -417,25 +416,34 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
417
416
  async importHandler(patches) {
418
417
  try {
419
418
  let records = this.dataGrist.data.records
420
- const locationType = await getCodeByName('LOCATION_TYPE')
421
- const locationStatus = await getCodeByName('LOCATION_STATUS')
419
+ const locationType = Object.keys(LOCATION_TYPE)
420
+ const locationStatus = Object.keys(LOCATION_STATUS)
421
+
422
422
  patches = patches.map(itm => {
423
423
  // Error if there is an empty value
424
- if (isEmpty(itm.name) || isEmpty(itm.type) || isEmpty(itm.zone) || isEmpty(itm.column) || isEmpty(itm.shelf) || isEmpty(itm.status) || '')
425
- {
424
+ if (
425
+ isEmpty(itm.name) ||
426
+ isEmpty(itm.type) ||
427
+ isEmpty(itm.zone) ||
428
+ isEmpty(itm.column) ||
429
+ isEmpty(itm.shelf) ||
430
+ isEmpty(itm.status) ||
431
+ ''
432
+ ) {
426
433
  throw new Error(i18next.t('text.empty_value_in_list'))
427
434
  }
428
435
  // Error if location name is already existed
429
436
  if (records.find(exist => exist.name == itm.name)) {
430
437
  throw new Error(i18next.t('text.location_name(s)_already_existed'))
431
438
  }
439
+
432
440
  // Error if location status does not exist
433
- let foundLocationType = locationType.find(exist => exist.name == itm.type)
441
+ let foundLocationType = locationType.find(exist => exist == itm.type)
434
442
  if (!foundLocationType) {
435
443
  throw new Error(i18next.t('text.location_type_does_not_exist'))
436
444
  }
437
445
  // Error if location type does not exist
438
- let foundLocationStatus = locationStatus.find(exist => exist.name == itm.status)
446
+ let foundLocationStatus = locationStatus.find(exist => exist == itm.status)
439
447
  if (!foundLocationStatus) {
440
448
  throw new Error(i18next.t('text.location_status_does_not_exist'))
441
449
  }
@@ -1187,8 +1187,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1187
1187
 
1188
1188
  this._checkProductDuplication()
1189
1189
 
1190
- const checkRequiredFields = ({ batchId, packingType, uomValue, uom, packQty }) =>
1191
- !batchId || !packingType || !uomValue || !uom || !packQty
1190
+ const checkRequiredFields = ({ batchId, packQty }) => !batchId || !packQty
1192
1191
 
1193
1192
  // required field (batchId, packingType, uomValue, uom, packQty, palletQty)
1194
1193
  if (records.some(checkRequiredFields)) {
@@ -1673,11 +1672,11 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1673
1672
  `,
1674
1673
  variables: { orderProducts: patches, partnerBizplaceId: this._bizplaceId }
1675
1674
  })
1676
- let foundErrors = response.data.bulkUploadValidateOrderProducts .find(item=>item.isError != 0)
1677
- if (foundErrors){
1675
+ let foundErrors = response.data.bulkUploadValidateOrderProducts.find(item => item.isError != 0)
1676
+ if (foundErrors) {
1678
1677
  return this._showToast({ message: i18next.t('text.invalid_product_sku') })
1679
1678
  }
1680
- if (!foundErrors){
1679
+ if (!foundErrors) {
1681
1680
  if (!response.errors) {
1682
1681
  const data = response.data.bulkUploadValidateOrderProducts.map(item => {
1683
1682
  return {
@@ -1688,17 +1687,17 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1688
1687
  palletQty: parseFloat(item.palletQty) || ''
1689
1688
  }
1690
1689
  })
1691
- this.productData = {
1692
- ...this.productData,
1693
- records: data.map((dt, idx) => {
1694
- return {
1695
- ...dt,
1696
- id: idx,
1697
- name: idx,
1698
- __dirty__: '+'
1699
- }
1700
- })
1701
- }
1690
+ this.productData = {
1691
+ ...this.productData,
1692
+ records: data.map((dt, idx) => {
1693
+ return {
1694
+ ...dt,
1695
+ id: idx,
1696
+ name: idx,
1697
+ __dirty__: '+'
1698
+ }
1699
+ })
1700
+ }
1702
1701
  this.productGrist.fetch()
1703
1702
  } else {
1704
1703
  throw response.errors
@@ -2852,12 +2852,17 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2852
2852
 
2853
2853
  async importHandler(patches) {
2854
2854
  try {
2855
- const orderInventories = patches.map(patch => {
2855
+ const orderInventories = patches.reduce((acc, patch) => {
2856
2856
  delete patch.cuFlag
2857
- return {
2858
- ...patch
2857
+ let idxExistingData = acc.findIndex(i => i.productSKU == patch.productSKU && i.packingType == patch.packingType)
2858
+
2859
+ if (idxExistingData >= 0) {
2860
+ acc[idxExistingData].releaseQty = acc[idxExistingData].releaseQty + patch.releaseQty
2861
+ } else {
2862
+ acc.push(patch)
2859
2863
  }
2860
- })
2864
+ return acc
2865
+ }, [])
2861
2866
 
2862
2867
  // validate releaseQty
2863
2868
  // only positive integers permitted
@@ -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: 'dev3',
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
23
  database: 'postgres',
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: false,
18
- logging: true
29
+ logging: false
30
+ },
31
+ sellercraftIntegrationConfig: {
32
+ apiKey: 'Et0KqtLvA6e92bDvOywy9eCCud4hpAal8akpqI90'
19
33
  },
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
- //},
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
  }
@@ -69,7 +69,7 @@ exports.inboundSerialNumberReport = {
69
69
  select * from (
70
70
  select
71
71
  row_number() over(partition by an."name" order by coalesce(w.started_at, ii.created_at), p.sku ) as "no",
72
- case when "source" = 'ADJUSTMENT' then 'adjustment' else an."name" end as "order_no",
72
+ case when "ii"."source" = 'ADJUSTMENT' then 'adjustment' else an."name" end as "order_no",
73
73
  i.pallet_id, i.carton_id,an.ref_no, an.ref_no_2, an.ref_no_3,
74
74
  p.id as "product_id", p.sku as "product_sku", p.brand_sku as "product_brand_sku",
75
75
  p.name as "product_name", p.description as "product_description", p."type" as "product_type",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.138",
3
+ "version": "4.3.142",
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.131",
66
- "@things-factory/attachment-ui": "^4.3.138",
67
- "@things-factory/auth-ui": "^4.3.138",
68
- "@things-factory/barcode-ui": "^4.3.131",
69
- "@things-factory/biz-ui": "^4.3.138",
70
- "@things-factory/board-service": "^4.3.138",
71
- "@things-factory/board-ui": "^4.3.138",
72
- "@things-factory/code-ui": "^4.3.138",
73
- "@things-factory/context-ui": "^4.3.131",
74
- "@things-factory/export-ui": "^4.3.131",
75
- "@things-factory/export-ui-csv": "^4.3.131",
76
- "@things-factory/export-ui-excel": "^4.3.131",
77
- "@things-factory/fav-base": "^4.3.138",
78
- "@things-factory/form-ui": "^4.3.131",
79
- "@things-factory/geography": "^4.3.138",
80
- "@things-factory/grist-ui": "^4.3.138",
81
- "@things-factory/help": "^4.3.131",
82
- "@things-factory/i18n-base": "^4.3.131",
83
- "@things-factory/id-rule-base": "^4.3.138",
84
- "@things-factory/import-ui": "^4.3.138",
85
- "@things-factory/import-ui-excel": "^4.3.138",
86
- "@things-factory/menu-ui": "^4.3.138",
87
- "@things-factory/more-ui": "^4.3.131",
88
- "@things-factory/notification": "^4.3.138",
89
- "@things-factory/pdf": "^4.3.131",
90
- "@things-factory/print-proxy-service": "^4.3.131",
91
- "@things-factory/print-ui": "^4.3.131",
92
- "@things-factory/product-base": "^4.3.138",
93
- "@things-factory/resource-ui": "^4.3.138",
94
- "@things-factory/sales-ui": "^4.3.138",
95
- "@things-factory/scene-data-transform": "^4.3.131",
96
- "@things-factory/scene-excel": "^4.3.131",
97
- "@things-factory/scene-firebase": "^4.3.131",
98
- "@things-factory/scene-form": "^4.3.131",
99
- "@things-factory/scene-google-map": "^4.3.131",
100
- "@things-factory/scene-graphql": "^4.3.131",
101
- "@things-factory/scene-label": "^4.3.131",
102
- "@things-factory/scene-marker": "^4.3.131",
103
- "@things-factory/scene-mqtt": "^4.3.131",
104
- "@things-factory/scene-restful": "^4.3.131",
105
- "@things-factory/scene-visualizer": "^4.3.131",
106
- "@things-factory/setting-ui": "^4.3.138",
107
- "@things-factory/system-ui": "^4.3.131",
108
- "@things-factory/transport-base": "^4.3.138",
109
- "@things-factory/tutorial-ui": "^4.3.138",
110
- "@things-factory/warehouse-base": "^4.3.138",
111
- "@things-factory/worksheet-base": "^4.3.138"
65
+ "@things-factory/apptool-ui": "^4.3.142",
66
+ "@things-factory/attachment-ui": "^4.3.142",
67
+ "@things-factory/auth-ui": "^4.3.142",
68
+ "@things-factory/barcode-ui": "^4.3.142",
69
+ "@things-factory/biz-ui": "^4.3.142",
70
+ "@things-factory/board-service": "^4.3.142",
71
+ "@things-factory/board-ui": "^4.3.142",
72
+ "@things-factory/code-ui": "^4.3.142",
73
+ "@things-factory/context-ui": "^4.3.142",
74
+ "@things-factory/export-ui": "^4.3.142",
75
+ "@things-factory/export-ui-csv": "^4.3.142",
76
+ "@things-factory/export-ui-excel": "^4.3.142",
77
+ "@things-factory/fav-base": "^4.3.142",
78
+ "@things-factory/form-ui": "^4.3.142",
79
+ "@things-factory/geography": "^4.3.142",
80
+ "@things-factory/grist-ui": "^4.3.142",
81
+ "@things-factory/help": "^4.3.142",
82
+ "@things-factory/i18n-base": "^4.3.142",
83
+ "@things-factory/id-rule-base": "^4.3.142",
84
+ "@things-factory/import-ui": "^4.3.142",
85
+ "@things-factory/import-ui-excel": "^4.3.142",
86
+ "@things-factory/menu-ui": "^4.3.142",
87
+ "@things-factory/more-ui": "^4.3.142",
88
+ "@things-factory/notification": "^4.3.142",
89
+ "@things-factory/pdf": "^4.3.142",
90
+ "@things-factory/print-proxy-service": "^4.3.142",
91
+ "@things-factory/print-ui": "^4.3.142",
92
+ "@things-factory/product-base": "^4.3.142",
93
+ "@things-factory/resource-ui": "^4.3.142",
94
+ "@things-factory/sales-ui": "^4.3.142",
95
+ "@things-factory/scene-data-transform": "^4.3.142",
96
+ "@things-factory/scene-excel": "^4.3.142",
97
+ "@things-factory/scene-firebase": "^4.3.142",
98
+ "@things-factory/scene-form": "^4.3.142",
99
+ "@things-factory/scene-google-map": "^4.3.142",
100
+ "@things-factory/scene-graphql": "^4.3.142",
101
+ "@things-factory/scene-label": "^4.3.142",
102
+ "@things-factory/scene-marker": "^4.3.142",
103
+ "@things-factory/scene-mqtt": "^4.3.142",
104
+ "@things-factory/scene-restful": "^4.3.142",
105
+ "@things-factory/scene-visualizer": "^4.3.142",
106
+ "@things-factory/setting-ui": "^4.3.142",
107
+ "@things-factory/system-ui": "^4.3.142",
108
+ "@things-factory/transport-base": "^4.3.142",
109
+ "@things-factory/tutorial-ui": "^4.3.142",
110
+ "@things-factory/warehouse-base": "^4.3.142",
111
+ "@things-factory/worksheet-base": "^4.3.142"
112
112
  },
113
113
  "devDependencies": {
114
- "@things-factory/builder": "^4.3.131",
114
+ "@things-factory/builder": "^4.3.142",
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": "1d4e0a3ff6b8792c843b9735a28a3f5fb946b144"
120
+ "gitHead": "1698c58d948310a02ad506564f90e71d776943f4"
121
121
  }
@@ -79,7 +79,7 @@ export const inboundSerialNumberReport = {
79
79
  select * from (
80
80
  select
81
81
  row_number() over(partition by an."name" order by coalesce(w.started_at, ii.created_at), p.sku ) as "no",
82
- case when "source" = 'ADJUSTMENT' then 'adjustment' else an."name" end as "order_no",
82
+ case when "ii"."source" = 'ADJUSTMENT' then 'adjustment' else an."name" end as "order_no",
83
83
  i.pallet_id, i.carton_id,an.ref_no, an.ref_no_2, an.ref_no_3,
84
84
  p.id as "product_id", p.sku as "product_sku", p.brand_sku as "product_brand_sku",
85
85
  p.name as "product_name", p.description as "product_description", p."type" as "product_type",