@things-factory/operato-hub 4.3.633 → 4.3.635

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.
@@ -4,80 +4,46 @@ module.exports = {
4
4
  useVirtualHostBasedDomain: false,
5
5
  fallbackRoute: '/',
6
6
  subdomainOffset: 2,
7
- port: 3000,
7
+ port: 4445,
8
8
  inspect: '9260',
9
- //postgres
10
- ormconfig: {
11
- name: 'default',
12
- type: 'postgres',
13
- database: 'postgres',
14
- username: 'postgres',
15
- password: 'hatio',
16
- host: '192.168.0.151',
17
- port: 15432,
18
- synchronize: false,
19
- logging: true
20
- },
21
- //operato
22
9
  // ormconfig: {
23
10
  // name: 'default',
24
11
  // type: 'postgres',
25
12
  // database: 'operato',
26
13
  // username: 'postgres',
27
14
  // password: 'hatio',
28
- // host: '192.168.0.151',
29
- // port: 15432,
30
- // synchronize: false,
31
- // logging: true
32
- // },
33
- //eric2
34
- // ormconfig: {
35
- // name: 'default',
36
- // type: 'postgres',
37
- // database: 'eric2',
38
- // username: 'postgres',
39
- // password: 'hatio',
40
15
  // host: '192.168.0.153',
41
16
  // port: 15432,
42
17
  // synchronize: false,
43
18
  // logging: true
44
19
  // },
45
- // arif's
46
- // ormconfig: {
47
- // name: 'default',
48
- // type: 'postgres',
49
- // database: 'arif',
50
- // username: 'postgres',
51
- // password: 'hatio',
52
- // host: '192.168.0.151',
53
- // port: 15432,
54
- // synchronize: false,
55
- // logging: true
56
- // },
57
- //EMS
58
- // ormconfig: {
59
- // name: 'default',
60
- // type: 'postgres',
61
- // database: 'EMS',
62
- // username: 'postgres',
63
- // password: 'hatio',
64
- // host: '192.168.0.161',
65
- // port: 15432,
66
- // synchronize: false,
67
- // logging: true
68
- // },
69
- //db nora
20
+
21
+ //db izzah
70
22
  // ormconfig: {
71
23
  // name: 'default',
72
24
  // type: 'postgres',
73
- // database: 'postgres',
25
+ // database: '06072023',
74
26
  // username: 'postgres',
75
27
  // password: 'hatio',
76
- // host: '192.168.0.36',
28
+ // host: '192.168.0.153',
77
29
  // port: 15432,
78
30
  // synchronize: true,
79
31
  // logging: true
80
32
  // },
33
+ //postgres
34
+ ormconfig: {
35
+ name: 'default',
36
+ type: 'postgres',
37
+ database: 'postgres',
38
+ username: 'postgres',
39
+ password: 'hatio',
40
+ host: '192.168.0.151',
41
+ port: 15432,
42
+ synchronize: false,
43
+ logging: true
44
+ },
45
+
46
+ // //ERIC
81
47
  // ormconfig: {
82
48
  // name: 'default',
83
49
  // type: 'postgres',
@@ -89,18 +55,20 @@ module.exports = {
89
55
  // synchronize: true,
90
56
  // logging: true
91
57
  // },
92
- //db izzah
58
+
59
+ //eric2
93
60
  // ormconfig: {
94
61
  // name: 'default',
95
62
  // type: 'postgres',
96
- // database: '06072023',
63
+ // database: 'eric2',
97
64
  // username: 'postgres',
98
65
  // password: 'hatio',
99
66
  // host: '192.168.0.153',
100
67
  // port: 15432,
101
- // synchronize: true,
68
+ // synchronize: false,
102
69
  // logging: true
103
70
  // },
71
+
104
72
  // ormconfig: {
105
73
  // name: 'default',
106
74
  // type: 'postgres',
@@ -114,7 +82,6 @@ module.exports = {
114
82
  // connectTimeoutMS: 30000,
115
83
  // extra: { poolSize: 30 }
116
84
  // },
117
-
118
85
  // ormconfig: {
119
86
  // name: 'default',
120
87
  // type: 'postgres',
@@ -128,7 +95,6 @@ module.exports = {
128
95
  // connectTimeoutMS: 30000,
129
96
  // extra: { poolSize: 30 }
130
97
  // },
131
-
132
98
  password: {
133
99
  lowerCase: true,
134
100
  upperCase: false,
@@ -218,8 +184,7 @@ module.exports = {
218
184
  isUAT: false,
219
185
  application: 'Operato MMS',
220
186
  partnerId: 846025,
221
- partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64',
222
- v2: true
187
+ partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64'
223
188
  },
224
189
  marketplaceIntegrationLazada: {
225
190
  platform: 'lazada',
@@ -228,16 +193,6 @@ module.exports = {
228
193
  appSecret: 'HB3RTNEXHlVSlBr9SmWF8AjbSUT7a825',
229
194
  callback: 'https://maybank.operato-m.com/lazada-callback'
230
195
  },
231
-
232
- //testinglazada
233
- // marketplaceIntegrationLazada: {
234
- // platform: 'lazada',
235
- // application: 'powrup_bi',
236
- // appKey: '117890',
237
- // appSecret: 'tQVllnUa7irAHoNxAwXEVxoP1we1bUjE',
238
- // callback: 'https://73c5-175-141-30-142.ngrok-free.app/lazada-callback'
239
- // },
240
-
241
196
  accountingIntegrationXero: {
242
197
  platform: 'xero',
243
198
  application: 'Operato WMS',
@@ -246,38 +201,16 @@ module.exports = {
246
201
  callback: 'http://operato-h.com:3000/callback-xero',
247
202
  hostname: 'http://operato-h.com:3000/'
248
203
  },
249
- lmdIntegrationNinjavan: {
250
- clientId: 'P8WCEwMo0FHNlPECwTLetwN3diAmt5KF',
251
- secretKey: '1D0yNZGseOjhxnwri29xmuZiiuRp131L',
252
- refreshThreshold: 43200
204
+ lambda: {
205
+ region: 'ap-southeast-1',
206
+ accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
207
+ secretAccessKey: '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'
253
208
  },
254
-
255
- lmdIntegrationEms: { refreshThreshold: 43200 },
256
-
257
- lmdIntegrationCitylink: { refreshThreshold: 172800000 },
258
209
  awbFileStorage: {
259
210
  type: 's3',
260
- accessKeyId: 'AKIAUQEOPWEJPXIVER74',
261
- secretAccessKey: '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',
211
+ accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
212
+ secretAccessKey: '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',
262
213
  bucketName: 'operato-awb',
263
214
  region: 'ap-southeast-1'
264
- },
265
- lambda: {
266
- region: 'ap-southeast-1',
267
- accessKeyId: 'AKIAUQEOPWEJPXIVER74',
268
- secretAccessKey: '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'
269
- },
270
- lmdIntegrationConfig: {
271
- version: {
272
- v1: 'lmdMiddleware',
273
- v2: 'lmdMiddlewareV2'
274
- }
275
- },
276
- awsSesEmail: {
277
- accessKeyId: 'AKIAUQEOPWEJPXIVER74',
278
- secretAccessKey: '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',
279
- email: 'support@hatio.asia'
280
- },
281
- reportApiUrl:
282
- 'http://k8s-default-operator-2fd6178d98-66c66a0f76c09575.elb.ap-southeast-1.amazonaws.com/rest/report/show_html'
215
+ }
283
216
  }
@@ -28,6 +28,7 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-return-order-details', middlewares
28
28
  relations: [
29
29
  'bizplace',
30
30
  'orderInventories',
31
+ 'orderInventories.releaseGood',
31
32
  'orderInventories.product',
32
33
  'orderInventories.productDetail',
33
34
  'creator',
@@ -39,7 +40,9 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-return-order-details', middlewares
39
40
  throw new error_util_1.ApiError('E04', 'return order');
40
41
  }
41
42
  // Flatten inventoryInfos for frontend
42
- const itemInfos = (returnOrder.orderInventories || []).map(orderInv => {
43
+ const itemInfos = (returnOrder.orderInventories || [])
44
+ .filter(orderInv => orderInv.type === 'RETURN_ORDER')
45
+ .map(orderInv => {
43
46
  var _a, _b, _c, _d, _e, _f, _g;
44
47
  return {
45
48
  batchId: orderInv.batchId,
@@ -60,6 +63,13 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-return-order-details', middlewares
60
63
  uom: (_f = orderInv.productDetail) === null || _f === void 0 ? void 0 : _f.uom,
61
64
  uomValue: (_g = orderInv.productDetail) === null || _g === void 0 ? void 0 : _g.uomValue
62
65
  },
66
+ releaseGood: {
67
+ id: orderInv.releaseGood.id,
68
+ name: orderInv.releaseGood.name,
69
+ refNo: orderInv.releaseGood.refNo,
70
+ refNo2: orderInv.releaseGood.refNo2,
71
+ refNo3: orderInv.releaseGood.refNo3
72
+ },
63
73
  returnQty: orderInv.returnQty,
64
74
  remark: orderInv.remark,
65
75
  status: orderInv.status
@@ -77,7 +87,9 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-return-order-details', middlewares
77
87
  bizplace: returnOrder.bizplace ? { id: returnOrder.bizplace.id, name: returnOrder.bizplace.name } : null,
78
88
  creator: returnOrder.creator ? { id: returnOrder.creator.id, name: returnOrder.creator.name } : null,
79
89
  updater: returnOrder.updater ? { id: returnOrder.updater.id, name: returnOrder.updater.name } : null,
80
- acceptedBy: returnOrder.acceptedBy ? { id: returnOrder.acceptedBy.id, name: returnOrder.acceptedBy.name } : null,
90
+ acceptedBy: returnOrder.acceptedBy
91
+ ? { id: returnOrder.acceptedBy.id, name: returnOrder.acceptedBy.name }
92
+ : null,
81
93
  createdAt: returnOrder.createdAt,
82
94
  updatedAt: returnOrder.updatedAt,
83
95
  itemInfos
@@ -1 +1 @@
1
- {"version":3,"file":"get-return-order-details.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/get-return-order-details.ts"],"names":[],"mappings":";;AACA,qCAAuC;AACvC,2DAAwD;AAExD,6CAAgE;AAChE,gDAA4F;AAC5F,oDAAyF;AAEzF,sBAAM,CAAC,GAAG,CACR,wCAAwC,EACxC,gCAAkB,EAClB,kCAAoB,EACpB,+BAAiB,EACjB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,IAAI;QACF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,IAAI,MAAM,mCAAQ,OAAO,CAAC,KAAK,KAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAE,CAAA;QACpD,IAAI,MAAM,CAAC,UAAU,EAAE;YACrB,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;YACzC,OAAO,MAAM,CAAC,YAAY,CAAC,CAAA;SAC5B;QACD,IAA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AAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI;YACpG,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI;YACpG,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,WAAW,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI;YAChH,SAAS,EAAE,WAAW,CAAC,SAAS;YAChC,SAAS,EAAE,WAAW,CAAC,SAAS;YAChC,SAAS;SACV,CAAA;QACD,OAAO,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,CAAA;KACxB;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,YAAY,qBAAQ;YAAE,IAAA,4BAAe,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;;YACjD,IAAA,qCAAwB,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;KAC1C;AACH,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"get-return-order-details.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/get-return-order-details.ts"],"names":[],"mappings":";;AACA,qCAAuC;AACvC,2DAAwD;AAExD,6CAAgE;AAChE,gDAA4F;AAC5F,oDAAyF;AAEzF,sBAAM,CAAC,GAAG,CACR,wCAAwC,EACxC,gCAAkB,EAClB,kCAAoB,EACpB,+BAAiB,EACjB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,IAAI;QACF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,IAAI,MAAM,mCAAQ,OAAO,CAAC,KAAK,KAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAE,CAAA;QACp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O,EAAE,CAAC,CAAC,CAAA;KAC1C;AACH,CAAC,CACF,CAAA"}
@@ -236,47 +236,80 @@ definitions:
236
236
  updatedAt:
237
237
  type: string
238
238
  example: '2025-05-05T12:00:00Z'
239
- inventoryInfos:
239
+ itemInfos:
240
240
  type: array
241
241
  items:
242
242
  type: object
243
243
  properties:
244
- id:
245
- type: string
246
- example: 'inventory-uuid'
247
- name:
248
- type: string
249
- example: 'Product A'
250
244
  batchId:
251
245
  type: string
252
246
  example: 'batch-001'
253
- palletId:
254
- type: string
255
- example: 'pallet-001'
256
247
  product:
257
248
  type: object
258
249
  properties:
259
250
  id:
260
251
  type: string
261
252
  example: 'product-uuid'
253
+ sku:
254
+ type: string
255
+ example: '1234567890'
256
+ brandSku:
257
+ type: string
258
+ example: '1234567890'
259
+ brand:
260
+ type: string
261
+ example: 'Brand A'
262
+ subBrand:
263
+ type: string
264
+ example: 'Sub Brand A'
265
+ productDetail:
266
+ type: object
267
+ properties:
268
+ id:
269
+ type: string
270
+ example: 'product-uuid'
271
+ refCode:
272
+ type: string
273
+ example: '1234567890'
274
+ isDefault:
275
+ type: boolean
276
+ example: true
277
+ packingType:
278
+ type: string
279
+ example: 'box'
280
+ packingSize:
281
+ type: integer
282
+ example: 24
283
+ movement:
284
+ type: string
285
+ example: 'IN'
286
+ uom:
287
+ type: string
288
+ example: 'PCS'
289
+ uomValue:
290
+ type: number
291
+ example: 10.0
292
+ releaseGood:
293
+ type: object
294
+ properties:
295
+ id:
296
+ type: string
297
+ example: 'release-good-uuid'
262
298
  name:
263
299
  type: string
264
- example: 'Product A'
265
- productName:
266
- type: string
267
- example: 'Product A'
268
- packingType:
269
- type: string
270
- example: 'box'
271
- packingSize:
272
- type: integer
273
- example: 24
300
+ example: 'Release Good A'
301
+ refNo:
302
+ type: string
303
+ example: '1234567890'
304
+ refNo2:
305
+ type: string
306
+ example: '1234567890'
307
+ refNo3:
308
+ type: string
309
+ example: '1234567890'
274
310
  returnQty:
275
311
  type: integer
276
312
  example: 10
277
- returnUomValue:
278
- type: number
279
- example: 10.0
280
313
  remark:
281
314
  type: string
282
315
  example: 'Defective'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-hub",
3
- "version": "4.3.633",
3
+ "version": "4.3.635",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -92,7 +92,7 @@
92
92
  "@things-factory/pdf": "^4.3.591",
93
93
  "@things-factory/product-ui": "^4.3.631",
94
94
  "@things-factory/resource-ui": "^4.3.591",
95
- "@things-factory/sales-base": "^4.3.632",
95
+ "@things-factory/sales-base": "^4.3.635",
96
96
  "@things-factory/scene-data-transform": "^4.3.591",
97
97
  "@things-factory/scene-excel": "^4.3.591",
98
98
  "@things-factory/scene-firebase": "^4.3.591",
@@ -109,7 +109,7 @@
109
109
  "@things-factory/system-ui": "^4.3.591",
110
110
  "@things-factory/transport-base": "^4.3.631",
111
111
  "@things-factory/warehouse-base": "^4.3.626",
112
- "@things-factory/worksheet-base": "^4.3.633",
112
+ "@things-factory/worksheet-base": "^4.3.635",
113
113
  "cron-parser": "^4.7.0",
114
114
  "koa2-swagger-ui": "^5.0.2",
115
115
  "swagger-jsdoc": "^5.0.0",
@@ -122,5 +122,5 @@
122
122
  "resolutions": {
123
123
  "core-js": "^3.16.0"
124
124
  },
125
- "gitHead": "e550612b9ee56d93020d0ea39b9320c4962dd134"
125
+ "gitHead": "bf18da41305936d8a50b2884ea7a0e54b3cb0faa"
126
126
  }
@@ -37,6 +37,7 @@ router.get(
37
37
  relations: [
38
38
  'bizplace',
39
39
  'orderInventories',
40
+ 'orderInventories.releaseGood',
40
41
  'orderInventories.product',
41
42
  'orderInventories.productDetail',
42
43
  'creator',
@@ -48,31 +49,40 @@ router.get(
48
49
  throw new ApiError('E04', 'return order')
49
50
  }
50
51
  // Flatten inventoryInfos for frontend
51
- const itemInfos = (returnOrder.orderInventories || []).map(orderInv => {
52
- return {
53
- batchId: orderInv.batchId,
54
- product: {
55
- id: orderInv.product.id,
56
- sku: orderInv.product.sku,
57
- brandSku: orderInv.product?.brandSku,
58
- brand: orderInv.product?.brand,
59
- subBrand: orderInv.product?.subBrand
60
- },
61
- productDetail: {
62
- id: orderInv.productDetail.id,
63
- refCode: orderInv.productDetail.refCode,
64
- isDefault: orderInv.productDetail?.isDefault,
65
- packingType: orderInv.productDetail.packingType,
66
- packingSize: orderInv.productDetail.packingSize,
67
- movement: orderInv.productDetail?.movement,
68
- uom: orderInv.productDetail?.uom,
69
- uomValue: orderInv.productDetail?.uomValue
70
- },
71
- returnQty: orderInv.returnQty,
72
- remark: orderInv.remark,
73
- status: orderInv.status
74
- }
75
- })
52
+ const itemInfos = (returnOrder.orderInventories || [])
53
+ .filter(orderInv => orderInv.type === 'RETURN_ORDER')
54
+ .map(orderInv => {
55
+ return {
56
+ batchId: orderInv.batchId,
57
+ product: {
58
+ id: orderInv.product.id,
59
+ sku: orderInv.product.sku,
60
+ brandSku: orderInv.product?.brandSku,
61
+ brand: orderInv.product?.brand,
62
+ subBrand: orderInv.product?.subBrand
63
+ },
64
+ productDetail: {
65
+ id: orderInv.productDetail.id,
66
+ refCode: orderInv.productDetail.refCode,
67
+ isDefault: orderInv.productDetail?.isDefault,
68
+ packingType: orderInv.productDetail.packingType,
69
+ packingSize: orderInv.productDetail.packingSize,
70
+ movement: orderInv.productDetail?.movement,
71
+ uom: orderInv.productDetail?.uom,
72
+ uomValue: orderInv.productDetail?.uomValue
73
+ },
74
+ releaseGood: {
75
+ id: orderInv.releaseGood.id,
76
+ name: orderInv.releaseGood.name,
77
+ refNo: orderInv.releaseGood.refNo,
78
+ refNo2: orderInv.releaseGood.refNo2,
79
+ refNo3: orderInv.releaseGood.refNo3
80
+ },
81
+ returnQty: orderInv.returnQty,
82
+ remark: orderInv.remark,
83
+ status: orderInv.status
84
+ }
85
+ })
76
86
  const data = {
77
87
  id: returnOrder.id,
78
88
  name: returnOrder.name,
@@ -85,7 +95,9 @@ router.get(
85
95
  bizplace: returnOrder.bizplace ? { id: returnOrder.bizplace.id, name: returnOrder.bizplace.name } : null,
86
96
  creator: returnOrder.creator ? { id: returnOrder.creator.id, name: returnOrder.creator.name } : null,
87
97
  updater: returnOrder.updater ? { id: returnOrder.updater.id, name: returnOrder.updater.name } : null,
88
- acceptedBy: returnOrder.acceptedBy ? { id: returnOrder.acceptedBy.id, name: returnOrder.acceptedBy.name } : null,
98
+ acceptedBy: returnOrder.acceptedBy
99
+ ? { id: returnOrder.acceptedBy.id, name: returnOrder.acceptedBy.name }
100
+ : null,
89
101
  createdAt: returnOrder.createdAt,
90
102
  updatedAt: returnOrder.updatedAt,
91
103
  itemInfos