@things-factory/operato-wms 4.3.273 → 4.3.281

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/constants/vas.js +4 -0
  2. package/client/pages/constants/order.js +2 -1
  3. package/client/pages/order/release-order/release-order-detail.js +5 -12
  4. package/client/pages/outbound/worksheet-picking.js +3 -2
  5. package/client/pages/report/order-vas-report.js +577 -0
  6. package/client/pages/report/vas-report.js +52 -182
  7. package/client/pages/vas/vas-execution-page.js +3 -3
  8. package/client/route.js +4 -0
  9. package/config.development.js +77 -96
  10. package/dist-server/graphql/resolvers/reports/index.js +1 -1
  11. package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
  12. package/dist-server/graphql/resolvers/reports/vas-report.js +166 -24
  13. package/dist-server/graphql/resolvers/reports/vas-report.js.map +1 -1
  14. package/dist-server/graphql/types/reports/index.js +4 -1
  15. package/dist-server/graphql/types/reports/index.js.map +1 -1
  16. package/dist-server/graphql/types/reports/vas-report-list.js +9 -3
  17. package/dist-server/graphql/types/reports/vas-report-list.js.map +1 -1
  18. package/dist-server/graphql/types/reports/vas-report.js +12 -2
  19. package/dist-server/graphql/types/reports/vas-report.js.map +1 -1
  20. package/package.json +50 -50
  21. package/server/graphql/resolvers/reports/index.ts +2 -1
  22. package/server/graphql/resolvers/reports/vas-report.ts +186 -23
  23. package/server/graphql/types/reports/index.ts +6 -3
  24. package/server/graphql/types/reports/vas-report-list.ts +8 -2
  25. package/server/graphql/types/reports/vas-report.ts +13 -2
  26. package/things-factory.config.js +4 -0
  27. package/translations/en.json +12 -2
  28. package/translations/ko.json +14 -3
  29. package/translations/ms.json +13 -3
  30. package/translations/zh.json +13 -3
@@ -0,0 +1,4 @@
1
+ export const VAS_TYPES = {
2
+ MATERIALS: 'MATERIALS',
3
+ SERVICE: 'SERVICE'
4
+ }
@@ -67,7 +67,8 @@ export const ORDER_STATUS = {
67
67
  READY_TO_DISPATCH: { name: 'order_status_ready_to_dispatch', value: 'READY_TO_DISPATCH' },
68
68
  READY_TO_EXECUTE: { name: 'order_status_ready_to_execute', value: 'READY_TO_EXECUTE' },
69
69
  READY_TO_SEND: { name: 'order_status_ready_to_send', value: 'READY_TO_SEND' },
70
- OBSOLETE: { name: 'order_status_obsolete', value: 'OBSOLETE' }
70
+ OBSOLETE: { name: 'order_status_obsolete', value: 'OBSOLETE' },
71
+ VAS: { name: 'order_status_vas', value: 'VAS' }
71
72
  }
72
73
 
73
74
  export const MANIFEST_STATUS = {
@@ -921,7 +921,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
921
921
  ORDER_STATUS.PICKING.value,
922
922
  ORDER_STATUS.PENDING_WORKSHEET.value,
923
923
  ORDER_STATUS.READY_TO_PICK.value,
924
- ORDER_STATUS.LOADING.value
924
+ ORDER_STATUS.LOADING.value,
925
+ ORDER_STATUS.VAS.value
925
926
  ]
926
927
 
927
928
  if (cancelOrderStatus.indexOf(this._status) >= 0) {
@@ -2993,7 +2994,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
2993
2994
  p.__dirtyfields__.qty ||
2994
2995
  p.__dirtyfields__.outputQty ||
2995
2996
  p.__dirtyfields__.productSKU ||
2996
- p.__dirtyfields__.newSku
2997
+ p.__dirtyfields__.newSku ||
2998
+ p.__dirtyfields__.remark
2997
2999
  )
2998
3000
  orderVasItemPatch = orderVasItemPatch = this.vasGrist.dirtyRecords.filter(
2999
3001
  p =>
@@ -3004,16 +3006,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
3004
3006
  !p.__dirtyfields__.productSKU ||
3005
3007
  !p.__dirtyfields__.newSku))
