@things-factory/operato-wms 4.1.37 → 4.1.38

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 (24) hide show
  1. package/client/pages/inventory/non-loaded-inventory.js +83 -15
  2. package/dist-server/graphql/resolvers/dashboard/index.js +3 -1
  3. package/dist-server/graphql/resolvers/dashboard/index.js.map +1 -1
  4. package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js +51 -0
  5. package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js.map +1 -0
  6. package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +58 -0
  7. package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -0
  8. package/dist-server/graphql/types/dashboard/index.js +5 -1
  9. package/dist-server/graphql/types/dashboard/index.js.map +1 -1
  10. package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js +16 -0
  11. package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js.map +1 -0
  12. package/dist-server/graphql/types/dashboard/inventory-expiry-status.js +14 -0
  13. package/dist-server/graphql/types/dashboard/inventory-expiry-status.js.map +1 -0
  14. package/helps/release-note.ko.md +37 -2
  15. package/helps/release-note.md +12 -41
  16. package/helps/release-note.ms.md +36 -1
  17. package/helps/release-note.zh.md +36 -1
  18. package/package.json +6 -6
  19. package/server/graphql/resolvers/dashboard/index.ts +5 -1
  20. package/server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts +49 -0
  21. package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +65 -0
  22. package/server/graphql/types/dashboard/index.ts +5 -1
  23. package/server/graphql/types/dashboard/inventory-expiry-counter.ts +10 -0
  24. package/server/graphql/types/dashboard/inventory-expiry-status.ts +8 -0
@@ -65,7 +65,11 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
65
65
 
66
66
  get context() {
67
67
  return {
68
- title: i18next.t('title.non_loaded_inventory')
68
+ title: i18next.t('title.non_loaded_inventory'),
69
+ exportable: {
70
+ name: i18next.t('title.non_loaded_inventory'),
71
+ data: this._exportableData.bind(this)
72
+ }
69
73
  }
70
74
  }
71
75
 
@@ -73,24 +77,22 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
73
77
  this.config = {
74
78
  list: {
75
79
  fields: [
76
- 'roNo',
80
+ 'releaseOrderNo',
77
81
  'palletId',
78
82
  'cartonId',
79
83
  'batchId',
80
84
  'productSku',
81
- 'productInformation',
82
- 'product_brand',
85
+ 'productName',
86
+ 'productBrand',
83
87
  'packingType',
84
- 'qty',
85
- 'uomValue',
88
+ 'pickedQty',
89
+ 'pickedUomValue',
86
90
  'uom',
87
91
  'binLocation'
88
92
  ]
89
93
  },
90
- pagination: { pages: [20, 50, 100, 500, 999] },
91
- rows: {
92
- appendable: false
93
- },
94
+ pagination: { pages: [50, 100, 200, 500] },
95
+ rows: { appendable: false },
94
96
  columns: [
95
97
  { type: 'gutter', gutterName: 'sequence' },
96
98
  { type: 'gutter', gutterName: 'row-selector', multiple: true },
@@ -98,20 +100,28 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
98
100
  type: 'string',
99
101
  name: 'releaseOrderNo',
100
102
  header: i18next.t('field.ro_no'),
101
- sortable: true,
103
+ label: true,
104
+ width: 150
105
+ },
106
+ {
107
+ type: 'string',
108
+ name: 'refNo',
109
+ header: i18next.t('field.ref_no'),
110
+ label: true,
102
111
  width: 150
103
112
  },
104
113
  {
105
114
  type: 'string',
106
115
  name: 'palletId',
107
116
  header: i18next.t('field.lot_id'),
108
- sortable: true,
117
+ label: true,
109
118
  width: 150
110
119
  },
111
120
  {
112
121
  type: 'string',
113
122
  name: 'cartonId',
114
123
  header: i18next.t('field.carton_id'),
124
+ label: true,
115
125
  sortable: true,
116
126
  width: 120
117
127
  },
@@ -119,14 +129,14 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
119
129
  type: 'string',
120
130
  name: 'batchId',
121
131
  header: i18next.t('field.batch_id'),
122
- imex: { header: i18next.t('field.batch_id'), key: 'batchId', width: 30, type: 'string' },
123
- sortable: true,
132
+ label: true,
124
133
  width: 120
125
134
  },
126
135
  {
127
136
  type: 'string',
128
137
  name: 'productSku',
129
138
  header: i18next.t('field.sku'),
139
+ label: true,
130
140
  sortable: true,
131
141
  width: 150
132
142
  },
@@ -134,6 +144,7 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
134
144
  type: 'string',
135
145
  name: 'productName',
136
146
  header: i18next.t('field.product'),
147
+ label: true,
137
148
  sortable: true,
138
149
  width: 250
139
150
  },
@@ -141,6 +152,7 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
141
152
  type: 'string',
142
153
  name: 'productBrand',
143
154
  header: i18next.t('field.brand'),
155
+ label: true,
144
156
  sortable: true,
145
157
  width: 150
146
158
  },
