@things-factory/operato-wms 4.1.37 → 4.1.41

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 (30) hide show
  1. package/client/pages/inventory/non-loaded-inventory.js +83 -15
  2. package/client/pages/outbound/merged-outbound-worksheet.js +80 -2
  3. package/client/pages/outbound/select-operator-popup.js +3 -3
  4. package/client/pages/outbound/single-outbound-worksheet.js +86 -4
  5. package/client/pages/outbound/worksheet-batch-picking.js +10 -2
  6. package/client/pages/outbound/worksheet-picking.js +2 -2
  7. package/dist-server/graphql/resolvers/dashboard/index.js +3 -1
  8. package/dist-server/graphql/resolvers/dashboard/index.js.map +1 -1
  9. package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js +51 -0
  10. package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js.map +1 -0
  11. package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +55 -0
  12. package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -0
  13. package/dist-server/graphql/types/dashboard/index.js +5 -1
  14. package/dist-server/graphql/types/dashboard/index.js.map +1 -1
  15. package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js +16 -0
  16. package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js.map +1 -0
  17. package/dist-server/graphql/types/dashboard/inventory-expiry-status.js +14 -0
  18. package/dist-server/graphql/types/dashboard/inventory-expiry-status.js.map +1 -0
  19. package/helps/release-note.ko.md +35 -2
  20. package/helps/release-note.md +12 -43
  21. package/helps/release-note.ms.md +34 -1
  22. package/helps/release-note.zh.md +34 -1
  23. package/package.json +50 -50
  24. package/server/graphql/resolvers/dashboard/index.ts +5 -1
  25. package/server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts +49 -0
  26. package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +62 -0
  27. package/server/graphql/types/dashboard/index.ts +5 -1
  28. package/server/graphql/types/dashboard/inventory-expiry-counter.ts +10 -0
  29. package/server/graphql/types/dashboard/inventory-expiry-status.ts +8 -0
  30. package/translations/en.json +2 -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)
@@ -1,13 +1,15 @@
1
1
  import '@things-factory/form-ui'
2
2
  import '@things-factory/grist-ui'
3
+ import './select-operator-popup'
3
4
 
4
5
  import gql from 'graphql-tag'
5
6
  import { css, html } from 'lit-element'
7
+ import { openPopup } from '@things-factory/layout-base'
6
8
 
7
9
  import { getCodeByName } from '@things-factory/code-base'
8
10
  import { i18next, localize } from '@things-factory/i18n-base'
9
11
  import { client, navigate, PageView } from '@things-factory/shell'
10
- import { ScrollbarStyles } from '@things-factory/styles'
12
+ import { ScrollbarStyles,CommonButtonStyles } from '@things-factory/styles'
11
13
  import { isMobileDevice } from '@things-factory/utils'
12
14
 
13
15
  import { WORKSHEET_TYPE } from '../constants'
@@ -63,6 +65,13 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
63
65
  name: i18next.t('title.merged_outbound_worksheet'),
64
66
  data: this._exportableData.bind(this)
65
67
  },
68
+ actions: [
69
+ {
70
+ title: i18next.t('button.assign_picker'),
71
+ action: this._assignPicker.bind(this),
72
+ ...CommonButtonStyles.activate
73
+ }
74
+ ],
66
75
  help: 'operato-wms/outbound/merged-outbound-worksheet'
67
76
  }
68
77
  }
@@ -164,10 +173,11 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
164
173
  list: {
165
174
  fields: ['name', 'bizplace', 'type', 'status', 'startedAt', 'endedAt']
166
175
  },
167
- rows: { appendable: false },
176
+ rows: { appendable: false, selectable: { multiple: true } },
168
177
  pagination: { limit: 100, pages: [20, 50, 100, 200, 500] },
