@things-factory/operato-wms 4.3.464 → 4.3.466

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 (32) hide show
  1. package/client/pages/inbound/unload-product.js +14 -0
  2. package/client/pages/order/arrival-notice/create-arrival-notice.js +14 -1
  3. package/client/pages/outbound/picking-product.js +25 -6
  4. package/client/pages/report/manifest-report.js +448 -0
  5. package/client/route.js +4 -0
  6. package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js +5 -4
  7. package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js.map +1 -1
  8. package/dist-server/graphql/resolvers/reports/index.js +3 -2
  9. package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
  10. package/dist-server/graphql/resolvers/reports/manifest-report.js +96 -0
  11. package/dist-server/graphql/resolvers/reports/manifest-report.js.map +1 -0
  12. package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js +1 -0
  13. package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js.map +1 -1
  14. package/dist-server/graphql/types/reports/index.js +8 -3
  15. package/dist-server/graphql/types/reports/index.js.map +1 -1
  16. package/dist-server/graphql/types/reports/manifest-report-list.js +14 -0
  17. package/dist-server/graphql/types/reports/manifest-report-list.js.map +1 -0
  18. package/dist-server/graphql/types/reports/manifest-report-type.js +22 -0
  19. package/dist-server/graphql/types/reports/manifest-report-type.js.map +1 -0
  20. package/package.json +2 -2
  21. package/server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts +9 -5
  22. package/server/graphql/resolvers/reports/index.ts +8 -3
  23. package/server/graphql/resolvers/reports/manifest-report.ts +109 -0
  24. package/server/graphql/types/dashboard/inventory-expiry-counter.ts +1 -0
  25. package/server/graphql/types/reports/index.ts +16 -5
  26. package/server/graphql/types/reports/manifest-report-list.ts +8 -0
  27. package/server/graphql/types/reports/manifest-report-type.ts +16 -0
  28. package/things-factory.config.js +4 -0
  29. package/translations/en.json +2 -0
  30. package/translations/ko.json +2 -0
  31. package/translations/ms.json +2 -0
  32. package/translations/zh.json +2 -0
@@ -1154,6 +1154,16 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1154
1154
  }
1155
1155
  }
1156
1156
 
1157
+ async _checkExpiryFormat() {
1158
+ const inputExpDate = this.expDateInput.value
1159
+ let intValueYear = parseInt(inputExpDate)
1160
+
1161
+ if (intValueYear > 9999) {
1162
+ this._scanning = false
1163
+ throw new Error(i18next.t('text.please_enter_the_correct_date_format'))
1164
+ }
1165
+ }
1166
+
1157
1167
  async _checkExpiry() {
1158
1168
  let date = new Date()
1159
1169
  const acceptBefore = new Date(date.setDate(date.getDate() + this.__minInboundShelfLife))
@@ -1436,6 +1446,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1436
1446
  this._focusOnExpiryDateInput()
1437
1447
  throw new Error(i18next.t('text.expiry_date_is_empty'))
1438
1448
  }
1449
+
1450
+ await this._checkExpiryFormat()
1439
1451
  }
1440
1452
  }
1441
1453
 
@@ -1471,6 +1483,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1471
1483
  this._focusOnExpiryDateInput()
1472
1484
  throw new Error(i18next.t('text.expiry_date_is_empty'))
1473
1485
  }
1486
+
1487
+ await this._checkExpiryFormat()
1474
1488
  }
1475
1489
 
1476
1490
  return orderProducts
@@ -862,8 +862,21 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
862
862
  }
863
863
 