@@ -148,6 +160,7 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
148
160
  type: 'string',
149
161
  name: 'packingType',
150
162
  header: i18next.t('field.packing_type'),
163
+ label: true,
151
164
  sortable: true,
152
165
  width: 150
153
166
  },
@@ -155,18 +168,21 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
155
168
  type: 'number',
156
169
  name: 'pickedQty',
157
170
  header: i18next.t('field.qty'),
171
+ label: true,
158
172
  width: 80
159
173
  },
160
174
  {
161
175
  type: 'float',
162
176
  name: 'pickedUomValue',
163
177
  header: i18next.t('field.total_uom_value'),
178
+ label: true,
164
179
  width: 110
165
180
  },
166
181
  {
167
182
  type: 'string',
168
183
  name: 'uom',
169
184
  header: i18next.t('field.uom'),
185
+ label: true,
170
186
  sortable: true,
171
187
  width: 80
172
188
  },
@@ -174,6 +190,7 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
174
190
  type: 'string',
175
191
  name: 'binLocation',
176
192
  header: i18next.t('field.bin_location'),
193
+ label: true,
177
194
  sortable: true,
178
195
  width: 120
179
196
  }
@@ -211,6 +228,12 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
211
228
  type: 'text',
212
229
  props: { searchOper: 'i_like' }
213
230
  },
231
+ {
232
+ label: i18next.t('field.ref_no'),
233
+ name: 'refNo',
234
+ type: 'text',
235
+ props: { searchOper: 'i_like' }
236
+ },
214
237
  {
215
238
  label: i18next.t('field.bin_location'),
216
239
  name: 'binLocation',
@@ -243,6 +266,7 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
243
266
  items {
244
267
  releaseGood {
245
268
  name
269
+ refNo
246
270
  }
247
271
  inventory {
248
272
  palletId
@@ -287,11 +311,55 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
287
311
  binLocation: item.binLocation.name,
288
312
  palletId: item.inventory.palletId,
289
313
  cartonId: item.inventory.cartonId,
290
- releaseOrderNo: item.releaseGood.name
314
+ releaseOrderNo: item.releaseGood.name,
315
+ refNo: item.releaseGood.refNo
291
316
  }
292
317
  }) || []
293
318
  }
294
319
  }
320
+
321
+ async _exportableData() {
322
+ try {
323
+ let data = []
324
+
325
+ var headerSetting = [
326
+ { header: i18next.t('field.ro_no'), key: 'releaseOrderNo', width: 50, type: 'string' },
327
+ { header: i18next.t('field.ref_no'), key: 'refNo', width: 50, type: 'string' },
328
+ { header: i18next.t('field.lot_id'), key: 'palletId', width: 50, type: 'string' },
329
+ { header: i18next.t('field.carton_id'), key: 'cartonId', width: 50, type: 'string' },
330
+ { header: i18next.t('field.batch_id'), key: 'batchId', width: 25, type: 'string' },
331
+ { header: i18next.t('field.sku'), key: 'productSku', width: 25, type: 'string' },
332
+ { header: i18next.t('field.product'), key: 'productName', width: 25, type: 'string' },
333
+ { header: i18next.t('field.brand'), key: 'productBrand', width: 25, type: 'string' },
334
+ { header: i18next.t('field.packing_type'), key: 'packingType', width: 25, type: 'string' },
335
+ { header: i18next.t('field.qty'), key: 'pickedQty', width: 25, type: 'string' },
336
+ { header: i18next.t('field.total_uom_value'), key: 'pickedUomValue', width: 25, type: 'float' },
337
+ { header: i18next.t('field.uom'), key: 'uom', width: 25, type: 'string' },
338
+ { header: i18next.t('field.bin_location'), key: 'binLocation', width: 25, type: 'string' }
339
+ ]
340
+
341
+ if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
342
+ data = this.dataGrist.selected
343
+ } else {
344
+ data = (await this.fetchHandler({ page: 1, limit: 9999999 })).records
345
+ }
346
+
347
+ return { header: headerSetting, data }
348
+ } catch (e) {
349
+ this._showToast(e)
350
+ }
351
+ }
352
+
353
+ _showToast({ type, message }) {
354
+ document.dispatchEvent(
355
+ new CustomEvent('notify', {
356
+ detail: {
357
+ type,
358
+ message
359
+ }
360
+ })
361
+ )
362
+ }
295
363
  }
296
364
 
297
365
  window.customElements.define('non-loaded-inventory', NonLoadedInventory)
@@ -4,6 +4,8 @@ exports.Query = void 0;
4
4
  const arrival_notices_by_status_1 = require("./arrival-notices-by-status");
5
5
  const collection_orders_by_status_1 = require("./collection-orders-by-status");
6
6
  const delivery_orders_by_status_1 = require("./delivery-orders-by-status");
7
+ const inventory_expiry_monitor_1 = require("./inventory-expiry-monitor");
8
+ const outbound_order_by_status_1 = require("./outbound-order-by-status");
7
9
  const release_goods_by_status_1 = require("./release-goods-by-status");