169
178
  columns: [
170
179
  { type: 'gutter', gutterName: 'sequence' },
180
+ { type: 'gutter', gutterName: 'row-selector', multiple: true },
171
181
  {
172
182
  type: 'gutter',
173
183
  gutterName: 'button',
@@ -225,6 +235,14 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
225
235
  sortable: true,
226
236
  width: 100
227
237
  },
238
+ {
239
+ type: 'object',
240
+ name: 'assignee',
241
+ header: i18next.t('field.assigned_picker'),
242
+ imex: { header: i18next.t('field.assigned_picker'), key: 'assignee.name', width: 20, type: 'string' },
243
+ sortable: true,
244
+ width: 100
245
+ },
228
246
  {
229
247
  type: 'datetime',
230
248
  name: 'createdAt',
@@ -301,6 +319,10 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
301
319
  id
302
320
  name
303
321
  taskNo
322
+ assignee{
323
+ id
324
+ name
325
+ }
304
326
  bizplace {
305
327
  id
306
328
  name
@@ -404,6 +426,62 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
404
426
  }
405
427
  }
406
428
 
429
+ _assignPicker() {
430
+ try {
431
+
432
+ let selectedData = this.dataGrist.selected.filter((item)=>{return item.status =="DEACTIVATED"})
433
+
434
+ if(selectedData.length <= 0) throw new Error('No available worksheet selected')
435
+
436
+ openPopup(
437
+ html`
438
+ <select-operator-popup
439
+ @updateOperator="${async e => {
440
+ let assignee = e.detail
441
+
442
+ const response = await client.mutate({
443
+ mutation: gql`
444
+ mutation assignPickingWorker($worksheetId: [String]!, $userId: String!) {
445
+ assignPickingWorker(worksheetId: $worksheetId, userId: $userId)
446
+ }
447
+ `,
448
+ variables: { worksheetId: selectedData.map(itm => itm.id), userId: assignee.id }
449
+ })
450
+
451
+ if (!response.errors) {
452
+ this.dataGrist.fetch()
453
+ return this._showToast({ message: i18next.t('text.updated_successfully') })
454
+ }
455
+
456
+ if (this.activatable) {
457
+ if (this.orderNo) {
458
+ history.back()
459
+ }
460
+ }
461
+ }}"
462
+ ></select-operator-popup>
463
+ `,
464
+ {
465
+ backdrop: true,
466
+ size: 'medium',
467
+ title: 'select operator'
468
+ }
469
+ )
470
+ } catch (error) {
471
+ return this._showToast(error)
472
+ }
473
+ }
474
+ _showToast({ type, message }) {
475
+ document.dispatchEvent(
476
+ new CustomEvent('notify', {
477
+ detail: {
478
+ type,
479
+ message
480
+ }
481
+ })
482
+ )
483
+ }
484
+
407
485
  _exportableData() {
408
486
  let records = []
409
487
  if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
@@ -120,8 +120,8 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
120
120
 
121
121
  const response = await client.query({
122
122
  query: gql`
123
- query($bizplaceId: String!, $name: String, $email: String) {
124
- pickingAssignmentStatusByUsers(bizplaceId: $bizplaceId, name: $name, email: $email) {
123
+ query pickingAssignmentStatusByUsers($name: String, $email: String) {
124
+ pickingAssignmentStatusByUsers(name: $name, email: $email) {
125
125
  user {
126
126
  id
127
127
  name
@@ -136,7 +136,7 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
136
136
  }
137
137
  }
138
138
  `,
139
- variables: { bizplaceId: this.bizplace.id, name, email }
139
+ variables: { name, email }
140
140
  })
141
141
 
142
142
  if (!response.errors) {
@@ -3,11 +3,13 @@ import '@things-factory/grist-ui'
3
3
 
4
4
  import gql from 'graphql-tag'
5
5
  import { css, html } from 'lit-element'
6
+ import { openPopup } from '@things-factory/layout-base'
6
7
 
8
+ import './select-operator-popup'
7
9
  import { getCodeByName } from '@things-factory/code-base'
8
10
  import { i18next, localize } from '@things-factory/i18n-base'
9
11
  import { client, navigate, PageView } from '@things-factory/shell'
10
- import { ScrollbarStyles } from '@things-factory/styles'
12
+ import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
11
13
  import { isMobileDevice } from '@things-factory/utils'
12
14
 
13
15
  import { WORKSHEET_STATUS, WORKSHEET_TYPE } from '../constants'
@@ -39,7 +41,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
39
41
  _searchFields: Array,
40
42
  config: Object,
41
43
  data: Object,
42
-
44
+ targetBizplace: Object,
43
45
  assignee: String,
44
46
  status: String
45
47
  }
@@ -60,10 +62,18 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
60
62
  get context() {
61
63
  return {
62
64
  title: i18next.t('title.outbound_worksheet'),
65
+ actions: [
66
+ {
67
+ title: i18next.t('button.assign_picker'),
68
+ action: this._assignPicker.bind(this),
69
+ ...CommonButtonStyles.activate
70
+ }
71
+ ],
63
72
  exportable: {
64
73
  name: i18next.t('title.outbound_worksheet'),
65
74
  data: this._exportableData.bind(this)
66
75
  },
76
+
67
77
  help: 'operato-wms/outbound/single-outbound-worksheet'
68
78
  }
69
79
  }
@@ -186,10 +196,11 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
186
196
  list: {
187
197
  fields: ['releaseGood', 'bizplace', 'type', 'releaseRefNo', 'status', 'startedAt', 'endedAt']
188
198
  },
189
- rows: { appendable: false },
199
+ rows: { selectable: { multiple: true }, appendable: false },
190
200
  pagination: { limit: 100, pages: [20, 50, 100, 200, 500] },
191
201
  columns: [
192
202
  { type: 'gutter', gutterName: 'sequence' },
203
+ { type: 'gutter', gutterName: 'row-selector', multiple: true },
193
204
  {
194
205
  type: 'gutter',
195
206
  gutterName: 'button',
@@ -276,6 +287,14 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
276
287
  sortable: true,
277
288
  width: 100
278
289
  },
290
+ {
291
+ type: 'object',
292
+ name: 'assignee',
293
+ header: i18next.t('field.assigned_picker'),
294
+ imex: { header: i18next.t('field.assigned_picker'), key: 'assignee.name', width: 20, type: 'string' },
295
+ sortable: true,
296
+ width: 100
297
+ },
279
298
  {
280
299
  type: 'datetime',
281
300
  name: 'createdAt',
@@ -351,6 +370,10 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
351
370
  items {
352
371
  id
353
372
  name
373
+ assignee{
374
+ id
375
+ name
376
+ }
354
377
  releaseGood {
355
378
  id
356
379
  name
@@ -424,11 +447,59 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
424
447
  `,
425
448
  variables: { filters }
426
449
  })
427
-
450
+ this.targetBizplace = response.data.partnersBizplaces || {}
428
451
  if (!response.errors) {
429
452
  return response.data.partnersBizplaces.items
430
453
  }
431
454
  }
455
+
456
+
457
+
458
+ _assignPicker() {
459
+ try {
460
+
461
+ let selectedData = this.dataGrist.selected.filter((item)=>{return item.status =="DEACTIVATED"})
462
+
463
+ if(selectedData.length <= 0) throw new Error('No available worksheet selected')
464
+
465
+ openPopup(
466
+ html`
467
+ <select-operator-popup
468
+ @updateOperator="${async e => {
469
+ let assignee = e.detail
470
+
471
+ const response = await client.mutate({
472
+ mutation: gql`
473
+ mutation assignPickingWorker($worksheetId: [String]!, $userId: String!) {
474
+ assignPickingWorker(worksheetId: $worksheetId, userId: $userId)
475
+ }
476
+ `,
477
+ variables: { worksheetId: selectedData.map(itm => itm.id), userId: assignee.id }
478
+ })
479
+
480
+ if (!response.errors) {
481
+ this.dataGrist.fetch()
482
+ return this._showToast({ message: i18next.t('text.updated_successfully') })
483
+ }
484
+
485
+ if (this.activatable) {
486
+ if (this.orderNo) {
487
+ history.back()
488
+ }
489
+ }
490
+ }}"
491
+ ></select-operator-popup>
492
+ `,
493
+ {
494
+ backdrop: true,
495
+ size: 'medium',
496
+ title: 'select operator'
497
+ }
498
+ )
499
+ } catch (error) {
500
+ return this._showToast(error)
501
+ }
502
+ }
432
503
 
433
504
  _modifyDateRange(e) {
434
505
  const fromDate = e.currentTarget.value
@@ -496,6 +567,17 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
496
567
  return { header: headerSetting, data: data }
497
568
  }
498
569
 
570
+ _showToast({ type, message }) {
571
+ document.dispatchEvent(
572
+ new CustomEvent('notify', {
573
+ detail: {
574
+ type,
575
+ message
576
+ }
577
+ })
578
+ )
579
+ }
580
+
499
581
  navigatePickingRelatedPages(record) {
500
582
  if (this.assigneeId) {
501
583
  const searchParams = new URLSearchParams()
@@ -124,6 +124,14 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
124
124
  })
125
125
  }
126
126
 
127
+ if (this.activatable || this.assignable) {
128
+ actions.push({
129
+ title: i18next.t('button.select_operator'),
130
+ action: this._selectOperator.bind(this),
131
+ ...CommonButtonStyles.add
132
+ })
133
+ }
134
+
127
135
  if (this.activatable) {
128
136
  actions.push({
129
137
  title: i18next.t('button.activate'),
@@ -1206,11 +1214,11 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
1206
1214
  async assignWorker() {
1207
1215
  const response = await client.mutate({
1208
1216
  mutation: gql`
1209
- mutation assignPickingWorker($worksheetId: String!, $userId: String!) {
1217
+ mutation assignBatchPickingWorker($worksheetId: [String]!, $userId: String!) {
1210
1218
  assignPickingWorker(worksheetId: $worksheetId, userId: $userId)
1211
1219
  }
1212
1220
  `,
1213
- variables: { worksheetId: this.worksheetId, userId: this.assignee.id }
1221
+ variables: { worksheetId: [this._worksheetId], userId: this.assignee.id }
1214
1222
  })
1215
1223
 
1216
1224
  if (!response.errors) {
@@ -1398,11 +1398,11 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1398
1398
  async assignWorker() {
1399
1399
  const response = await client.mutate({
1400
1400
  mutation: gql`
1401
- mutation assignPickingWorker($worksheetId: String!, $userId: String!) {
1401
+ mutation assignPickingWorker($worksheetId: [String]!, $userId: String!) {
1402
1402
  assignPickingWorker(worksheetId: $worksheetId, userId: $userId)
1403
1403
  }
1404
1404
  `,
1405
- variables: { worksheetId: this.worksheetId, userId: this.assignee.id }
1405
+ variables: { worksheetId: [this.worksheetId], userId: this.assignee.id }
1406
1406
  })
1407
1407
 
1408
1408
  if (!response.errors) {
@@ -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,55 @@
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
26
+ CASE WHEN "status"::VARCHAR = 'OPEN' THEN 'AWAITING DISPATCH'
27
+ WHEN "status"::VARCHAR = 'CLOSED' THEN 'OUT FROM WAREHOUSE'
28
+ END AS "status",
29
+ COUNT(id) AS "count"
30
+ FROM manifests
31
+ WHERE "domain_id" = $1
32
+ GROUP BY "status"
33
+ )
34
+ `, [domain.id]);
35
+ const statusList = [
36
+ 'PICKING UNASSIGNED',
37
+ 'PICKING ASSIGNED',
38
+ 'PACKING',
39
+ 'AWAITING DISPATCH',
40
+ 'OUT FROM WAREHOUSE',
41
+ 'CANCELLED',
42
+ 'DONE',
43
+ 'OUT OF STOCK'
44
+ ];
45
+ return statusList.reduce((statusCounts, status) => {
46
+ let foundItem = orderStatus.find(order => order.status == status);
47
+ if (foundItem)
48
+ statusCounts.push({ status, count: foundItem.count });
49
+ else
50
+ statusCounts.push({ status, count: 0 });
51
+ return statusCounts;
52
+ }, []);
53
+ }
54
+ };
55
+ //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BD,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,36 @@
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
+ <br>
12
+
13
+ ## Product Level Picking Strategy
14
+
15
+ This feature will help you to
16
+
17
+ **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
18
+ **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
19
+ **One-time setting to relieve your load from selecting inventory during worksheet processing.**
20
+
21
+ <br>
22
+
23
+ You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
24
+
25
+ Otherwise, the default picking strategy (FIFO) will be set to all products.
26
+
27
+ For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
28
+
29
+ Please get in touch with support@hatio.asia if you need assistance.
30
+
31
+ <br>
32
+
33
+ _**Team Hatio**
34
+ Reimagining warehousing and fulfilment in South East Asia_
35
+
36
+ </div>
@@ -2,66 +2,35 @@
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.
10
-
11
- Apologies for the inconvenience.
9
+ We are launching a new feature on **31 March 2022** (Thursday).
12
10
 
13
11
  <br>
14
12
 
15
- ## 9th Feb 2022 Updates
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!
18
-
19
- We will be rolling out Operato Version 4 once we are back from our break on the **9th of February.**
13
+ ## Product Level Picking Strategy
20
14
 
21
- In this upcoming version, we have squashed a bunch of bugs, improved the UI/UX and introduced performance enhancements.
15
+ This feature will help you to
22
16
 
23
- With the help of your feedbacks, our latest product update is part of an ongoing effort to provide an overall better user experience.
17
+ **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
18
+ **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
19
+ **One-time setting to relieve your load from selecting inventory during worksheet processing.**
24
20
 
25
21
  <br>
26
22
 
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>
23
+ You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
51
24
 
52
- <br>
53
-
54
- [Click Here for Version 4 Preview & Updates](http://bit.ly/operatov4updates 'Hatio Operato V4 Updates')
25
+ Otherwise, the default picking strategy (FIFO) will be set to all products.
55
26
 
56
- We thank you for your patience and we strive to provide you with better experience this coming year!
27
+ For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
57
28
 
58
- Signing Off the year of the Rat and onwards to a roaring good year!
29
+ Please get in touch with support@hatio.asia if you need assistance.
59
30
 
60
31
  <br>
61
32
 
62
33
  _**Team Hatio**
63
34
  Reimagining warehousing and fulfilment in South East Asia_
64
35
 
65
- ### 恭喜發财,新一年祝大家龍精虎猛,虎虎生威
66
-
67
36
  </div>
@@ -1,3 +1,36 @@
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
+ <br>
12
+
13
+ ## Product Level Picking Strategy
14
+
15
+ This feature will help you to
16
+
17
+ **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
18
+ **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
19
+ **One-time setting to relieve your load from selecting inventory during worksheet processing.**
20
+
21
+ <br>
22
+
23
+ You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
24
+
25
+ Otherwise, the default picking strategy (FIFO) will be set to all products.
26
+
27
+ For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
28
+
29
+ Please get in touch with support@hatio.asia if you need assistance.
30
+
31
+ <br>
32
+
33
+ _**Team Hatio**
34
+ Reimagining warehousing and fulfilment in South East Asia_
35
+
36
+ </div>
@@ -1,3 +1,36 @@
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
+ <br>
12
+
13
+ ## Product Level Picking Strategy
14
+
15
+ This feature will help you to
16
+
17
+ **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
18
+ **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
19
+ **One-time setting to relieve your load from selecting inventory during worksheet processing.**
20
+
21
+ <br>
22
+
23
+ You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
24
+
25
+ Otherwise, the default picking strategy (FIFO) will be set to all products.
26
+
27
+ For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
28
+
29
+ Please get in touch with support@hatio.asia if you need assistance.
30
+
31
+ <br>
32
+
33
+ _**Team Hatio**
34
+ Reimagining warehousing and fulfilment in South East Asia_
35
+
36
+ </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.41",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -57,56 +57,56 @@
57
57
  "@operato/scene-tab": "^0.1.5",
58
58
  "@operato/scene-table": "^0.1.5",
59
59
  "@operato/scene-wheel-sorter": "^0.1.5",
60
- "@things-factory/apptool-ui": "^4.1.28",
61
- "@things-factory/attachment-ui": "^4.1.28",
62
- "@things-factory/auth-ui": "^4.1.28",
63
- "@things-factory/barcode-ui": "^4.1.28",
64
- "@things-factory/biz-ui": "^4.1.28",
65
- "@things-factory/board-service": "^4.1.28",
66
- "@things-factory/board-ui": "^4.1.28",
67
- "@things-factory/code-ui": "^4.1.28",
68
- "@things-factory/context-ui": "^4.1.28",
69
- "@things-factory/export-ui": "^4.1.28",
70
- "@things-factory/export-ui-csv": "^4.1.28",
71
- "@things-factory/export-ui-excel": "^4.1.28",
72
- "@things-factory/fav-base": "^4.1.28",
73
- "@things-factory/form-ui": "^4.1.28",
74
- "@things-factory/grist-ui": "^4.1.28",
75
- "@things-factory/help": "^4.1.28",
76
- "@things-factory/i18n-base": "^4.1.28",
77
- "@things-factory/id-rule-base": "^4.1.28",
78
- "@things-factory/import-ui": "^4.1.28",
79
- "@things-factory/import-ui-excel": "^4.1.28",
80
- "@things-factory/menu-ui": "^4.1.28",
81
- "@things-factory/more-ui": "^4.1.28",
82
- "@things-factory/notification": "^4.1.28",
83
- "@things-factory/pdf": "^4.1.28",
84
- "@things-factory/print-proxy-service": "^4.1.28",
85
- "@things-factory/print-service": "^4.1.28",
86
- "@things-factory/print-ui": "^4.1.28",
87
- "@things-factory/product-base": "^4.1.37",
88
- "@things-factory/resource-ui": "^4.1.28",
89
- "@things-factory/sales-ui": "^4.1.37",
90
- "@things-factory/scene-data-transform": "^4.1.28",
91
- "@things-factory/scene-excel": "^4.1.28",
92
- "@things-factory/scene-firebase": "^4.1.28",
93
- "@things-factory/scene-form": "^4.1.28",
94
- "@things-factory/scene-google-map": "^4.1.28",
95
- "@things-factory/scene-graphql": "^4.1.28",
96
- "@things-factory/scene-label": "^4.1.28",
97
- "@things-factory/scene-marker": "^4.1.28",
98
- "@things-factory/scene-mqtt": "^4.1.28",
99
- "@things-factory/scene-restful": "^4.1.28",
100
- "@things-factory/scene-visualizer": "^4.1.28",
101
- "@things-factory/setting-ui": "^4.1.28",
102
- "@things-factory/system-ui": "^4.1.28",
103
- "@things-factory/transport-base": "^4.1.37",
104
- "@things-factory/tutorial-ui": "^4.1.28",
105
- "@things-factory/warehouse-base": "^4.1.37",
106
- "@things-factory/worksheet-base": "^4.1.37"
60
+ "@things-factory/apptool-ui": "^4.1.40",
61
+ "@things-factory/attachment-ui": "^4.1.40",
62
+ "@things-factory/auth-ui": "^4.1.40",
63
+ "@things-factory/barcode-ui": "^4.1.40",
64
+ "@things-factory/biz-ui": "^4.1.40",
65
+ "@things-factory/board-service": "^4.1.40",
66
+ "@things-factory/board-ui": "^4.1.40",
67
+ "@things-factory/code-ui": "^4.1.40",
68
+ "@things-factory/context-ui": "^4.1.40",
69
+ "@things-factory/export-ui": "^4.1.40",
70
+ "@things-factory/export-ui-csv": "^4.1.40",
71
+ "@things-factory/export-ui-excel": "^4.1.40",
72
+ "@things-factory/fav-base": "^4.1.40",
73
+ "@things-factory/form-ui": "^4.1.40",
74
+ "@things-factory/grist-ui": "^4.1.40",
75
+ "@things-factory/help": "^4.1.40",
76
+ "@things-factory/i18n-base": "^4.1.40",
77
+ "@things-factory/id-rule-base": "^4.1.40",
78
+ "@things-factory/import-ui": "^4.1.40",
79
+ "@things-factory/import-ui-excel": "^4.1.40",
80
+ "@things-factory/menu-ui": "^4.1.40",
81
+ "@things-factory/more-ui": "^4.1.40",
82
+ "@things-factory/notification": "^4.1.40",
83
+ "@things-factory/pdf": "^4.1.40",
84
+ "@things-factory/print-proxy-service": "^4.1.40",
85
+ "@things-factory/print-service": "^4.1.40",
86
+ "@things-factory/print-ui": "^4.1.40",
87
+ "@things-factory/product-base": "^4.1.40",
88
+ "@things-factory/resource-ui": "^4.1.40",
89
+ "@things-factory/sales-ui": "^4.1.41",
90
+ "@things-factory/scene-data-transform": "^4.1.40",
91
+ "@things-factory/scene-excel": "^4.1.40",
92
+ "@things-factory/scene-firebase": "^4.1.40",
93
+ "@things-factory/scene-form": "^4.1.40",
94
+ "@things-factory/scene-google-map": "^4.1.40",
95
+ "@things-factory/scene-graphql": "^4.1.40",
96
+ "@things-factory/scene-label": "^4.1.40",
97
+ "@things-factory/scene-marker": "^4.1.40",
98
+ "@things-factory/scene-mqtt": "^4.1.40",
99
+ "@things-factory/scene-restful": "^4.1.40",
100
+ "@things-factory/scene-visualizer": "^4.1.40",
101
+ "@things-factory/setting-ui": "^4.1.40",
102
+ "@things-factory/system-ui": "^4.1.40",
103
+ "@things-factory/transport-base": "^4.1.40",
104
+ "@things-factory/tutorial-ui": "^4.1.40",
105
+ "@things-factory/warehouse-base": "^4.1.41",
106
+ "@things-factory/worksheet-base": "^4.1.41"
107
107
  },
108
108
  "devDependencies": {
109
- "@things-factory/builder": "^4.1.28"
109
+ "@things-factory/builder": "^4.1.40"
110
110
  },
111
- "gitHead": "cc34a73ab56ed192e1f2babe6954a817c473a46c"
111
+ "gitHead": "980df4303a7b3946466c531260634dd1e1a62e64"
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,62 @@
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
30
+ CASE WHEN "status"::VARCHAR = 'OPEN' THEN 'AWAITING DISPATCH'
31
+ WHEN "status"::VARCHAR = 'CLOSED' THEN 'OUT FROM WAREHOUSE'
32
+ END AS "status",
33
+ COUNT(id) AS "count"
34
+ FROM manifests
35
+ WHERE "domain_id" = $1
36
+ GROUP BY "status"
37
+ )
38
+ `,
39
+ [domain.id]
40
+ )
41
+
42
+ const statusList: string[] = [
43
+ 'PICKING UNASSIGNED',
44
+ 'PICKING ASSIGNED',
45
+ 'PACKING',
46
+ 'AWAITING DISPATCH',
47
+ 'OUT FROM WAREHOUSE',
48
+ 'CANCELLED',
49
+ 'DONE',
50
+ 'OUT OF STOCK'
51
+ ]
52
+
53
+ return statusList.reduce((statusCounts: { status: string; count: number }[], status: string) => {
54
+ let foundItem = orderStatus.find(order => order.status == status)
55
+
56
+ if (foundItem) statusCounts.push({ status, count: foundItem.count })
57
+ else statusCounts.push({ status, count: 0 })
58
+
59
+ return statusCounts
60
+ }, [])
61
+ }
62
+ }
@@ -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
+ `
@@ -10,6 +10,7 @@
10
10
  "button.approve": "approve",
11
11
  "button.arrived": "arrived",
12
12
  "button.assign_warehouse": "assign warehouse",
13
+ "button.assign_picker": "assign picker",
13
14
  "button.assign": "assign",
14
15
  "button.auto_assign": "auto assign",
15
16
  "button.auto_select": "auto select",
@@ -132,6 +133,7 @@
132
133
  "field.assigned_qty": "assigned qty",
133
134
  "field.assigned_uom_value": "assigned uom value",
134
135
  "field.assigned": "assigned",
136
+ "field.assigned_picker":"assigned picker",
135
137
  "field.attention_to": "attention to",
136
138
  "field.aux_unit_2": "aux unit 2",
137
139
  "field.aux_unit": "aux unit",