3006
3008
  )
3007
- // new Data
3008
- // can include below since only
3009
- // remove this
3010
- // orderVasPatch = orderVasPatch.concat(
3011
- // this.vasGrist.dirtyData.records
3012
- // .filter(v => !v.id)
3013
- // .map(v => {
3014
- // return { ...v, cuFlag: '+' }
3015
- // })
3016
- // )
3017
3009
 
3018
3010
  // deleted Data
3019
3011
  orderVasPatch = orderVasPatch.concat(this.deletedVas.filter(del => del.id))
@@ -3050,6 +3042,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
3050
3042
  }
3051
3043
  }, [])
3052
3044
  : undefined,
3045
+ remark: ov.remark,
3053
3046
  cuFlag: !ov.id ? '+' : ov.cuFlag ? ov.cuFlag : ov.__dirty__
3054
3047
  }
3055
3048
  })
@@ -776,6 +776,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
776
776
  description
777
777
  targetInventory {
778
778
  batchId
779
+ type
779
780
  batchIdRef
780
781
  product {
781
782
  id
@@ -951,12 +952,12 @@ class WorksheetPicking extends localize(i18next)(PageView) {
951
952
  status: wsd.status,
952
953
  productSku: wsd.targetInventory.inventory.product.sku,
953
954
  productBrand: wsd.targetInventory.inventory.product.brand,
954
- releaseQty: wsd.targetInventory.releaseQty,
955
+ releaseQty: orderVass.length == 0 || (orderVass.length > 0 && worksheet.status !== 'DONE') ? wsd.targetInventory.releaseQty : wsd.targetInventory.pickedQty ,
955
956
  releaseUomValue: wsd.targetInventory.releaseUomValue,
956
957
  releaseUomValueWithUom:
957
958
  wsd.targetInventory.releaseUomValue.toFixed(2) + ' ' + wsd.targetInventory.inventory.uom,
958
959
  availableQty:
959
- orderVass.length == 0
960
+ orderVass.length == 0 || (orderVass.length > 0 && worksheet.status !== 'DONE')
960
961
  ? wsd.targetInventory.inventory.qty -
961
962
  wsd.targetInventory.inventory.lockedQty +
962
963
  wsd.targetInventory.releaseQty
@@ -0,0 +1,577 @@
1
+ import '@things-factory/form-ui'
2
+ import '@things-factory/grist-ui'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html } from 'lit-element'
6
+ import { connect } from 'pwa-helpers/connect-mixin'
7
+
8
+ import { i18next, localize } from '@things-factory/i18n-base'
9
+ import { client, PageView, store } from '@things-factory/shell'
10
+ import { flattenObject } from '@things-factory/utils'
11
+
12
+ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
13
+ static get styles() {
14
+ return css`
15
+ :host {
16
+ display: flex;
17
+ flex-direction: column;
18
+ width: 100%;
19
+ }
20
+
21
+ data-report {
22
+ flex: 1;
23
+ }
24
+ `
25
+ }
26
+
27
+ static get properties() {
28
+ return {
29
+ _searchFields: Object,
30
+ _config: Object,
31
+ _partners: Object,
32
+ _partnerId: String,
33
+ _partnerName: String,
34
+ data: Object
35
+ }
36
+ }
37
+
38
+ get context() {
39
+ return {
40
+ title: i18next.t('title.vas_order_report'),
41
+ printable: {
42
+ accept: ['preview'],
43
+ content: this
44
+ },
45
+ exportable: {
46
+ name: i18next.t('title.date_vas_order_report', {
47
+ state: {
48
+ text: (() => {
49
+ let date = new Date()
50
+ return date.getFullYear().toString() + (date.getMonth() + 1).toString() + date.getDate().toString()
51
+ })()
52
+ }
53
+ }),
54
+ data: this._exportableData.bind(this)
55
+ },
56
+ help: 'operato-wms/report/order-vas-report'
57
+ }
58
+ }
59
+
60
+ get report() {
61
+ return this.shadowRoot.querySelector('data-report')
62
+ }
63
+
64
+ get searchForm() {
65
+ return this.shadowRoot.querySelector('search-form')
66
+ }
67
+
68
+ get _bizplaceSelector() {
69
+ return this.searchForm.shadowRoot.querySelector('select[name=bizplace]')
70
+ }
71
+
72
+ get _fromDateInput() {
73
+ return this.searchForm.shadowRoot.querySelector('input[name=fromDate]')
74
+ }
75
+
76
+ get _toDateInput() {
77
+ return this.searchForm.shadowRoot.querySelector('input[name=toDate]')
78
+ }
79
+
80
+ render() {
81
+ return html`
82
+ <search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.report.fetch()}></search-form>
83
+
84
+ <data-report .config=${this._config} .fetchHandler=${this.fetchHandler.bind(this)}></data-report>
85
+ `
86
+ }
87
+
88
+ get searchFields() {
89
+ return [
90
+ {
91
+ label: i18next.t('field.company'),
92
+ name: 'bizplace',
93
+ type: 'select',
94
+ options: [
95
+ { value: '' },
96
+ ...this._partners
97
+ .map(partner => {
98
+ return {
99
+ name: `${partner.name} ${partner.description ? `(${partner.description})` : ''}`,
100
+ value: partner.id
101
+ }
102
+ })
103
+ .sort(this._compareValues('name', 'asc'))
104
+ ],
105
+ props: { searchOper: 'eq' }
106
+ },
107
+ {
108
+ label: i18next.t('field.executed_at_from_date'),
109
+ name: 'fromDate',
110
+ type: 'date',
111
+ props: {
112
+ searchOper: 'eq',
113
+ max: new Date().toISOString().split('T')[0]
114
+ },
115
+ handlers: { change: this._modifyDateRange.bind(this) }
116
+ },
117
+ {
118
+ label: i18next.t('field.executed_at_to_date'),
119
+ name: 'toDate',
120
+ type: 'date',
121
+ props: {
122
+ searchOper: 'eq',
123
+ min: (() => {
124
+ let date = new Date()
125
+ date.setMonth(date.getMonth() - 1)
126
+ return date.toISOString().split('T')[0]
127
+ })(),
128
+ max: new Date().toISOString().split('T')[0]
129
+ }
130
+ },
131
+ {
132
+ label: i18next.t('field.product_info'),
133
+ name: 'productInfo',
134
+ type: 'string',
135
+ props: { searchOper: 'i_like' }
136
+ },
137
+ {
138
+ label: i18next.t('field.order_no'),
139
+ name: 'orderNo',
140
+ type: 'string',
141
+ props: { searchOper: 'i_like' }
142
+ }
143
+ ]
144
+ }
145
+
146
+ get reportConfig() {
147
+ return {
148
+ rows: {
149
+ selectable: false,
150
+ groups: [
151
+ { column: 'bizplaceName' },
152
+ // { column: 'ro' },
153
+ { column: 'ro', title: 'Sub Total' },
154
+ { column: 'refNo' },
155
+ { column: 'sku' },
156
+ { column: 'batchId' },
157
+ { column: 'packingType' },
158
+ { column: 'uom' },
159
+ { column: 'uomValue' },
160
+ { column: 'releaseQty' },
161
+ { column: 'orderVasName' },
162
+ { column: 'qty' },
163
+ { column: 'newSku' },
164
+ { column: 'newPackingType' },
165
+ { column: 'newUom' },
166
+ { column: 'newUomValue' },
167
+ { column: 'outputQty' }
168
+ ],
169
+ totals: ['vasQty']
170
+ },
171
+ columns: [
172
+ {
173
+ type: 'string',
174
+ name: 'bizplaceName',
175
+ header: i18next.t('field.company'),
176
+ sortable: false,
177
+ imex: { header: i18next.t('field.company'), key: 'bizplaceName', width: 30, type: 'string' },
178
+ width: 150
179
+ },
180
+ {
181
+ type: 'string',
182
+ name: 'ro',
183
+ header: i18next.t('field.order_no'),
184
+ sortable: false,
185
+ imex: { header: i18next.t('field.order_no'), key: 'ro', width: 25, type: 'string' },
186
+ width: 160
187
+ },
188
+ {
189
+ type: 'string',
190
+ name: 'refNo',
191
+ header: i18next.t('field.ref_no'),
192
+ sortable: false,
193
+ imex: { header: i18next.t('field.ref_no'), key: 'refNo', width: 25, type: 'string' },
194
+ width: 150
195
+ },
196
+ {
197
+ type: 'string',
198
+ name: 'sku',
199
+ header: i18next.t('field.sku'),
200
+ sortable: false,
201
+ imex: { header: i18next.t('field.sku'), key: 'sku', width: 20, type: 'string' },
202
+ width: 150
203
+ },
204
+ {
205
+ type: 'string',
206
+ name: 'batchId',
207
+ header: i18next.t('field.batch_no'),
208
+ sortable: false,
209
+ imex: { header: i18next.t('field.batch_no'), key: 'batchId', width: 20, type: 'string' },
210
+ width: 100
211
+ },
212
+ {
213
+ type: 'string',
214
+ name: 'packingType',
215
+ header: i18next.t('field.packing_type'),
216
+ sortable: false,
217
+ imex: { header: i18next.t('field.packing_type'), key: 'packingType', width: 20, type: 'string' },
218
+ width: 130
219
+ },
220
+ {
221
+ type: 'string',
222
+ name: 'uom',
223
+ header: i18next.t('field.uom'),
224
+ sortable: false,
225
+ imex: { header: i18next.t('field.uom'), key: 'uom', width: 5, type: 'string' },
226
+ width: 70
227
+ },
228
+ {
229
+ type: 'number',
230
+ name: 'uomValue',
231
+ header: i18next.t('field.unit_uom_value'),
232
+ sortable: false,
233
+ imex: { header: i18next.t('field.unit_uom_value'), key: 'uomValue', width: 10, type: 'string' },
234
+ width: 80
235
+ },
236
+ {
237
+ type: 'number',
238
+ name: 'releaseQty',
239
+ header: i18next.t('field.release_qty'),
240
+ sortable: false,
241
+ imex: { header: i18next.t('field.release_qty'), key: 'releaseQty', width: 10, type: 'number' },
242
+ width: 80
243
+ },
244
+ {
245
+ type: 'string',
246
+ name: 'orderVasName',
247
+ header: i18next.t('field.set'),
248
+ sortable: false,
249
+ imex: { header: i18next.t('field.set'), key: 'orderVasName', width: 10, type: 'string' },
250
+ width: 80
251
+ },
252
+ {
253
+ type: 'number',
254
+ name: 'qty',
255
+ header: i18next.t('field.qty'),
256
+ sortable: false,
257
+ imex: { header: i18next.t('field.qty'), key: 'qty', width: 10, type: 'number' },
258
+ width: 80
259
+ },
260
+ {
261
+ type: 'string',
262
+ name: 'newSku',
263
+ header: i18next.t('field.new_sku'),
264
+ sortable: false,
265
+ imex: { header: i18next.t('field.new_sku'), key: 'newSku', width: 20, type: 'string' },
266
+ width: 150
267
+ },
268
+ {
269
+ type: 'string',
270
+ name: 'newPackingType',
271
+ header: i18next.t('field.packing_type'),
272
+ sortable: false,
273
+ imex: { header: i18next.t('field.packing_type'), key: 'newPackingType', width: 10, type: 'string' },
274
+ width: 90
275
+ },
276
+ {
277
+ type: 'string',
278
+ name: 'newUom',
279
+ header: i18next.t('field.uom'),
280
+ sortable: false,
281
+ imex: { header: i18next.t('field.uom'), key: 'newUom', width: 5, type: 'string' },
282
+ width: 70
283
+ },
284
+ {
285
+ type: 'number',
286
+ name: 'newUomValue',
287
+ header: i18next.t('field.uom_value'),
288
+ sortable: false,
289
+ imex: { header: i18next.t('field.uom_value'), key: 'newUomValue', width: 10, type: 'string' },
290
+ width: 80
291
+ },
292
+ {
293
+ type: 'number',
294
+ name: 'outputQty',
295
+ header: i18next.t('field.output_qty'),
296
+ sortable: false,
297
+ imex: { header: i18next.t('field.output_qty'), key: 'outputQty', width: 10, type: 'string' },
298
+ width: 80
299
+ },
300
+ {
301
+ type: 'string',
302
+ name: 'vas',
303
+ header: i18next.t('field.vas'),
304
+ sortable: false,
305
+ imex: { header: i18next.t('field.vas'), key: 'vas', width: 15, type: 'string' },
306
+ width: 100
307
+ },
308
+ {
309
+ type: 'number',
310
+ name: 'vasQty',
311
+ header: i18next.t('field.vas_qty'),
312
+ sortable: false,
313
+ imex: { header: i18next.t('field.vas_qty'), key: 'vasQty', width: 10, type: 'string' },
314
+ width: 70
315
+ },
316
+ {
317
+ type: 'datetime',
318
+ name: 'executedAt',
319
+ header: i18next.t('field.executed_at'),
320
+ sortable: false,
321
+ imex: { header: i18next.t('field.executed_at'), key: 'executedAt', width: 20, type: 'string' },
322
+ width: 160
323
+ }
324
+ ]
325
+ }
326
+ }
327
+
328
+ async pageInitialized() {
329
+ this._releaseOrders = []
330
+ this._partners = [...(await this._fetchPartners())]
331
+ this._orderVass = []
332
+
333
+ this._searchFields = this.searchFields
334
+ this._config = this.reportConfig
335
+ }
336
+
337
+ pageUpdated(changes, lifecycle) {
338
+ if (this.active) {
339
+ this.report.fetch()
340
+ }
341
+ }
342
+
343
+ async fetchHandler({ page, limit, sorters = [] }) {
344
+ try {
345
+ this._validate()
346
+ const response = await client.query({
347
+ query: gql`
348
+ query orderVasReport($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
349
+ orderVasReport(filters: $filters, pagination: $pagination, sortings: $sortings) {
350
+ items {
351
+ bizplace {
352
+ name
353
+ description
354
+ }
355
+ releaseGood {
356
+ name
357
+ refNo
358
+ }
359
+ orderVas {
360
+ id
361
+ name
362
+ batchId
363
+ packingType
364
+ uom
365
+ uomValue
366
+ newPackingType
367
+ newUom
368
+ newUomValue
369
+ outputQty
370
+ qty
371
+ product {
372
+ sku
373
+ }
374
+ newProduct {
375
+ sku
376
+ }
377
+ }
378
+ orderVasItem {
379
+ vas {
380
+ name
381
+ description
382
+ }
383
+ vasQty
384
+ executedAt
385
+ }
386
+ orderInventory {
387
+ releaseQty
388
+ }
389
+ worksheet {
390
+ endedAt
391
+ }
392
+ }
393
+ }
394
+ }
395
+ `,
396
+ variables: {
397
+ filters: [
398
+ ...this.searchForm.queryFilters.map(filter => {
399
+ switch (filter.name) {
400
+ case 'fromDate':
401
+ let fromDt = new Date(filter.value)
402
+ fromDt.setHours(0)
403
+ filter.value = fromDt.toISOString()
404
+ break
405
+ case 'toDate':
406
+ let toDt = new Date(filter.value)
407
+ toDt.setHours(23, 59, 59)
408
+ filter.value = toDt.toISOString()
409
+ break
410
+ default:
411
+ break
412
+ }
413
+
414
+ return filter
415
+ })
416
+ ],
417
+ pagination: { page, limit },
418
+ sortings: sorters
419
+ }
420
+ })
421
+ return {
422
+ total: 0,
423
+ records: response.data.orderVasReport.items.map(item => {
424
+ return {
425
+ ...item,
426
+ orderVasId: item.orderVas.id,
427
+ orderVasName: item.orderVas.name,
428
+ bizplaceName: item.bizplace.name,
429
+ ro: item.releaseGood.name,
430
+ refNo: item.releaseGood.refNo,
431
+ sku: item.orderVas.product.sku,
432
+ batchId: item.orderVas.batchId,
433
+ qty: item.orderVas.qty,
434
+ packingType: item.orderVas.packingType,
435
+ uom: item.orderVas.uom,
436
+ uomValue: item.orderVas.uomValue,
437
+ releaseQty: item.orderInventory.releaseQty,
438
+ vas: `${item.orderVasItem.vas.name}(${item.orderVasItem.vas.description})`,
439
+ vasQty: item.orderVasItem.vasQty,
440
+ newSku: item.orderVas.newProduct.sku,
441
+ newPackingType: item.orderVas.newPackingType,
442
+ newUom: item.orderVas.newUom,
443
+ outputQty: item.orderVas.outputQty,
444
+ newUomValue: item.orderVas.newUomValue,
445
+ completionDate: item.worksheet.endedAt,
446
+ executedAt: item.orderVasItem.executedAt
447
+ }
448
+ })
449
+ }
450
+ } catch (e) {
451
+ this._showToast(e)
452
+ }
453
+ }
454
+
455
+ async _fetchPartners() {
456
+ const filters = []
457
+ const response = await client.query({
458
+ query: gql`
459
+ query partnersBizplaces($filters: [Filter!]) {
460
+ partnersBizplaces(filters: $filters) {
461
+ items {
462
+ id
463
+ name
464
+ description
465
+ }
466
+ }
467
+ }
468
+ `,
469
+ variables: { filters }
470
+ })
471
+
472
+ if (!response.errors) {
473
+ const partners = response.data.partnersBizplaces.items
474
+ if (partners.length == 1) {
475
+ this._partnerId = partners[0].id
476
+ this._partnerName = partners[0].name
477
+ } else {
478
+ this._partnerId = ''
479
+ this._partnerName = ''
480
+ }
481
+
482
+ return partners
483
+ }
484
+ }
485
+
486
+ _validate() {
487
+ if (!this.searchForm.shadowRoot.querySelector('form').checkValidity())
488
+ throw new Error(i18next.t('text.invalid_form_value'))
489
+ if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.no_company_selected'))
490
+ // if (!this._fromDateInput.value) throw new Error(i18next.t('text.from_date_is_empty'))
491
+ // if (!this._toDateInput.value) throw new Error(i18next.t('text.to_date_is_empty'))
492
+ }
493
+
494
+ _modifyDateRange(e) {
495
+ const fromDate = e.currentTarget.value
496
+
497
+ if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
498
+
499
+ let min = new Date(fromDate)
500
+ let today = new Date()
501
+ today.setHours(0, 0, 0, 0)
502
+
503
+ min = min.toISOString().split('T')[0]
504
+
505
+ this._toDateInput.min = min
506
+ }
507
+
508
+ _compareValues(key, order = 'asc') {
509
+ return function innerSort(a, b) {
510
+ if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
511
+ return 0
512
+ }
513
+
514
+ const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
515
+ const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
516
+
517
+ let comparison = 0
518
+ if (varA > varB) {
519
+ comparison = 1
520
+ } else if (varA < varB) {
521
+ comparison = -1
522
+ }
523
+ return order === 'desc' ? comparison * -1 : comparison
524
+ }
525
+ }
526
+
527
+ _exportableData() {
528
+ try {
529
+ var headerSetting = [
530
+ ...this.report._config.columns
531
+ .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
532
+ .map(column => {
533
+ return column.imex
534
+ })
535
+ ]
536
+
537
+ return {
538
+ header: headerSetting,
539
+ data: this.report.data.records.map(record => {
540
+ let date = new Date(parseInt(record.worksheet.endedAt))
541
+ return flattenObject({
542
+ ...record,
543
+ executedAt:
544
+ record.orderVasItem.executedAt !== null
545
+ ? date.getDate().toString() +
546
+ '/' +
547
+ (date.getMonth() + 1).toString() +
548
+ '/' +
549
+ date.getFullYear().toString() +
550
+ ' ' +
551
+ date.getHours().toString() +
552
+ ':' +
553
+ date.getMinutes().toString()
554
+ : ' '
555
+ })
556
+ }),
557
+ groups: this.report._config.rows.groups,
558
+ totals: this.report._config.rows.totals
559
+ }
560
+ } catch (e) {
561
+ this._showToast(e)
562
+ }
563
+ }
564
+
565
+ _showToast({ type, message }) {
566
+ document.dispatchEvent(
567
+ new CustomEvent('notify', {
568
+ detail: {
569
+ type,
570
+ message
571
+ }
572
+ })
573
+ )
574
+ }
575
+ }
576
+
577
+ window.customElements.define('order-vas-report', OrderVasReport)