8
- exports.Query = Object.assign(Object.assign(Object.assign(Object.assign({}, arrival_notices_by_status_1.arrivalNoticesByStatusResolver), collection_orders_by_status_1.collectionOrdersByStatusResolver), delivery_orders_by_status_1.deliveryOrdersByStatusResolver), release_goods_by_status_1.releaseGoodsByStatusResolver);
10
+ exports.Query = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, arrival_notices_by_status_1.arrivalNoticesByStatusResolver), collection_orders_by_status_1.collectionOrdersByStatusResolver), delivery_orders_by_status_1.deliveryOrdersByStatusResolver), release_goods_by_status_1.releaseGoodsByStatusResolver), outbound_order_by_status_1.outboundOrderByStatusResolver), inventory_expiry_monitor_1.inventoryExpiryMonitorResolver);
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/dashboard/index.ts"],"names":[],"mappings":";;;AAAA,2EAA4E;AAC5E,+EAAgF;AAChF,2EAA4E;AAC5E,uEAAwE;AAE3D,QAAA,KAAK,+DACb,0DAA8B,GAC9B,8DAAgC,GAChC,0DAA8B,GAC9B,sDAA4B,EAChC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/dashboard/index.ts"],"names":[],"mappings":";;;AAAA,2EAA4E;AAC5E,+EAAgF;AAChF,2EAA4E;AAC5E,yEAA2E;AAC3E,yEAA0E;AAC1E,uEAAwE;AAE3D,QAAA,KAAK,2FACb,0DAA8B,GAC9B,8DAAgC,GAChC,0DAA8B,GAC9B,sDAA4B,GAC5B,wDAA6B,GAC7B,yDAA8B,EAClC"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.inventoryExpiryMonitorResolver = void 0;
15
+ exports.inventoryExpiryMonitorResolver = {
16
+ async inventoryExpiryMonitor(_, params, context) {
17
+ const { domain, tx } = context.state;
18
+ const expInventories = await tx.query(`
19
+ SELECT "location", sum("expired") AS "expired", sum("thirtyDays") AS "thirtyDays", sum("fortyFiveDays") AS "fortyFiveDays", sum("sixtyDays") AS "sixtyDays" FROM (
20
+ SELECT
21
+ CASE WHEN l.TYPE IN ('QUARANTINE','RESERVE') THEN 'QUARANTINED' ELSE 'IN SHELF' END AS "location",
22
+ CASE WHEN i.expiration_date - now()::date <= 0 THEN 1 ELSE 0 END AS "expired",
23
+ CASE WHEN i.expiration_date - now()::date > 0 AND i.expiration_date - now()::date <= 30 THEN 1 ELSE 0 END AS "thirtyDays",
24
+ CASE WHEN i.expiration_date - now()::date > 30 AND i.expiration_date - now()::date <= 45 THEN 1 ELSE 0 END AS "fortyFiveDays",
25
+ CASE WHEN i.expiration_date - now()::date > 45 AND i.expiration_date - now()::date <= 60 THEN 1 ELSE 0 END AS "sixtyDays"
26
+ FROM inventories i
27
+ INNER JOIN locations l ON i.location_id = l.id
28
+ WHERE i.expiration_date - now()::date <= 60
29
+ AND i.expiration_date NOTNULL
30
+ AND i.status = 'STORED'
31
+ AND i.domain_id = $1
32
+ ) AS foo
33
+ GROUP BY "location"
34
+ `, [domain.id]);
35
+ return {
36
+ quarantined: getExpiryCountByStatus(expInventories, 'QUARANTINED'),
37
+ inShelf: getExpiryCountByStatus(expInventories, 'IN SHELF')
38
+ };
39
+ }
40
+ };
41
+ function getExpiryCountByStatus(expInventories, location) {
42
+ let matchedInv = expInventories.find(inv => inv.location == location);
43
+ if (matchedInv)
44
+ return ((_a) => {
45
+ var { location } = _a, inv = __rest(_a, ["location"]);
46
+ return inv;
47
+ })(matchedInv);
48
+ else
49
+ return { expired: 0, thirtyDays: 0, fortyFiveDays: 0, sixtyDays: 0 };
50
+ }
51
+ //# sourceMappingURL=inventory-expiry-monitor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inventory-expiry-monitor.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAKa,QAAA,8BAA8B,GAAG;IAC5C,KAAK,CAAC,sBAAsB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QAClE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAEvF,MAAM,cAAc,GAMd,MAAM,EAAE,CAAC,KAAK,CAClB;;;;;;;;;;;;;;;;KAgBD,EACC,CAAC,MAAM,CAAC,EAAE,CAAC,CACZ,CAAA;QAED,OAAO;YACL,WAAW,EAAE,sBAAsB,CAAC,cAAc,EAAE,aAAa,CAAC;YAClE,OAAO,EAAE,sBAAsB,CAAC,cAAc,EAAE,UAAU,CAAC;SAC5D,CAAA;IACH,CAAC;CACF,CAAA;AAED,SAAS,sBAAsB,CAAC,cAAc,EAAE,QAAQ;IACtD,IAAI,UAAU,GAAQ,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAA;IAE1E,IAAI,UAAU;QAAE,OAAO,CAAC,CAAC,EAAoB,EAAE,EAAE;gBAAxB,EAAE,QAAQ,OAAU,EAAL,GAAG,cAAlB,YAAoB,CAAF;YAAO,OAAA,GAAG,CAAA;SAAA,CAAC,CAAC,UAAU,CAAC,CAAA;;QAC7D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAA;AAC3E,CAAC"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.outboundOrderByStatusResolver = void 0;
4
+ exports.outboundOrderByStatusResolver = {
5
+ async outboundOrderByStatus(_, params, context) {
6
+ const { domain, user, tx } = context.state;
7
+ const orderStatus = await tx.query(`
8
+ (
9
+ SELECT "status", COUNT(*) AS "count" FROM (
10
+ SELECT
11
+ CASE WHEN "status" = 'DEACTIVATED' AND "assignee_id" ISNULL AND "type" = 'PICKING' THEN 'PICKING UNASSIGNED'
12
+ WHEN "status" = 'EXECUTING' AND "assignee_id" NOTNULL AND "type" = 'PICKING' THEN 'PICKING ASSIGNED'
13
+ WHEN "status" = 'EXECUTING' AND "type" = 'PACKING' THEN 'PACKING'
14
+ END AS "status" FROM worksheets ws
15
+ WHERE "domain_id" = $1
16
+ ) AS foo
17
+ WHERE status IN ('PICKING ASSIGNED', 'PICKING UNASSIGNED', 'PACKING')
18
+ GROUP BY "status"
19
+ ) UNION ALL (
20
+ SELECT "status", COUNT(id) AS "count" FROM release_goods rg
21
+ WHERE "status" IN ('DONE', 'CANCELLED')
22
+ AND "domain_id" = $1
23
+ GROUP BY "status"
24
+ ) UNION ALL (
25
+ SELECT "status", COUNT(*) AS "count" FROM (
26
+ SELECT
27
+ CASE WHEN mf."status"::VARCHAR = 'OPEN' THEN 'AWAITING DISPATCH'
28
+ WHEN mf."status"::VARCHAR = 'CLOSED' AND rg."status" != 'DONE' THEN 'OUT FROM WAREHOUSE'
29
+ END AS "status"
30
+ FROM manifests mf
31
+ LEFT JOIN release_goods rg ON mf."id" = rg."manifest_id"
32
+ WHERE mf."domain_id" = $1
33
+ ) AS foo
34
+ WHERE status IN ('AWAITING DISPATCH', 'OUT FROM WAREHOUSE')
35
+ GROUP BY "status"
36
+ )
37
+ `, [domain.id]);
38
+ const statusList = [
39
+ 'PICKING UNASSIGNED',
40
+ 'PICKING ASSIGNED',
41
+ 'PACKING',
42
+ 'AWAITING DISPATCH',
43
+ 'OUT FROM WAREHOUSE',
44
+ 'CANCELLED',
45
+ 'DONE',
46
+ 'OUT OF STOCK'
47
+ ];
48
+ return statusList.reduce((statusCounts, status) => {
49
+ let foundItem = orderStatus.find(order => order.status == status);
50
+ if (foundItem)
51
+ statusCounts.push({ status, count: foundItem.count });
52
+ else
53
+ statusCounts.push({ status, count: 0 });
54
+ return statusCounts;
55
+ }, []);
56
+ }
57
+ };
58
+ //# sourceMappingURL=outbound-order-by-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outbound-order-by-status.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/dashboard/outbound-order-by-status.ts"],"names":[],"mappings":";;;AAKa,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;QAE7F,MAAM,WAAW,GAAwC,MAAM,EAAE,CAAC,KAAK,CACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BD,EACC,CAAC,MAAM,CAAC,EAAE,CAAC,CACZ,CAAA;QAED,MAAM,UAAU,GAAa;YAC3B,oBAAoB;YACpB,kBAAkB;YAClB,SAAS;YACT,mBAAmB;YACnB,oBAAoB;YACpB,WAAW;YACX,MAAM;YACN,cAAc;SACf,CAAA;QAED,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,YAAiD,EAAE,MAAc,EAAE,EAAE;YAC7F,IAAI,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,CAAA;YAEjE,IAAI,SAAS;gBAAE,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC,CAAA;;gBAC/D,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAA;YAE5C,OAAO,YAAY,CAAA;QACrB,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC;CACF,CAAA"}
@@ -1,12 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Types = exports.Query = void 0;
4
+ const inventory_expiry_counter_1 = require("./inventory-expiry-counter");
5
+ const inventory_expiry_status_1 = require("./inventory-expiry-status");
4
6
  const order_status_counter_1 = require("./order-status-counter");