864
864
  if (changedColumn === 'manufactureDate') {
865
- let manufactureDate = new Date(changeRecord.manufactureDate)
865
+ //verify date value
866
+ let getYear = parseInt(changeRecord.manufactureDate.slice(0, 4))
867
+ let getMonth = parseInt(changeRecord.manufactureDate.slice(5, 7))
868
+ let getDay = parseInt(changeRecord.manufactureDate.slice(8, 10))
869
+
870
+ //year must be greater than year 2000
871
+ //month must be between 1 and 12
872
+ //day must be between 1 and 31
873
+ if (getYear < 2000 || getMonth < 1 || getMonth > 12 || getDay < 1 || getDay > 31) {
874
+ throw Error(i18next.t('text.please_enter_the_correct_date_format'))
875
+ }
876
+
877
+ //verify date range
866
878
  let today = new Date()
879
+ let manufactureDate = new Date(changeRecord.manufactureDate)
867
880
 
868
881
  if (manufactureDate > today) {
869
882
  delete event.detail.after[event.detail.column.name]
@@ -9,14 +9,26 @@ import './tote-popup'
9
9
  import './vas-list-popup'
10
10
 
11
11
  import gql from 'graphql-tag'
12
- import { css, html } from 'lit-element'
12
+ import {
13
+ css,
14
+ html
15
+ } from 'lit-element'
13
16
  import { connect } from 'pwa-helpers/connect-mixin.js'
14
17
 
15
18
  import { sleep } from '@operato/utils'
16
19
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
17
- import { i18next, localize } from '@things-factory/i18n-base'
20
+ import {
21
+ i18next,
22
+ localize
23
+ } from '@things-factory/i18n-base'
18
24
  import { openPopup } from '@things-factory/layout-base'
19
- import { client, CustomAlert, gqlContext, PageView, store } from '@things-factory/shell'
25
+ import {
26
+ client,
27
+ CustomAlert,
28
+ gqlContext,
29
+ PageView,
30
+ store
31
+ } from '@things-factory/shell'
20
32
  import { CommonButtonStyles } from '@things-factory/styles'
21
33
  import { isMobileDevice } from '@things-factory/utils'
22
34
 
@@ -36,6 +48,7 @@ const PICKING_TYPES = { PICKING, BATCH_PICKING }
36
48
  class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
37
49
  static get properties() {
38
50
  return {
51
+ _worksheetLoaded: Boolean,
39
52
  _bizplaceName: String,
40
53
  _crossDocking: Boolean,
41
54
  _currentBinLocation: String,
@@ -159,7 +172,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
159
172
  })
160
173
  }
161
174
 
162
- if (this.releaseGoodNo && !this._isReplenishment) {
175
+ if (this._worksheetLoaded && !this._isReplenishment) {
163
176
  actions.push({
164
177
  title: i18next.t('button.plastic_pallet'),
165
178
  action: this.openPalletOutbound.bind(this),
@@ -182,7 +195,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
182
195
  })
183
196
  }
184
197
 
185
- if ((this.releaseGoodNo && this.completed) || (this.taskNo && this.completed)) {
198
+ if (this._worksheetLoaded && this.data.records.every(record => record.completed)) {
186
199
  actions.push({
187
200
  title: i18next.t('button.complete'),
188
201
  action: this.complete.bind(this),
@@ -300,7 +313,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
300
313
  //set the initial value of object attributes
301
314
  constructor() {
302
315
  super()
303
-
316
+ this._worksheetLoaded = false
304
317
  this.data = { records: [] }
305
318
  this.locationSortingRules = []
306
319
  this.locationNameSplit = []
@@ -767,6 +780,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
767
780
  this._isExecuting = false
768
781
  this._locationName = null
769
782
  this.toteNo = ''
783
+ this._worksheetLoaded = false
770
784
  }
771
785
 
772
786
  fillUpForm(form, data) {
@@ -1565,6 +1579,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1565
1579
  let releaseGood = response.data.pickingWorksheet.worksheetInfo?.releaseGood
1566
1580
  let replenishment = response.data.pickingWorksheet.worksheetInfo?.replenishment
1567
1581
 
1582
+ this._worksheetLoaded = true
1583
+
1568
1584
  if (releaseGood) {
1569
1585
  this._isReleaseGoodRecall = response.data.pickingWorksheet.worksheetInfo.releaseGood.recall
1570
1586
  this.pickingOrderId = releaseGood.id
@@ -1715,6 +1731,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1715
1731
  if (!response.errors) {
1716
1732
  //if (!this._selectedOrderInventory) this.clearView()
1717
1733
  this.taskNo = pickingRefNo
1734
+
1735
+ this._worksheetLoaded = true
1736
+
1718
1737
  if (!response.data?.batchPickingWorksheet) return
1719
1738
 
1720
1739
  const { worksheetInfo, worksheetDetailInfos } = response.data.batchPickingWorksheet
@@ -0,0 +1,448 @@
1
+ import '@things-factory/form-ui'
2
+ import '@things-factory/grist-ui'
3
+
4
+ import gql from 'graphql-tag'
5
+ import {
6
+ css,
7
+ html
8
+ } from 'lit-element'
9
+
10
+ import {
11
+ i18next,
12
+ localize
13
+ } from '@things-factory/i18n-base'
14
+ import {
15
+ client,
16
+ gqlContext,
17
+ PageView
18
+ } from '@things-factory/shell'
19
+ import { ScrollbarStyles } from '@things-factory/styles'
20
+ import { isMobileDevice } from '@things-factory/utils'
21
+
22
+ class ManifestReport extends localize(i18next)(PageView) {
23
+ static get styles() {
24
+ return [
25
+ ScrollbarStyles,
26
+ css`
27
+ :host {
28
+ display: flex;
29
+ flex-direction: column;
30
+ overflow: hidden;
31
+ }
32
+
33
+ search-form {
34
+ overflow: visible;
35
+ }
36
+
37
+ data-grist {
38
+ overflow-y: auto;
39
+ flex: 1;
40
+ }
41
+ `
42
+ ]
43
+ }
44
+
45
+ static get properties() {
46
+ return {
47
+ _searchFields: Array,
48
+ config: Object,
49
+ data: Object,
50
+ _shippingProviderList: Array,
51
+ _partners: Object
52
+ }
53
+ }
54
+
55
+ get context() {
56
+ return {
57
+ title: i18next.t('title.manifest_report'),
58
+ exportable: {
59
+ name: i18next.t('title.manifest_report'),
60
+ data: this._exportableData.bind(this)
61
+ }
62
+ }
63
+ }
64
+
65
+ get _fromDateInput() {
66
+ return this.searchForm.shadowRoot.querySelector('input[name=fromDate]')
67
+ }
68
+
69
+ get _toDateInput() {
70
+ return this.searchForm.shadowRoot.querySelector('input[name=toDate]')
71
+ }
72
+
73
+ get searchForm() {
74
+ return this.shadowRoot.querySelector('search-form')
75
+ }
76
+
77
+ get dataGrist() {
78
+ return this.shadowRoot.querySelector('data-grist')
79
+ }
80
+
81
+ get _bizplaceSelector() {
82
+ return this.searchForm.shadowRoot.querySelector('select[name=bizplace]')
83
+ }
84
+
85
+ render() {
86
+ return html`
87
+ <search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.dataGrist.fetch()}></search-form>
88
+
89
+ <data-grist
90
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID' }
91
+ .config=${this.config}
92
+ .fetchHandler="${this.fetchHandler.bind(this)}"
93
+ ></data-grist>
94
+ `
95
+ }
96
+
97
+ pageUpdated(changes, lifecycle) {
98
+ if (this.active) {
99
+ this.dataGrist.fetch()
100
+ }
101
+ }
102
+
103
+ constructor() {
104
+ super()
105
+ this._shippingProviderList = []
106
+ }
107
+
108
+ async pageInitialized() {
109
+ const partners = await this._fetchPartners()
110
+ this._searchFields = [
111
+ {
112
+ label: i18next.t('field.company'),
113
+ name: 'bizplace',
114
+ type: 'select',
115
+ options:
116
+ partners?.length == 1
117
+ ? [
118
+ {
119
+ name: `${partners[0].name} ${partners[0].description ? `(${partners[0].description})` : ''}`,
120
+ value: partners[0].id
121
+ }
122
+ ]
123
+ : [
124
+ { value: '' },
125
+ ...partners
126
+ .map(partner => {
127
+ return {
128
+ name: `${partner.name} ${partner.description ? `(${partner.description})` : ''}`,
129
+ value: partner.id
130
+ }
131
+ })
132
+ .sort(this._compareValues('name', 'asc'))
133
+ ],
134
+ props: { searchOper: 'eq' }
135
+ },
136
+ {
137
+ label: i18next.t('field.from_date'),
138
+ name: 'fromDate',
139
+ type: 'date',
140
+ props: {
141
+ searchOper: 'eq',
142
+ max: new Date().toISOString().split('T')[0]
143
+ },
144
+ value: (() => {
145
+ let date = new Date()
146
+ date.setMonth(date.getMonth() - 1)
147
+ return date.toISOString().split('T')[0]
148
+ })(),
149
+ handlers: { change: this._modifyDateRange.bind(this) }
150
+ },
151
+ {
152
+ label: i18next.t('field.to_date'),
153
+ name: 'toDate',
154
+ type: 'date',
155
+ props: {
156
+ searchOper: 'eq',
157
+ max: new Date().toISOString().split('T')[0],
158
+ min: (() => {
159
+ let date = new Date()
160
+ date.setMonth(date.getMonth() - 1)
161
+ return date.toISOString().split('T')[0]
162
+ })()
163
+ },
164
+ value: new Date().toISOString().split('T')[0]
165
+ },
166
+ {
167
+ label: i18next.t('field.tracking_no'),
168
+ name: 'trackingNo',
169
+ type: 'text',
170
+ props: { searchOper: 'eq' }
171
+ },
172
+ {
173
+ label: i18next.t('field.ro_no'),
174
+ name: 'releaseGoodNo',
175
+ type: 'text',
176
+ props: { searchOper: 'eq' }
177
+ },
178
+ {
179
+ label: i18next.t('field.tracking_no'),
180
+ name: 'hasTrackingNo',
181
+ type: 'checkbox',
182
+ props: { searchOper: 'eq' },
183
+ attrs: ['indeterminate']
184
+ }
185
+ ]
186
+
187
+ this.config = {
188
+ list: {
189
+ fields: [
190
+ 'company',
191
+ 'refNo',
192
+ 'roNo',
193
+ 'status',
194
+ 'trackingNo',
195
+ 'name',
196
+ 'manifestedAt',
197
+ 'manifestedBy',
198
+ 'createdAt',
199
+ 'transporter'
200
+ ]
201
+ },
202
+ rows: { appendable: false, selectable: false },
203
+ columns: [
204
+ { type: 'gutter', gutterName: 'sequence' },
205
+ {
206
+ type: 'string',
207
+ name: 'bizplace',
208
+ header: i18next.t('field.company'),
209
+ label: true,
210
+ width: 130
211
+ },
212
+ {
213
+ type: 'string',
214
+ name: 'refNo',
215
+ header: i18next.t('field.ref_no'),
216
+ label: true,
217
+ width: 140
218
+ },
219
+ {
220
+ type: 'string',
221
+ name: 'roNo',
222
+ header: i18next.t('field.ro_no'),
223
+ label: true,
224
+ width: 150
225
+ },
226
+ {
227
+ type: 'string',
228
+ name: 'status',
229
+ header: i18next.t('field.status'),
230
+ label: true,
231
+ width: 120
232
+ },
233
+ {
234
+ type: 'string',
235
+ name: 'trackingNo',
236
+ header: i18next.t('field.tracking_no'),
237
+ label: true,
238
+ width: 120
239
+ },
240
+ {
241
+ type: 'string',
242
+ name: 'manifestNo',
243
+ header: i18next.t('field.manifest_no'),
244
+ label: true,
245
+ width: 140
246
+ },
247
+ {
248
+ type: 'datetime',
249
+ name: 'manifestedAt',
250
+ header: i18next.t('field.manifested_at'),
251
+ label: true,
252
+ width: 120
253
+ },
254
+ {
255
+ type: 'string',
256
+ name: 'manifestedBy',
257
+ header: i18next.t('field.manifested_by'),
258
+ label: true,
259
+ width: 130
260
+ },
261
+ {
262
+ type: 'datetime',
263
+ name: 'orderedAt',
264
+ header: i18next.t('field.created_at'),
265
+ label: true,
266
+ width: 120
267
+ },
268
+ {
269
+ type: 'string',
270
+ name: 'transporter',
271
+ header: i18next.t('field.transporter'),
272
+ label: true,
273
+ width: 120
274
+ }
275
+ ]
276
+ }
277
+ }
278
+
279
+ async fetchHandler({ page, limit, sorters = [{ name: 'createdAt', desc: true }] }) {
280
+ try {
281
+ this._validate()
282
+ let filters = this.searchForm.queryFilters.map(filter => {
283
+ switch (filter.name) {
284
+ case 'fromDate':
285
+ let fromDt = new Date(filter.value)
286
+ fromDt.setHours(0)
287
+ filter.value = fromDt.toISOString()
288
+ break
289
+ case 'toDate':
290
+ let toDt = new Date(filter.value)
291
+ toDt.setHours(23, 59, 59)
292
+ filter.value = toDt.toISOString()
293
+ break
294
+ default:
295
+ break
296
+ }
297
+ return filter
298
+ })
299
+
300
+ const response = await client.query({
301
+ query: gql`
302
+ query manifestReport($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
303
+ manifestReport(filters: $filters, pagination: $pagination, sortings: $sortings) {
304
+ items {
305
+ bizplace
306
+ refNo
307
+ roNo
308
+ status
309
+ trackingNo
310
+ manifestNo
311
+ manifestedAt
312
+ manifestedBy
313
+ orderedAt
314
+ transporter
315
+ }
316
+ total
317
+ }
318
+ }
319
+ `,
320
+ variables: { filters, pagination: { page, limit }, sortings: sorters },
321
+ context: gqlContext()
322
+ })
323
+
324
+ if (!response.errors) {
325
+ return {
326
+ total: response.data.manifestReport.total || 0,
327
+ records: response.data.manifestReport.items || []
328
+ }
329
+ }
330
+ } catch(e) {
331
+ this._showToast(e)
332
+ }
333
+ }
334
+
335
+ async _fetchPartners() {
336
+ const filters = []
337
+ const response = await client.query({
338
+ query: gql`
339
+ query partnersBizplaces($filters: [Filter!]) {
340
+ partnersBizplaces(filters: $filters) {
341
+ items {
342
+ id
343
+ name
344
+ description
345
+ }
346
+ }
347
+ }
348
+ `,
349
+ variables: { filters }
350
+ })
351
+
352
+ if (!response.errors) {
353
+ return response.data.partnersBizplaces.items
354
+ }
355
+ }
356
+
357
+ _validate() {
358
+ if (!this.searchForm.shadowRoot.querySelector('form').checkValidity())
359
+ throw new Error(i18next.t('text.invalid_form_value'))
360
+ if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.no_company_selected'))
361
+ if (!this._fromDateInput.value) throw new Error(i18next.t('text.from_date_is_empty'))
362
+ if (!this._toDateInput.value) throw new Error(i18next.t('text.to_date_is_empty'))
363
+ }
364
+
365
+ _compareValues(key, order = 'asc') {
366
+ return function innerSort(a, b) {
367
+ if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
368
+ return 0
369
+ }
370
+
371
+ const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
372
+ const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
373
+
374
+ let comparison = 0
375
+ if (varA > varB) {
376
+ comparison = 1
377
+ } else if (varA < varB) {
378
+ comparison = -1
379
+ }
380
+ return order === 'desc' ? comparison * -1 : comparison
381
+ }
382
+ }
383
+
384
+ _modifyDateRange(e) {
385
+ const fromDate = e.currentTarget.value
386
+ if (fromDate == '') return
387
+ if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
388
+
389
+ let min = new Date(fromDate)
390
+ let max = new Date(fromDate)
391
+ max.setMonth(max.getMonth() + 3)
392
+
393
+ let today = new Date()
394
+ today.setHours(0, 0, 0, 0)
395
+
396
+ min = min.toISOString().split('T')[0]
397
+ max = max.toISOString().split('T')[0]
398
+
399
+ if (this._toDateInput.value > max) this._toDateInput.value = max
400
+
401
+ this._toDateInput.min = min
402
+ this._toDateInput.max = max
403
+ }
404
+
405
+ async _exportableData() {
406
+ try {
407
+ var headerSetting = [
408
+ { header: i18next.t('field.company'), key: 'bizplace', width: 40, type: 'string' },
409
+ { header: i18next.t('field.ref_no'), key: 'refNo', width: 20, type: 'string' },
410
+ { header: i18next.t('field.ro_no'), key: 'roNo', width: 30, type: 'string' },
411
+ { header: i18next.t('field.status'), key: 'status', width: 15, type: 'string' },
412
+ { header: i18next.t('field.tracking_no'), key: 'trackingNo', width: 15, type: 'string' },
413
+ { header: i18next.t('field.manifest_no'), key: 'manifestNo', width: 20, type: 'string' },
414
+ { header: i18next.t('field.manifested_at'), key: 'manifestedAt', width: 20, type: 'string' },
415
+ { header: i18next.t('field.manifested_by'), key: 'manifestedBy', width: 20, type: 'string' },
416
+ { header: i18next.t('field.created_at'), key: 'orderedAt', width: 20, type: 'string' },
417
+ { header: i18next.t('field.transporter'), key: 'transporter', width: 20, type: 'string' },
418
+ ]
419
+
420
+ var exportData = {
421
+ header: [...headerSetting],
422
+ data: (await this.fetchHandler({ page: 1, limit: 999999})).records.map(itm => {
423
+ return {
424
+ ...itm,
425
+ manifestedAt: itm.manifestedAt ? new Date(parseInt(itm.manifestedAt)).toLocaleString() : '',
426
+ orderedAt: itm.orderedAt ? new Date(parseInt(itm.orderedAt)).toLocaleString() : ''
427
+ }
428
+ })
429
+ }
430
+ return exportData
431
+ } catch (e) {
432
+ this._showToast(e)
433
+ }
434
+ }
435
+
436
+ _showToast({ type, message }) {
437
+ document.dispatchEvent(
438
+ new CustomEvent('notify', {
439
+ detail: {
440
+ type,
441
+ message
442
+ }
443
+ })
444
+ )
445
+ }
446
+ }
447
+
448
+ customElements.define('manifest-report', ManifestReport)
package/client/route.js CHANGED
@@ -523,6 +523,10 @@ export default function route(page) {
523
523
  import('./pages/report/analysis-picking-packing-report')
524
524
  return page
525
525
 
526
+ case 'manifest_report':
527
+ import('./pages/report/manifest-report')
528
+ return page
529
+
526
530
  case 'replenishment_report':
527
531
  import('./pages/report/replenishment-report')
528
532
  return page
@@ -29,11 +29,12 @@ exports.inventoryExpiryMonitorResolver = {
29
29
  else
30
30
  throw new Error('invalid bizplaceId');
31
31
  const expInventories = await tx.query(`
32
- SELECT "location", sum("expired") AS "expired", sum("sixMonths") AS "sixMonths", sum("nineMonths") AS "nineMonths" FROM (
32
+ SELECT "location", sum("expired") AS "expired", SUM("threeMonths") AS "threeMonths", sum("sixMonths") AS "sixMonths", sum("nineMonths") AS "nineMonths" FROM (
33
33
  SELECT
34
34
  CASE WHEN l.TYPE IN ('QUARANTINE','RESERVE') THEN 'QUARANTINED' ELSE 'IN SHELF' END AS "location",
35
35
  CASE WHEN i.expiration_date - now()::date <= 0 THEN 1 ELSE 0 END AS "expired",
36
- CASE WHEN i.expiration_date - now()::date > 0 AND i.expiration_date - now()::date <= 180 THEN 1 ELSE 0 END AS "sixMonths",
36
+ CASE WHEN i.expiration_date - now()::date > 0 AND i.expiration_date - now()::date <= 90 THEN 1 ELSE 0 END AS "threeMonths",
37
+ CASE WHEN i.expiration_date - now()::date > 90 AND i.expiration_date - now()::date <= 180 THEN 1 ELSE 0 END AS "sixMonths",
37
38
  CASE WHEN i.expiration_date - now()::date > 180 AND i.expiration_date - now()::date <= 270 THEN 1 ELSE 0 END AS "nineMonths"
38
39
  FROM inventories i
39
40
  INNER JOIN locations l ON i.location_id = l.id
@@ -41,7 +42,7 @@ exports.inventoryExpiryMonitorResolver = {
41
42
  AND i.expiration_date NOTNULL
42
43
  AND i.status = 'STORED'
43
44
  AND i.domain_id = $1
44
- AND i.bizplace_id IN (${bizplaceIds})
45
+ AND i.bizplace_id in (${bizplaceIds})
45
46
  ) AS foo
46
47
  GROUP BY "location"
47
48
  `, [domain.id]);
@@ -59,6 +60,6 @@ function getExpiryCountByStatus(expInventories, location) {
59
60
  return inv;
60
61
  })(matchedInv);
61
62
  else
62
- return { expired: 0, sixMonths: 0, nineMonths: 0 };
63
+ return { expired: 0, threeMonths: 0, sixMonths: 0, nineMonths: 0 };
63
64
  }
64
65
  //# sourceMappingURL=inventory-expiry-monitor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inventory-expiry-monitor.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,uDAAkE;AAErD,QAAA,8BAA8B,GAAG;IAC5C,KAAK,CAAC,sBAAsB,CAAC,CAAM,EAAE,MAAiB,EAAE,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B,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACxH,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;gBAC3B,OAAO,GAAG,IAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,EAAE,CAAA,GAAG,GAAG,CAAA;YACrC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SACzB;;YAAM,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAE5C,MAAM,cAAc,GAMd,MAAM,EAAE,CAAC,KAAK,CAClB;;;;;;;;;;;;;;gCAc0B,WAAW;;;KAGtC,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,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAA;AACzE,CAAC"}
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Query = void 0;
4
4
  const analysis_picking_packing_report_1 = require("./analysis-picking-packing-report");
5
5
  const costing_report_1 = require("./costing-report");
6
+ const cycle_count_report_1 = require("./cycle-count-report");
6
7
  const inbound_order_details_report_1 = require("./inbound-order-details-report");
7
8
  const inbound_serial_number_report_1 = require("./inbound-serial-number-report");
9
+ const manifest_report_1 = require("./manifest-report");
8
10
  const non_loaded_inventory_report_1 = require("./non-loaded-inventory-report");
9
11
  const outbound_order_details_report_1 = require("./outbound-order-details-report");
10
12
  const outbound_serial_number_report_1 = require("./outbound-serial-number-report");
@@ -13,6 +15,5 @@ const release_inventory_report_1 = require("./release-inventory-report");
13
15
  const shortage_report_1 = require("./shortage-report");
14
16
  const tote_loading_qc_report_1 = require("./tote-loading-qc-report");
15
17
  const vas_report_1 = require("./vas-report");
16
- const cycle_count_report_1 = require("./cycle-count-report");
17
- exports.Query = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, inbound_serial_number_report_1.inboundSerialNumberReport), outbound_serial_number_report_1.outboundSerialNumberReport), costing_report_1.costingReport), inbound_order_details_report_1.inboundOrderDetailsReport), outbound_order_details_report_1.outboundOrderDetailsReport), product_label_report_1.productLabelReport), release_inventory_report_1.releaseInventoryReport), shortage_report_1.shortageReport), tote_loading_qc_report_1.loadingQcReport), vas_report_1.orderVasReport), vas_report_1.vasReport), analysis_picking_packing_report_1.analysisPickingPackingReport), cycle_count_report_1.cycleCountReport), non_loaded_inventory_report_1.nonLoadedOrderInventoriesReport);
18
+ exports.Query = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, inbound_serial_number_report_1.inboundSerialNumberReport), outbound_serial_number_report_1.outboundSerialNumberReport), costing_report_1.costingReport), inbound_order_details_report_1.inboundOrderDetailsReport), outbound_order_details_report_1.outboundOrderDetailsReport), product_label_report_1.productLabelReport), release_inventory_report_1.releaseInventoryReport), shortage_report_1.shortageReport), tote_loading_qc_report_1.loadingQcReport), vas_report_1.orderVasReport), vas_report_1.vasReport), analysis_picking_packing_report_1.analysisPickingPackingReport), cycle_count_report_1.cycleCountReport), non_loaded_inventory_report_1.nonLoadedOrderInventoriesReport), manifest_report_1.manifestReport);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/index.ts"],"names":[],"mappings":";;;AAAA,uFAAgF;AAChF,qDAAgD;AAChD,iFAA0E;AAC1E,iFAA0E;AAC1E,+EAA+E;AAC/E,mFAA4E;AAC5E,mFAA4E;AAC5E,iEAA2D;AAC3D,yEAAmE;AACnE,uDAAkD;AAClD,qEAA0D;AAC1D,6CAAwD;AACxD,6DAAuD;AAE1C,QAAA,KAAK,2MACb,wDAAyB,GACzB,0DAA0B,GAC1B,8BAAa,GACb,wDAAyB,GACzB,0DAA0B,GAC1B,yCAAkB,GAClB,iDAAsB,GACtB,gCAAc,GACd,wCAAe,GACf,2BAAc,GACd,sBAAS,GACT,8DAA4B,GAC5B,qCAAgB,GAChB,6DAA+B,EACnC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/index.ts"],"names":[],"mappings":";;;AAAA,uFAAgF;AAChF,qDAAgD;AAChD,6DAAuD;AACvD,iFAA0E;AAC1E,iFAA0E;AAC1E,uDAAkD;AAClD,+EAA+E;AAC/E,mFAA4E;AAC5E,mFAA4E;AAC5E,iEAA2D;AAC3D,yEAAmE;AACnE,uDAAkD;AAClD,qEAA0D;AAC1D,6CAGqB;AAER,QAAA,KAAK,yNACb,wDAAyB,GACzB,0DAA0B,GAC1B,8BAAa,GACb,wDAAyB,GACzB,0DAA0B,GAC1B,yCAAkB,GAClB,iDAAsB,GACtB,gCAAc,GACd,wCAAe,GACf,2BAAc,GACd,sBAAS,GACT,8DAA4B,GAC5B,qCAAgB,GAChB,6DAA+B,GAC/B,gCAAc,EAClB"}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.manifestReport = void 0;
4
+ exports.manifestReport = {
5
+ async manifestReport(_, params, context) {
6
+ try {
7
+ const { tx } = context.state;
8
+ let bizplace = params.filters.find(items => items.name === 'bizplace');
9
+ let trackingNo = params.filters.findIndex(items => items.name === 'trackingNo');
10
+ let releaseGoodNo = params.filters.find(items => items.name === 'releaseGoodNo');
11
+ let fromDate = params.filters.find(items => items.name === 'fromDate');
12
+ let toDate = params.filters.find(items => items.name === 'toDate');
13
+ let hasTrackingNo = params.filters.find(items => items.name === 'hasTrackingNo');
14
+ if (!bizplace)
15
+ throw 'Invalid input';
16
+ let hasTrackingNoFilter = '';
17
+ if ((hasTrackingNo === null || hasTrackingNo === void 0 ? void 0 : hasTrackingNo.value) == true) {
18
+ hasTrackingNoFilter += `AND op.tracking_no NOTNULL`;
19
+ }
20
+ else if ((hasTrackingNo === null || hasTrackingNo === void 0 ? void 0 : hasTrackingNo.value) == false) {
21
+ hasTrackingNoFilter += `AND op.tracking_no ISNULL`;
22
+ }
23
+ let releaseGoodFilter = '';
24
+ if (releaseGoodNo) {
25
+ releaseGoodFilter += `AND rg.name = '${releaseGoodNo.value}'`;
26
+ }
27
+ let trackingNoFilterValue;
28
+ let trackingNoFilter = '';
29
+ if (trackingNo >= 0) {
30
+ trackingNoFilterValue = params.filters[trackingNo].value
31
+ .split(',')
32
+ .map(value => `'${value.trim().toUpperCase()}'`);
33
+ params.filters.splice(trackingNo, 1);
34
+ trackingNoFilter += `AND op.tracking_no in (${trackingNoFilterValue})`;
35
+ }
36
+ await tx.query(`
37
+ CREATE TEMP TABLE manifest_report ON COMMIT DROP AS (
38
+ SELECT
39
+ rg.created_at AS "ordered_at",
40
+ rg.status,
41
+ op.tracking_no,
42
+ m.name AS "manifest_no",
43
+ m.created_at AS "manifested_at",
44
+ op.transporter AS "transporter",
45
+ u.name AS "manifested_by",
46
+ b.name AS "company",
47
+ rg.ref_no AS "ref_no",
48
+ rg.name AS "ro_no"
49
+ FROM order_packages op
50
+ LEFT JOIN
51
+ manifests m on m.id = op.manifest_id
52
+ LEFT JOIN
53
+ users u on u.id = op.manifested_by_id
54
+ INNER JOIN
55
+ bizplaces b on op.bizplace_id = b.id
56
+ INNER JOIN
57
+ release_goods rg on op.release_good_id = rg.id
58
+ WHERE
59
+ op.domain_id = $1
60
+ AND op.bizplace_id = '${bizplace.value}'
61
+ AND op.created_at >= $2
62
+ AND op.created_at <= $3
63
+ ${releaseGoodFilter}
64
+ ${trackingNoFilter}
65
+ ${hasTrackingNoFilter}
66
+ )
67
+ `, [context.state.domain.id, fromDate.value, toDate.value]);
68
+ const total = await tx.query(`
69
+ SELECT count(*) FROM manifest_report
70
+ `);
71
+ const result = await tx.query(`
72
+ SELECT * FROM manifest_report
73
+ offset $1 limit $2
74
+ `, [(params.pagination.page - 1) * params.pagination.limit, params.pagination.limit]);
75
+ let items = result.map(itm => {
76
+ return {
77
+ bizplace: itm.company,
78
+ refNo: itm.ref_no,
79
+ roNo: itm.ro_no,
80
+ status: itm.status,
81
+ trackingNo: itm.tracking_no,
82
+ manifestNo: itm.manifest_no,
83
+ manifestedAt: itm.manifested_at,
84
+ manifestedBy: itm.manifested_by,
85
+ orderedAt: itm.ordered_at,
86
+ transporter: itm.transporter
87
+ };
88
+ });
89
+ return { items, total: total[0].count };
90
+ }
91
+ catch (e) {
92
+ throw e;
93
+ }
94
+ }
95
+ };
96
+ //# sourceMappingURL=manifest-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/manifest-report.ts"],"names":[],"mappings":";;;AAIa,QAAA,cAAc,GAAG;IAC7B,KAAK,CAAC,cAAc,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QAC3D,IAAI;YACH,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,QAAQ,GAAG,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C,WAAW;oBAC3B,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,YAAY,EAAE,GAAG,CAAC,aAAa;oBAC/B,YAAY,EAAE,GAAG,CAAC,aAAa;oBAC/B,SAAS,EAAE,GAAG,CAAC,UAAU;oBACzB,WAAW,EAAE,GAAG,CAAC,WAAW;iBAC5B,CAAA;YACF,CAAC,CAAC,CAAA;YAEF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAA;SACvC;QAAC,OAAO,CAAC,EAAE;YACX,MAAM,CAAC,CAAA;SACP;IACF,CAAC;CACD,CAAA"}
@@ -8,6 +8,7 @@ const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
8
  exports.InventoryExpiryCounter = (0, graphql_tag_1.default) `
9
9
  type InventoryExpiryCounter {
10
10
  expired: Int
11
+ threeMonths: Int
11
12
  sixMonths: Int
12
13
  nineMonths: Int
13
14
  }
@@ -1 +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;;;;;;CAMxC,CAAA"}
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"}
@@ -5,12 +5,16 @@ const analysis_picking_packing_report_1 = require("./analysis-picking-packing-re
5
5
  const analysis_picking_packing_report_list_1 = require("./analysis-picking-packing-report-list");
6
6
  const costing_report_1 = require("./costing-report");
7
7
  const costing_report_list_1 = require("./costing-report-list");
8
+ const cycle_count_report_1 = require("./cycle-count-report");
9
+ const cycle_count_report_list_1 = require("./cycle-count-report-list");
8
10
  const inbound_order_details_report_1 = require("./inbound-order-details-report");
9
11
  const inbound_order_details_report_list_1 = require("./inbound-order-details-report-list");
10
12
  const inbound_serial_number_report_1 = require("./inbound-serial-number-report");
11
13
  const inbound_serial_number_report_list_1 = require("./inbound-serial-number-report-list");
12
14
  const loading_qc_report_1 = require("./loading-qc-report");
13
15
  const loading_qc_report_list_1 = require("./loading-qc-report-list");
16
+ const manifest_report_list_1 = require("./manifest-report-list");
17
+ const manifest_report_type_1 = require("./manifest-report-type");
14
18
  const non_loaded_inventory_report_1 = require("./non-loaded-inventory-report");
15
19
  const non_loaded_inventory_report_list_1 = require("./non-loaded-inventory-report-list");
16
20
  const outbound_order_details_report_1 = require("./outbound-order-details-report");
@@ -25,8 +29,6 @@ const shortage_report_list_1 = require("./shortage-report-list");
25
29
  const shortage_report_type_1 = require("./shortage-report-type");
26
30
  const vas_report_1 = require("./vas-report");
27
31
  const vas_report_list_1 = require("./vas-report-list");
28
- const cycle_count_report_1 = require("./cycle-count-report");
29
- const cycle_count_report_list_1 = require("./cycle-count-report-list");
30
32
  exports.Query = `