5
7
  exports.Query = `
6
8
  arrivalNoticesByStatus(filters: [Filter]): [OrderStatusCounter] @transaction
7
9
  collectionOrdersByStatus(filters: [Filter]): [OrderStatusCounter] @transaction
8
10
  deliveryOrdersByStatus(filters: [Filter]): [OrderStatusCounter] @transaction
9
11
  releaseGoodsByStatus(filters: [Filter]): [OrderStatusCounter] @transaction
12
+ outboundOrderByStatus(filters: [Filter]): [OrderStatusCounter] @transaction
13
+ inventoryExpiryMonitor(filters: [Filter]): InventoryExpiryStatus @transaction
10
14
  `;
11
- exports.Types = [order_status_counter_1.OrderStatusCounter];
15
+ exports.Types = [inventory_expiry_counter_1.InventoryExpiryCounter, inventory_expiry_status_1.InventoryExpiryStatus, order_status_counter_1.OrderStatusCounter];
12
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/dashboard/index.ts"],"names":[],"mappings":";;;AAAA,iEAA2D;AAE9C,QAAA,KAAK,GAAiB;;;;;CAKlC,CAAA;AACY,QAAA,KAAK,GAAG,CAAC,yCAAkB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/dashboard/index.ts"],"names":[],"mappings":";;;AAAA,yEAAmE;AACnE,uEAAiE;AACjE,iEAA2D;AAE9C,QAAA,KAAK,GAAiB;;;;;;;CAOlC,CAAA;AACY,QAAA,KAAK,GAAG,CAAC,iDAAsB,EAAE,+CAAqB,EAAE,yCAAkB,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InventoryExpiryCounter = void 0;
7
+ const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
+ exports.InventoryExpiryCounter = (0, graphql_tag_1.default) `
9
+ type InventoryExpiryCounter {
10
+ expired: Int
11
+ thirtyDays: Int
12
+ fortyFiveDays: Int
13
+ sixtyDays: Int
14
+ }
15
+ `;
16
+ //# sourceMappingURL=inventory-expiry-counter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inventory-expiry-counter.js","sourceRoot":"","sources":["../../../../server/graphql/types/dashboard/inventory-expiry-counter.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;CAOxC,CAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InventoryExpiryStatus = void 0;
7
+ const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
+ exports.InventoryExpiryStatus = (0, graphql_tag_1.default) `
9
+ type InventoryExpiryStatus {
10
+ quarantined: InventoryExpiryCounter
11
+ inShelf: InventoryExpiryCounter
12
+ }
13
+ `;
14
+ //# sourceMappingURL=inventory-expiry-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inventory-expiry-status.js","sourceRoot":"","sources":["../../../../server/graphql/types/dashboard/inventory-expiry-status.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,qBAAqB,GAAG,IAAA,qBAAG,EAAA;;;;;CAKvC,CAAA"}
@@ -1,3 +1,38 @@
1
- # 알림
1
+ # NOTICE BOARD
2
2
 