31
33
  inboundSerialNumberReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): InboundSerialNumberReportList @transaction
32
34
  outboundSerialNumberReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): OutboundSerialNumberReportList @transaction
@@ -42,6 +44,7 @@ exports.Query = `
42
44
  analysisPickingPackingReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): AnalysisPickingPackingReportList @transaction
43
45
  cycleCountReport(name: String!): CycleCountReportList @transaction
44
46
  nonLoadedOrderInventories(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): NonLoadedOrderInventoryReportList @transaction
47
+ manifestReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): ManifestReportList @transaction
45
48
  `;
46
49
  exports.Types = [
47
50
  inbound_serial_number_report_1.InboundSerialNumberReport,
@@ -71,6 +74,8 @@ exports.Types = [
71
74
  cycle_count_report_1.CycleCountReport,
72
75
  cycle_count_report_list_1.CycleCountReportList,
73
76
  non_loaded_inventory_report_1.NonLoadedOrderInventoryReport,
74
- non_loaded_inventory_report_list_1.NonLoadedOrderInventoryReportList
77
+ non_loaded_inventory_report_list_1.NonLoadedOrderInventoryReportList,
78
+ manifest_report_type_1.ManifestReport,
79
+ manifest_report_list_1.ManifestReportList
75
80
  ];
76
81
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/index.ts"],"names":[],"mappings":";;;AAAA,uFAAgF;AAChF,iGAAyF;AACzF,qDAAgD;AAChD,+DAAyD;AACzD,iFAA0E;AAC1E,2FAAmF;AACnF,iFAA0E;AAC1E,2FAAmF;AACnF,2DAAqD;AACrD,qEAA8D;AAC9D,+EAA6E;AAC7E,yFAAsF;AACtF,mFAA4E;AAC5E,6FAAqF;AACrF,mFAA4E;AAC5E,6FAAqF;AACrF,iEAA2D;AAC3D,2EAAoE;AACpE,yEAAmE;AACnE,mFAA4E;AAC5E,iEAA2D;AAC3D,iEAAuD;AACvD,6CAAwD;AACxD,uDAAqE;AACrE,6DAAuD;AACvD,uEAAgE;AAEnD,QAAA,KAAK,GAAG;;;;;;;;;;;;;;;CAepB,CAAA;AAEY,QAAA,KAAK,GAAG;IACnB,wDAAyB;IACzB,iEAA6B;IAC7B,0DAA0B;IAC1B,mEAA8B;IAC9B,wDAAyB;IACzB,iEAA6B;IAC7B,0DAA0B;IAC1B,mEAA8B;IAC9B,yCAAkB;IAClB,kDAAsB;IACtB,8BAAa;IACb,uCAAiB;IACjB,iDAAsB;IACtB,0DAA0B;IAC1B,qCAAc;IACd,yCAAkB;IAClB,mCAAe;IACf,4CAAmB;IACnB,2BAAc;IACd,oCAAkB;IAClB,sBAAS;IACT,+BAAa;IACb,8DAA4B;IAC5B,uEAAgC;IAChC,qCAAgB;IAChB,8CAAoB;IACpB,2DAA6B;IAC7B,oEAAiC;CAClC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/index.ts"],"names":[],"mappings":";;;AAAA,uFAAgF;AAChF,iGAAyF;AACzF,qDAAgD;AAChD,+DAAyD;AACzD,6DAAuD;AACvD,uEAAgE;AAChE,iFAA0E;AAC1E,2FAAmF;AACnF,iFAA0E;AAC1E,2FAAmF;AACnF,2DAAqD;AACrD,qEAA8D;AAC9D,iEAA2D;AAC3D,iEAAuD;AACvD,+EAA6E;AAC7E,yFAAsF;AACtF,mFAA4E;AAC5E,6FAAqF;AACrF,mFAA4E;AAC5E,6FAAqF;AACrF,iEAA2D;AAC3D,2EAAoE;AACpE,yEAAmE;AACnE,mFAA4E;AAC5E,iEAA2D;AAC3D,iEAAuD;AACvD,6CAGqB;AACrB,uDAG0B;AAEb,QAAA,KAAK,GAAG;;;;;;;;;;;;;;;;CAgBpB,CAAA;AAEY,QAAA,KAAK,GAAG;IACnB,wDAAyB;IACzB,iEAA6B;IAC7B,0DAA0B;IAC1B,mEAA8B;IAC9B,wDAAyB;IACzB,iEAA6B;IAC7B,0DAA0B;IAC1B,mEAA8B;IAC9B,yCAAkB;IAClB,kDAAsB;IACtB,8BAAa;IACb,uCAAiB;IACjB,iDAAsB;IACtB,0DAA0B;IAC1B,qCAAc;IACd,yCAAkB;IAClB,mCAAe;IACf,4CAAmB;IACnB,2BAAc;IACd,oCAAkB;IAClB,sBAAS;IACT,+BAAa;IACb,8DAA4B;IAC5B,uEAAgC;IAChC,qCAAgB;IAChB,8CAAoB;IACpB,2DAA6B;IAC7B,oEAAiC;IACjC,qCAAc;IACd,yCAAkB;CACnB,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.ManifestReportList = void 0;
7
+ const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
+ exports.ManifestReportList = (0, graphql_tag_1.default) `
9
+ type ManifestReportList {
10
+ items: [ManifestReport]
11
+ total: Int
12
+ }
13
+ `;
14
+ //# sourceMappingURL=manifest-report-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-report-list.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/manifest-report-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,kBAAkB,GAAG,IAAA,qBAAG,EAAA;;;;;CAKpC,CAAA"}
@@ -0,0 +1,22 @@
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.ManifestReport = void 0;
7
+ const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
+ exports.ManifestReport = (0, graphql_tag_1.default) `
9
+ type ManifestReport {
10
+ bizplace: String
11
+ refNo: String
12
+ roNo: String
13
+ status: String
14
+ trackingNo: String
15
+ manifestNo: String
16
+ manifestedAt: Date
17
+ manifestedBy: String
18
+ orderedAt: String
19
+ transporter: String
20
+ }
21
+ `;
22
+ //# sourceMappingURL=manifest-report-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-report-type.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/manifest-report-type.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,cAAc,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;CAahC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.464",
3
+ "version": "4.3.466",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "dc2feb22015b76dc2ccb311676a5fdf2ef2c6372"
120
+ "gitHead": "19fbaedcf925c67961cc2a54dff1153e0a60105f"
121
121
  }