3
- 이 알림은 Operato WMS를 위해 마크다운 형식으로 작성된 샘플입니다.
3
+ <div align="center">
4
+
5
+ ## 23rd March Updates
6
+
7
+ Hope you are all doing well and are positively negative.
8
+
9
+ We are launching a new feature on **31 March 2022** (Thursday).
10
+
11
+ Apologies for the inconvenience.
12
+
13
+ <br>
14
+
15
+ ## Product Level Picking Strategy
16
+
17
+ This feature will help you to
18
+
19
+ **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
20
+ **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
21
+ **One-time setting to relieve your load from selecting inventory during worksheet processing.**
22
+
23
+ <br>
24
+
25
+ You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
26
+
27
+ Otherwise, the default picking strategy (FIFO) will be set to all products.
28
+
29
+ For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
30
+
31
+ Please get in touch with support@hatio.asia if you need assistance.
32
+
33
+ <br>
34
+
35
+ _**Team Hatio**
36
+ Reimagining warehousing and fulfilment in South East Asia_
37
+
38
+ </div>
@@ -2,66 +2,37 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- ## 17th February Updates
5
+ ## 23rd March Updates
6
6
 
7
- Inventory histories excel report will be disabled temporarily and will be available on the **22nd February.**
7
+ Hope you are all doing well and are positively negative.
8
8
 
9
- Kindly contact support to assist in providing inventory histories details if needed.
9
+ We are launching a new feature on **31 March 2022** (Thursday).
10
10
 
11
11
  Apologies for the inconvenience.
12
12
 
13
13
  <br>
14
14
 
15
- ## 9th Feb 2022 Updates
15
+ ## Product Level Picking Strategy
16
16
 
17
- January flewby without us noticing, and we're at the very last day until we go off for a Roaring Start of the Year!
17
+ This feature will help you to
18
18
 
19
- We will be rolling out Operato Version 4 once we are back from our break on the **9th of February.**
20
-
21
- In this upcoming version, we have squashed a bunch of bugs, improved the UI/UX and introduced performance enhancements.
22
-
23
- With the help of your feedbacks, our latest product update is part of an ongoing effort to provide an overall better user experience.
19
+ **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
20
+ **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
21
+ **One-time setting to relieve your load from selecting inventory during worksheet processing.**
24
22
 