@@ -1,8 +1,11 @@
1
1
  import { EntityManager } from 'typeorm'
2
2
 
3
3
  import { User } from '@things-factory/auth-base'
4
- import { Domain, ListParam } from '@things-factory/shell'
5
4
  import { getPermittedBizplaceIds } from '@things-factory/biz-base'
5
+ import {
6
+ Domain,
7
+ ListParam
8
+ } from '@things-factory/shell'
6
9
 
7
10
  export const inventoryExpiryMonitorResolver = {
8
11
  async inventoryExpiryMonitor(_: any, params: ListParam, context: any) {
@@ -26,11 +29,12 @@ export const inventoryExpiryMonitorResolver = {
26
29
  sixtyDays: number
27
30
  }[] = await tx.query(
28
31
  `
29
- SELECT "location", sum("expired") AS "expired", sum("sixMonths") AS "sixMonths", sum("nineMonths") AS "nineMonths" FROM (
32
+ SELECT "location", sum("expired") AS "expired", SUM("threeMonths") AS "threeMonths", sum("sixMonths") AS "sixMonths", sum("nineMonths") AS "nineMonths" FROM (
30
33
  SELECT
31
34
  CASE WHEN l.TYPE IN ('QUARANTINE','RESERVE') THEN 'QUARANTINED' ELSE 'IN SHELF' END AS "location",
32
35
  CASE WHEN i.expiration_date - now()::date <= 0 THEN 1 ELSE 0 END AS "expired",
33
- CASE WHEN i.expiration_date - now()::date > 0 AND i.expiration_date - now()::date <= 180 THEN 1 ELSE 0 END AS "sixMonths",
36
+ CASE WHEN i.expiration_date - now()::date > 0 AND i.expiration_date - now()::date <= 90 THEN 1 ELSE 0 END AS "threeMonths",
37
+ CASE WHEN i.expiration_date - now()::date > 90 AND i.expiration_date - now()::date <= 180 THEN 1 ELSE 0 END AS "sixMonths",
34
38
  CASE WHEN i.expiration_date - now()::date > 180 AND i.expiration_date - now()::date <= 270 THEN 1 ELSE 0 END AS "nineMonths"
35
39
  FROM inventories i
36
40
  INNER JOIN locations l ON i.location_id = l.id
@@ -38,7 +42,7 @@ export const inventoryExpiryMonitorResolver = {
38
42
  AND i.expiration_date NOTNULL
39
43
  AND i.status = 'STORED'
40
44
  AND i.domain_id = $1
41
- AND i.bizplace_id IN (${bizplaceIds})
45
+ AND i.bizplace_id in (${bizplaceIds})
42
46
  ) AS foo
43
47
  GROUP BY "location"
44
48
  `,
@@ -56,5 +60,5 @@ function getExpiryCountByStatus(expInventories, location) {
56
60
  let matchedInv: any = expInventories.find(inv => inv.location == location)
57
61
 
58
62
  if (matchedInv) return (({ location, ...inv }) => inv)(matchedInv)
59
- else return { expired: 0, sixMonths: 0, nineMonths: 0 }
63
+ else return { expired: 0, threeMonths: 0, sixMonths: 0, nineMonths: 0 }
60
64
  }
@@ -1,7 +1,9 @@
1
1
  import { analysisPickingPackingReport } from './analysis-picking-packing-report'
2
2
  import { costingReport } from './costing-report'
3
+ import { cycleCountReport } from './cycle-count-report'
3
4
  import { inboundOrderDetailsReport } from './inbound-order-details-report'
4
5
  import { inboundSerialNumberReport } from './inbound-serial-number-report'
6
+ import { manifestReport } from './manifest-report'
5
7
  import { nonLoadedOrderInventoriesReport } from './non-loaded-inventory-report'
6
8
  import { outboundOrderDetailsReport } from './outbound-order-details-report'
7
9
  import { outboundSerialNumberReport } from './outbound-serial-number-report'
@@ -9,8 +11,10 @@ import { productLabelReport } from './product-label-report'
9
11
  import { releaseInventoryReport } from './release-inventory-report'
10
12
  import { shortageReport } from './shortage-report'
11
13
  import { loadingQcReport } from './tote-loading-qc-report'
12
- import { orderVasReport, vasReport } from './vas-report'
13
- import { cycleCountReport } from './cycle-count-report'
14
+ import {
15
+ orderVasReport,
16
+ vasReport
17
+ } from './vas-report'
14
18
 
15
19
  export const Query = {
16
20
  ...inboundSerialNumberReport,
@@ -26,5 +30,6 @@ export const Query = {
26
30
  ...vasReport,
27
31
  ...analysisPickingPackingReport,
28
32
  ...cycleCountReport,
29
- ...nonLoadedOrderInventoriesReport
33
+ ...nonLoadedOrderInventoriesReport,
34
+ ...manifestReport
30
35
  }
@@ -0,0 +1,109 @@
1
+ import { EntityManager } from 'typeorm'
2
+
3
+ import { ListParam } from '@things-factory/shell'
4
+
5
+ export const manifestReport = {
6
+ async manifestReport(_: any, params: ListParam, context: any) {
7
+ try {
8
+ const { tx }: { tx: EntityManager } = context.state
9
+ let bizplace = params.filters.find(items => items.name === 'bizplace')
10
+ let trackingNo = params.filters.findIndex(items => items.name === 'trackingNo')
11
+ let releaseGoodNo = params.filters.find(items => items.name === 'releaseGoodNo')
12
+ let fromDate = params.filters.find(items => items.name === 'fromDate')
13
+ let toDate = params.filters.find(items => items.name === 'toDate')
14
+ let hasTrackingNo = params.filters.find(items => items.name === 'hasTrackingNo')
15
+
16
+ if (!bizplace) throw 'Invalid input'
17
+
18
+ let hasTrackingNoFilter = ''
19
+ if (hasTrackingNo?.value == true) {
20
+ hasTrackingNoFilter += `AND op.tracking_no NOTNULL`
21
+ } else if (hasTrackingNo?.value == false) {
22
+ hasTrackingNoFilter += `AND op.tracking_no ISNULL`
23
+ }
24
+
25
+ let releaseGoodFilter = ''
26
+ if (releaseGoodNo) {
27
+ releaseGoodFilter += `AND rg.name = '${releaseGoodNo.value}'`
28
+ }
29
+
30
+ let trackingNoFilterValue
31
+ let trackingNoFilter = ''
32
+ if (trackingNo >= 0) {
33
+ trackingNoFilterValue = params.filters[trackingNo].value
34
+ .split(',')
35
+ .map(value => `'${value.trim().toUpperCase()}'`)
36
+
37
+ params.filters.splice(trackingNo, 1)
38
+
39
+ trackingNoFilter += `AND op.tracking_no in (${trackingNoFilterValue})`
40
+ }
41
+
42
+ await tx.query(
43
+ `
44
+ CREATE TEMP TABLE manifest_report ON COMMIT DROP AS (
45
+ SELECT
46
+ rg.created_at AS "ordered_at",
47
+ rg.status,
48
+ op.tracking_no,
49
+ m.name AS "manifest_no",
50
+ m.created_at AS "manifested_at",
51
+ op.transporter AS "transporter",
52
+ u.name AS "manifested_by",
53
+ b.name AS "company",
54
+ rg.ref_no AS "ref_no",
55
+ rg.name AS "ro_no"
56
+ FROM order_packages op
57
+ LEFT JOIN
58
+ manifests m on m.id = op.manifest_id
59
+ LEFT JOIN
60
+ users u on u.id = op.manifested_by_id
61
+ INNER JOIN
62
+ bizplaces b on op.bizplace_id = b.id
63
+ INNER JOIN
64
+ release_goods rg on op.release_good_id = rg.id
65
+ WHERE
66
+ op.domain_id = $1
67
+ AND op.bizplace_id = '${bizplace.value}'
68
+ AND op.created_at >= $2
69
+ AND op.created_at <= $3
70
+ ${releaseGoodFilter}
71
+ ${trackingNoFilter}
72
+ ${hasTrackingNoFilter}
73
+ )
74
+ `,
75
+ [context.state.domain.id, fromDate.value, toDate.value]
76
+ )
77
+
78
+ const total: any = await tx.query(`
79
+ SELECT count(*) FROM manifest_report
80
+ `)
81
+
82
+ const result: any = await tx.query(`
83
+ SELECT * FROM manifest_report
84
+ offset $1 limit $2
85
+ `,
86
+ [(params.pagination.page - 1) * params.pagination.limit, params.pagination.limit]
87
+ )
88
+
89
+ let items = result.map(itm => {
90
+ return {
91
+ bizplace: itm.company,
92
+ refNo: itm.ref_no,
93
+ roNo: itm.ro_no,
94
+ status: itm.status,
95
+ trackingNo: itm.tracking_no,
96
+ manifestNo: itm.manifest_no,
97
+ manifestedAt: itm.manifested_at,
98
+ manifestedBy: itm.manifested_by,
99
+ orderedAt: itm.ordered_at,
100
+ transporter: itm.transporter
101
+ }
102
+ })
103
+
104
+ return { items, total: total[0].count }
105
+ } catch (e) {
106
+ throw e
107
+ }
108
+ }
109
+ }
@@ -3,6 +3,7 @@ import gql from 'graphql-tag'
3
3
  export const InventoryExpiryCounter = gql`
4
4
  type InventoryExpiryCounter {
5
5
  expired: Int
6
+ threeMonths: Int
6
7
  sixMonths: Int
7
8
  nineMonths: Int
8
9
  }
@@ -2,12 +2,16 @@ import { AnalysisPickingPackingReport } from './analysis-picking-packing-report'
2
2
  import { AnalysisPickingPackingReportList } from './analysis-picking-packing-report-list'
3
3
  import { CostingReport } from './costing-report'
4
4
  import { CostingReportList } from './costing-report-list'
5
+ import { CycleCountReport } from './cycle-count-report'
6
+ import { CycleCountReportList } from './cycle-count-report-list'
5
7
  import { InboundOrderDetailsReport } from './inbound-order-details-report'
6
8
  import { InboundOrderDetailsReportList } from './inbound-order-details-report-list'
7
9
  import { InboundSerialNumberReport } from './inbound-serial-number-report'
8
10
  import { InboundSerialNumberReportList } from './inbound-serial-number-report-list'
9
11
  import { LoadingQcReport } from './loading-qc-report'
10
12
  import { LoadingQcReportList } from './loading-qc-report-list'
13
+ import { ManifestReportList } from './manifest-report-list'
14
+ import { ManifestReport } from './manifest-report-type'
11
15
  import { NonLoadedOrderInventoryReport } from './non-loaded-inventory-report'
12
16
  import { NonLoadedOrderInventoryReportList } from './non-loaded-inventory-report-list'
13
17
  import { OutboundOrderDetailsReport } from './outbound-order-details-report'
@@ -20,10 +24,14 @@ import { ReleaseInventoryReport } from './release-inventory-report'
20
24
  import { ReleaseInventoryReportList } from './release-inventory-report-list'
21
25
  import { ShortageReportList } from './shortage-report-list'
22
26
  import { ShortageReport } from './shortage-report-type'
23
- import { OrderVasReport, VasReport } from './vas-report'
24
- import { OrderVasReportList, VasReportList } from './vas-report-list'
25
- import { CycleCountReport } from './cycle-count-report'
26
- import { CycleCountReportList } from './cycle-count-report-list'
27
+ import {
28
+ OrderVasReport,
29
+ VasReport
30
+ } from './vas-report'
31
+ import {
32
+ OrderVasReportList,
33
+ VasReportList
34
+ } from './vas-report-list'
27
35
 
28
36
  export const Query = `
29
37
  inboundSerialNumberReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): InboundSerialNumberReportList @transaction
@@ -40,6 +48,7 @@ export const Query = `
40
48
  analysisPickingPackingReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): AnalysisPickingPackingReportList @transaction
41
49
  cycleCountReport(name: String!): CycleCountReportList @transaction
42
50
  nonLoadedOrderInventories(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): NonLoadedOrderInventoryReportList @transaction
51
+ manifestReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): ManifestReportList @transaction
43
52
  `
44
53
 
45
54
  export const Types = [
@@ -70,5 +79,7 @@ export const Types = [
70
79
  CycleCountReport,
71
80
  CycleCountReportList,
72
81
  NonLoadedOrderInventoryReport,
73
- NonLoadedOrderInventoryReportList
82
+ NonLoadedOrderInventoryReportList,
83
+ ManifestReport,
84
+ ManifestReportList
74
85
  ]
@@ -0,0 +1,8 @@
1
+ import gql from 'graphql-tag'
2
+
3
+ export const ManifestReportList = gql`
4
+ type ManifestReportList {
5
+ items: [ManifestReport]
6
+ total: Int
7
+ }
8
+ `
@@ -0,0 +1,16 @@
1
+ import gql from 'graphql-tag'
2
+
3
+ export const ManifestReport = gql`
4
+ type ManifestReport {
5
+ bizplace: String
6
+ refNo: String
7
+ roNo: String
8
+ status: String
9
+ trackingNo: String
10
+ manifestNo: String
11
+ manifestedAt: Date
12
+ manifestedBy: String
13
+ orderedAt: String
14
+ transporter: String
15
+ }
16
+ `
@@ -544,6 +544,10 @@ export default {
544
544
  tagname: 'replenishment-report',
545
545
  page: 'replenishment_report'
546
546
  },
547
+ {
548
+ tagname: 'manifest-report',
549
+ page: 'manifest_report'
550
+ },
547
551
 
548
552
  /**
549
553
  * Custom ELCCL Menus Section
@@ -1552,6 +1552,7 @@
1552
1552
  "text.please_attach_the_file": "please attach the file",
1553
1553
  "text.please_check_your_setting": "please check your setting",
1554
1554
  "text.please_check_your_vas_target": "please check your vas target",
1555
+ "text.please_enter_the_correct_date_format": "please enter the correct date format",
1555
1556
  "text.please_enter_transfer_qty": "please enter transfer quantity",
1556
1557
  "text.please_fill_in_the_shipping_information_in_shipment_tab": "please fill in the shipping information in shipment tab.",
1557
1558
  "text.please_insert_batch_no": "please insert batch no",
@@ -1981,6 +1982,7 @@
1981
1982
  "title.manifest_items": "manifest items",
1982
1983
  "title.manifest_list": "manifest list",
1983
1984
  "title.manifest_no": "manifest no",
1985
+ "title.manifest_report": "manifest report",
1984
1986
  "title.manifest": "manifest",
1985
1987
  "title.existing_manifest": "existing manifest",
1986
1988
  "title.menu_management": "menu management",
@@ -1541,6 +1541,7 @@
1541
1541
  "text.please_attach_the_file": "[ko]please attach the file",
1542
1542
  "text.please_check_your_setting": "설정을 확인해 주세요",
1543
1543
  "text.please_check_your_vas_target": "[ko] please check your vas target",
1544
+ "text.please_enter_the_correct_date_format": "[ko] please enter the correct date format",
1544
1545
  "text.please_enter_transfer_qty": "[ko] please enter transfer quantity",
1545
1546
  "text.please_fill_in_the_shipping_information_in_shipment_tab": "[ko] please fill in the shipping information in shipment tab.",
1546
1547
  "text.please_insert_batch_no": "[ko]please insert batch no",
@@ -2034,6 +2035,7 @@
2034
2035
  "title.manifest_items": "[ko] manifest items",
2035
2036
  "title.manifest_list": "[ko] manifest list",
2036
2037
  "title.manifest_no": "[ko] manifest no",
2038
+ "title.manifest_report": "[ko]] manifest report",
2037
2039
  "title.manifest": "[ko] manifest",
2038
2040
  "title.existing_manifest": "[ko] existing manifest",
2039
2041
  "title.menu_management": "메뉴 관리",
@@ -1493,6 +1493,7 @@
1493
1493
  "text.please_attach_the_file": "[ms]please attach the file",
1494
1494
  "text.please_check_your_setting": "tolong semak tetapan anda",
1495
1495
  "text.please_check_your_vas_target": "sila semak sasaran vas anda",
1496
+ "text.please_enter_the_correct_date_format": "[ms] please enter the correct date format",
1496
1497
  "text.please_enter_transfer_qty": "[ms] please enter transfer quantity",
1497
1498
  "text.please_fill_in_the_shipping_information_in_shipment_tab": "[ms] please fill in the shipping information in shipment tab.",
1498
1499
  "text.please_insert_batch_no": "[ms]please insert batch no",
@@ -1933,6 +1934,7 @@
1933
1934
  "title.manifest_items": "[ms] manifest items",
1934
1935
  "title.manifest_list": "[ms] manifest list",
1935
1936
  "title.manifest_no": "[ms] manifest no",
1937
+ "title.manifest_report": "[ms] manifest report",
1936
1938
  "title.manifest": "[ms] manifest",
1937
1939
  "title.existing_manifest": "[ms]existing manifest",
1938
1940
  "title.menu_management": "pengurusan menu",
@@ -1460,6 +1460,7 @@
1460
1460
  "text.please_attach_the_file": "[zh]please attach the file",
1461
1461
  "text.please_check_your_setting": "please check your setting",
1462
1462
  "text.please_check_your_vas_target": "[zh] please check your vas target",
1463
+ "text.please_enter_the_correct_date_format": "[zh] please enter the correct date format",
1463
1464
  "text.please_enter_transfer_qty": "[zh] please enter transfer quantity",
1464
1465
  "text.please_fill_in_the_shipping_information_in_shipment_tab": "[zh] please fill in the shipping information in shipment tab.",
1465
1466
  "text.please_insert_batch_no": "[zh]please insert batch no",
@@ -1890,6 +1891,7 @@
1890
1891
  "title.manifest_items": "[zh] manifest items",
1891
1892
  "title.manifest_list": "[zh] manifest list",
1892
1893
  "title.manifest_no": "[zh] manifest no",
1894
+ "title.manifest_report": "[zh] manifest report",
1893
1895
  "title.manifest": "[zh] manifest",
1894
1896
  "title.existing_manifest": "[zh]existing manifest",
1895
1897
  "title.menu_management": "menu management",