25
23
  <br>
26
24
 
27
- <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
28
- <tbody>
29
- <tr>
30
- <td style="width: 300px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px"><strong>Features</strong></span></td>
31
- <td style="width: 387px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px"><strong>Description</strong></span></td>
32
- </tr>
33
- <tr>
34
- <td style="width: 300px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px">Bulk Product Selection for Arrival Notice</span></td>
35
- <td style="width: 387px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px">Ability to select multiple records when creating arrival notice</span></td>
36
- </tr>
37
- <tr>
38
- <td style="width: 300px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px">Improved Unloading, Putaway, Picking &amp; Packing UI</span></td>
39
- <td style="width: 387px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px">Layout is more concise to streamline the user experience</span></td>
40
- </tr>
41
- <tr>
42
- <td style="width: 300px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px">Improved Undo Process</span></td>
43
- <td style="width: 387px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px">Instead of selecting, you can now scan the lot/carton ID to undo</span></td>
44
- </tr>
45
- <tr>
46
- <td style="width: 300px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px">Release Notes</span></td>
47
- <td style="width: 387px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><span style="font-size:12px">Future release notes is accessible in WMS under settings</span></td>
48
- </tr>
49
- </tbody>
50
- </table>
25
+ You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
51
26
 
52
- <br>
27
+ Otherwise, the default picking strategy (FIFO) will be set to all products.
53
28
 
54
- [Click Here for Version 4 Preview & Updates](http://bit.ly/operatov4updates 'Hatio Operato V4 Updates')
29
+ For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
55
30
 
56
- We thank you for your patience and we strive to provide you with better experience this coming year!
57
-
58
- Signing Off the year of the Rat and onwards to a roaring good year!
31
+ Please get in touch with support@hatio.asia if you need assistance.
59
32
 
60
33
  <br>
61
34
 
62
35
  _**Team Hatio**
63
36
  Reimagining warehousing and fulfilment in South East Asia_
64
37
 
65
- ### 恭喜發财,新一年祝大家龍精虎猛,虎虎生威
66
-
67
38
  </div>
@@ -1,3 +1,38 @@
1
1
  # NOTICE BOARD
2
2
 
3
- This is a sample notice board written in markdown for Operato WMS.
3
+ <div align="center">
4
+
5
+ ## 23rd March Updates
6
+
7
+ Hope you are all doing well and are positively negative.
8
+
9
+ We are launching a new feature on **31 March 2022** (Thursday).
10
+
11
+ Apologies for the inconvenience.
12
+
13
+ <br>
14
+
15
+ ## Product Level Picking Strategy
16
+
17
+ This feature will help you to
18
+
19
+ **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
20
+ **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
21
+ **One-time setting to relieve your load from selecting inventory during worksheet processing.**
22
+
23
+ <br>
24
+
25
+ You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
26
+
27
+ Otherwise, the default picking strategy (FIFO) will be set to all products.
28
+
29
+ For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
30
+
31
+ Please get in touch with support@hatio.asia if you need assistance.
32
+
33
+ <br>
34
+
35
+ _**Team Hatio**
36
+ Reimagining warehousing and fulfilment in South East Asia_
37
+
38
+ </div>
@@ -1,3 +1,38 @@
1
1
  # NOTICE BOARD
2
2
 
3
- This is a sample notice board written in markdown for Operato WMS.
3
+ <div align="center">
4
+
5
+ ## 23rd March Updates
6
+
7
+ Hope you are all doing well and are positively negative.
8
+
9
+ We are launching a new feature on **31 March 2022** (Thursday).
10
+
11
+ Apologies for the inconvenience.
12
+
13
+ <br>
14
+
15
+ ## Product Level Picking Strategy
16
+
17
+ This feature will help you to
18
+
19
+ **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
20
+ **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
21
+ **One-time setting to relieve your load from selecting inventory during worksheet processing.**
22
+
23
+ <br>
24
+
25
+ You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
26
+
27
+ Otherwise, the default picking strategy (FIFO) will be set to all products.
28
+
29
+ For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
30
+
31
+ Please get in touch with support@hatio.asia if you need assistance.
32
+
33
+ <br>
34
+
35
+ _**Team Hatio**
36
+ Reimagining warehousing and fulfilment in South East Asia_
37
+
38
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.1.37",
3
+ "version": "4.1.38",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -84,9 +84,9 @@
84
84
  "@things-factory/print-proxy-service": "^4.1.28",
85
85
  "@things-factory/print-service": "^4.1.28",
86
86
  "@things-factory/print-ui": "^4.1.28",
87
- "@things-factory/product-base": "^4.1.37",
87
+ "@things-factory/product-base": "^4.1.38",
88
88
  "@things-factory/resource-ui": "^4.1.28",
89
- "@things-factory/sales-ui": "^4.1.37",
89
+ "@things-factory/sales-ui": "^4.1.38",
90
90
  "@things-factory/scene-data-transform": "^4.1.28",
91
91
  "@things-factory/scene-excel": "^4.1.28",
92
92
  "@things-factory/scene-firebase": "^4.1.28",
@@ -102,11 +102,11 @@
102
102
  "@things-factory/system-ui": "^4.1.28",
103
103
  "@things-factory/transport-base": "^4.1.37",
104
104
  "@things-factory/tutorial-ui": "^4.1.28",
105
- "@things-factory/warehouse-base": "^4.1.37",
106
- "@things-factory/worksheet-base": "^4.1.37"
105
+ "@things-factory/warehouse-base": "^4.1.38",
106
+ "@things-factory/worksheet-base": "^4.1.38"
107
107
  },
108
108
  "devDependencies": {
109
109
  "@things-factory/builder": "^4.1.28"
110
110
  },
111
- "gitHead": "cc34a73ab56ed192e1f2babe6954a817c473a46c"
111
+ "gitHead": "eb948e4d5022d89a2950aeb71f82bbf8d5607d74"
112
112
  }
@@ -1,11 +1,15 @@
1
1
  import { arrivalNoticesByStatusResolver } from './arrival-notices-by-status'
2
2
  import { collectionOrdersByStatusResolver } from './collection-orders-by-status'
3
3
  import { deliveryOrdersByStatusResolver } from './delivery-orders-by-status'
4
+ import { inventoryExpiryMonitorResolver } from './inventory-expiry-monitor'
5
+ import { outboundOrderByStatusResolver } from './outbound-order-by-status'
4
6
  import { releaseGoodsByStatusResolver } from './release-goods-by-status'
5
7
 
6
8
  export const Query = {
7
9
  ...arrivalNoticesByStatusResolver,
8
10
  ...collectionOrdersByStatusResolver,
9
11
  ...deliveryOrdersByStatusResolver,
10
- ...releaseGoodsByStatusResolver
12
+ ...releaseGoodsByStatusResolver,
13
+ ...outboundOrderByStatusResolver,
14
+ ...inventoryExpiryMonitorResolver
11
15
  }
@@ -0,0 +1,49 @@
1
+ import { EntityManager } from 'typeorm'
2
+
3
+ import { User } from '@things-factory/auth-base'
4
+ import { Domain, ListParam } from '@things-factory/shell'
5
+
6
+ export const inventoryExpiryMonitorResolver = {
7
+ async inventoryExpiryMonitor(_: any, params: ListParam, context: any) {
8
+ const { domain, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state
9
+
10
+ const expInventories: {
11
+ location: string
12
+ expired: number
13
+ thirtyDays: number
14
+ fortyFiveDays: number
15
+ sixtyDays: number
16
+ }[] = await tx.query(
17
+ `
18
+ SELECT "location", sum("expired") AS "expired", sum("thirtyDays") AS "thirtyDays", sum("fortyFiveDays") AS "fortyFiveDays", sum("sixtyDays") AS "sixtyDays" FROM (
19
+ SELECT
20
+ CASE WHEN l.TYPE IN ('QUARANTINE','RESERVE') THEN 'QUARANTINED' ELSE 'IN SHELF' END AS "location",
21
+ CASE WHEN i.expiration_date - now()::date <= 0 THEN 1 ELSE 0 END AS "expired",
22
+ CASE WHEN i.expiration_date - now()::date > 0 AND i.expiration_date - now()::date <= 30 THEN 1 ELSE 0 END AS "thirtyDays",
23
+ CASE WHEN i.expiration_date - now()::date > 30 AND i.expiration_date - now()::date <= 45 THEN 1 ELSE 0 END AS "fortyFiveDays",
24
+ CASE WHEN i.expiration_date - now()::date > 45 AND i.expiration_date - now()::date <= 60 THEN 1 ELSE 0 END AS "sixtyDays"
25
+ FROM inventories i
26
+ INNER JOIN locations l ON i.location_id = l.id
27
+ WHERE i.expiration_date - now()::date <= 60
28
+ AND i.expiration_date NOTNULL
29
+ AND i.status = 'STORED'
30
+ AND i.domain_id = $1
31
+ ) AS foo
32
+ GROUP BY "location"
33
+ `,
34
+ [domain.id]
35
+ )
36
+
37
+ return {
38
+ quarantined: getExpiryCountByStatus(expInventories, 'QUARANTINED'),
39
+ inShelf: getExpiryCountByStatus(expInventories, 'IN SHELF')
40
+ }
41
+ }
42
+ }
43
+
44
+ function getExpiryCountByStatus(expInventories, location) {
45
+ let matchedInv: any = expInventories.find(inv => inv.location == location)
46
+
47
+ if (matchedInv) return (({ location, ...inv }) => inv)(matchedInv)
48
+ else return { expired: 0, thirtyDays: 0, fortyFiveDays: 0, sixtyDays: 0 }
49
+ }
@@ -0,0 +1,65 @@
1
+ import { EntityManager } from 'typeorm'
2
+
3
+ import { User } from '@things-factory/auth-base'
4
+ import { Domain, ListParam } from '@things-factory/shell'
5
+
6
+ export const outboundOrderByStatusResolver = {
7
+ async outboundOrderByStatus(_: any, params: ListParam, context: any) {
8
+ const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state
9
+
10
+ const orderStatus: { status: string; count: number }[] = await tx.query(
11
+ `
12
+ (
13
+ SELECT "status", COUNT(*) AS "count" FROM (
14
+ SELECT
15
+ CASE WHEN "status" = 'DEACTIVATED' AND "assignee_id" ISNULL AND "type" = 'PICKING' THEN 'PICKING UNASSIGNED'
16
+ WHEN "status" = 'EXECUTING' AND "assignee_id" NOTNULL AND "type" = 'PICKING' THEN 'PICKING ASSIGNED'
17
+ WHEN "status" = 'EXECUTING' AND "type" = 'PACKING' THEN 'PACKING'
18
+ END AS "status" FROM worksheets ws
19
+ WHERE "domain_id" = $1
20
+ ) AS foo
21
+ WHERE status IN ('PICKING ASSIGNED', 'PICKING UNASSIGNED', 'PACKING')
22
+ GROUP BY "status"
23
+ ) UNION ALL (
24
+ SELECT "status", COUNT(id) AS "count" FROM release_goods rg
25
+ WHERE "status" IN ('DONE', 'CANCELLED')
26
+ AND "domain_id" = $1
27
+ GROUP BY "status"
28
+ ) UNION ALL (
29
+ SELECT "status", COUNT(*) AS "count" FROM (
30
+ SELECT
31
+ CASE WHEN mf."status"::VARCHAR = 'OPEN' THEN 'AWAITING DISPATCH'
32
+ WHEN mf."status"::VARCHAR = 'CLOSED' AND rg."status" != 'DONE' THEN 'OUT FROM WAREHOUSE'
33
+ END AS "status"
34
+ FROM manifests mf
35
+ LEFT JOIN release_goods rg ON mf."id" = rg."manifest_id"
36
+ WHERE mf."domain_id" = $1
37
+ ) AS foo
38
+ WHERE status IN ('AWAITING DISPATCH', 'OUT FROM WAREHOUSE')
39
+ GROUP BY "status"
40
+ )
41
+ `,
42
+ [domain.id]
43
+ )
44
+
45
+ const statusList: string[] = [
46
+ 'PICKING UNASSIGNED',
47
+ 'PICKING ASSIGNED',
48
+ 'PACKING',
49
+ 'AWAITING DISPATCH',
50
+ 'OUT FROM WAREHOUSE',
51
+ 'CANCELLED',
52
+ 'DONE',
53
+ 'OUT OF STOCK'
54
+ ]
55
+
56
+ return statusList.reduce((statusCounts: { status: string; count: number }[], status: string) => {
57
+ let foundItem = orderStatus.find(order => order.status == status)
58
+
59
+ if (foundItem) statusCounts.push({ status, count: foundItem.count })
60
+ else statusCounts.push({ status, count: 0 })
61
+
62
+ return statusCounts
63
+ }, [])
64
+ }
65
+ }
@@ -1,3 +1,5 @@
1
+ import { InventoryExpiryCounter } from './inventory-expiry-counter'
2
+ import { InventoryExpiryStatus } from './inventory-expiry-status'
1
3
  import { OrderStatusCounter } from './order-status-counter'
2
4
 
3
5
  export const Query = /* GraphQL */ `
@@ -5,5 +7,7 @@ export const Query = /* GraphQL */ `
5
7
  collectionOrdersByStatus(filters: [Filter]): [OrderStatusCounter] @transaction
6
8
  deliveryOrdersByStatus(filters: [Filter]): [OrderStatusCounter] @transaction
7
9
  releaseGoodsByStatus(filters: [Filter]): [OrderStatusCounter] @transaction
10
+ outboundOrderByStatus(filters: [Filter]): [OrderStatusCounter] @transaction
11
+ inventoryExpiryMonitor(filters: [Filter]): InventoryExpiryStatus @transaction
8
12
  `
9
- export const Types = [OrderStatusCounter]
13
+ export const Types = [InventoryExpiryCounter, InventoryExpiryStatus, OrderStatusCounter]
@@ -0,0 +1,10 @@
1
+ import gql from 'graphql-tag'
2
+
3
+ export const InventoryExpiryCounter = gql`
4
+ type InventoryExpiryCounter {
5
+ expired: Int
6
+ thirtyDays: Int
7
+ fortyFiveDays: Int
8
+ sixtyDays: Int
9
+ }
10
+ `
@@ -0,0 +1,8 @@
1
+ import gql from 'graphql-tag'
2
+
3
+ export const InventoryExpiryStatus = gql`
4
+ type InventoryExpiryStatus {
5
+ quarantined: InventoryExpiryCounter
6
+ inShelf: InventoryExpiryCounter
7
+ }
8
+ `