@things-factory/operato-wms 4.0.24 → 4.0.28

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 (120) hide show
  1. package/client/bootstrap.js +1 -1
  2. package/client/pages/adjustment/transfer-inventory.js +32 -6
  3. package/client/pages/billing/claim-chit/claim-chit-detail.js +32 -35
  4. package/client/pages/billing/claim-chit/claim-chit-list.js +17 -17
  5. package/client/pages/billing/claim-chit/create-claim-chit.js +39 -30
  6. package/client/pages/billing/transport-summary-report.js +21 -23
  7. package/client/pages/bulk-operation/bulk-operation.js +189 -64
  8. package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
  9. package/client/pages/bulk-operation/validate-ro-popup.js +44 -54
  10. package/client/pages/components/popup-unloading.js +47 -34
  11. package/client/pages/components/select-product-popup.js +74 -27
  12. package/client/pages/components/worksheet-information-popup.js +100 -0
  13. package/client/pages/inbound/expiry-date-popup.js +2 -2
  14. package/client/pages/inbound/inbound-reusable-pallet.js +21 -19
  15. package/client/pages/inbound/palletizing-pallets-popup.js +10 -9
  16. package/client/pages/inbound/putaway-product.js +196 -235
  17. package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
  18. package/client/pages/inbound/undo-unload-popup.js +295 -0
  19. package/client/pages/inbound/unload-product.js +236 -646
  20. package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
  21. package/client/pages/inbound/vas-selector.js +9 -8
  22. package/client/pages/inbound/worksheet-unloading.js +15 -11
  23. package/client/pages/inventory/inventory-adjustment.js +9 -10
  24. package/client/pages/inventory-check/check-inventory-popup.js +20 -18
  25. package/client/pages/inventory-check/cycle-count-recheck-popup.js +25 -15
  26. package/client/pages/inventory-check/inspecting-product.js +2 -2
  27. package/client/pages/inventory-check/inventory-check-list.js +30 -19
  28. package/client/pages/inventory-check/search-popup.js +15 -14
  29. package/client/pages/inventory-check/worksheet-cycle-count.js +17 -15
  30. package/client/pages/master/location-list.js +61 -52
  31. package/client/pages/master/pallet-list.js +34 -30
  32. package/client/pages/master/print-location-label.js +142 -156
  33. package/client/pages/master/product/product-list.js +1 -1
  34. package/client/pages/master/warehouse-list.js +33 -29
  35. package/client/pages/master/worker-list.js +30 -30
  36. package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
  37. package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
  38. package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
  39. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
  40. package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
  41. package/client/pages/order/goods-received-note/customer-grn-list.js +9 -8
  42. package/client/pages/order/goods-received-note/customer-received-note.js +8 -7
  43. package/client/pages/order/goods-received-note/received-note-detail.js +7 -6
  44. package/client/pages/order/goods-received-note/received-note-list.js +9 -8
  45. package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
  46. package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
  47. package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
  48. package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
  49. package/client/pages/order/release-order/batch-picking-popup.js +19 -2
  50. package/client/pages/order/release-order/create-release-order.js +194 -89
  51. package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
  52. package/client/pages/order/release-order/release-order-detail.js +392 -109
  53. package/client/pages/order/return-order/check-return-order.js +15 -13
  54. package/client/pages/order/return-order/create-return-order.js +3 -3
  55. package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
  56. package/client/pages/order/return-order/rejected-return-order.js +8 -14
  57. package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
  58. package/client/pages/order/return-order/return-order-detail.js +35 -31
  59. package/client/pages/order/return-order/return-order-list.js +9 -8
  60. package/client/pages/order/return-order/return-order-requests.js +20 -18
  61. package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
  62. package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
  63. package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
  64. package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
  65. package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
  66. package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
  67. package/client/pages/order/transport-order/create-delivery-order.js +1 -1
  68. package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
  69. package/client/pages/order/transport-order/delivery-order-list.js +1 -1
  70. package/client/pages/order/transport-order/print-delivery-note.js +17 -16
  71. package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
  72. package/client/pages/order/transport-order/view-delivery-note.js +19 -22
  73. package/client/pages/order/vas-order/create-vas-order.js +12 -11
  74. package/client/pages/order/vas-order/receive-vas-order.js +25 -22
  75. package/client/pages/order/vas-order/vas-order-detail.js +26 -23
  76. package/client/pages/order/vas-order/vas-order-list.js +9 -8
  77. package/client/pages/order/vas-order/vas-order-requests.js +11 -12
  78. package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
  79. package/client/pages/outbound/packing-product.js +115 -234
  80. package/client/pages/outbound/picking-product.js +288 -380
  81. package/client/pages/outbound/single-outbound-worksheet.js +9 -8
  82. package/client/pages/outbound/sorting-product.js +66 -63
  83. package/client/pages/outbound/worksheet-loading.js +23 -17
  84. package/client/pages/outbound/worksheet-packing.js +18 -16
  85. package/client/pages/outbound/worksheet-picking.js +22 -18
  86. package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +8 -9
  87. package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +26 -25
  88. package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +10 -9
  89. package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +13 -8
  90. package/client/pages/report/custom-elccl/elccl-inventory-report.js +11 -10
  91. package/client/pages/report/inventory-pallet-report.js +13 -12
  92. package/client/pages/report/job-sheet-list.js +9 -8
  93. package/client/pages/report/job-sheet-popup.js +9 -9
  94. package/client/pages/report/job-sheet-report.js +6 -6
  95. package/client/pages/system/location-sorting-rule.js +53 -46
  96. package/client/pages/vas/abstract-execute-vas.js +47 -34
  97. package/client/pages/vas/execute-pure-vas.js +66 -62
  98. package/client/pages/vas/execute-ref-vas.js +39 -41
  99. package/client/pages/vas/print-product-label.js +17 -9
  100. package/client/pages/vas/related-vas-list.js +7 -6
  101. package/client/pages/vas/target-inventory-assignment-popup.js +16 -14
  102. package/client/pages/vas/vas-pallet-label-popup.js +1 -1
  103. package/client/pages/vas/vas-worksheet-list.js +9 -8
  104. package/client/pages/vas/worksheet-ref-vas.js +7 -6
  105. package/client/pages/vas/worksheet-vas.js +16 -14
  106. package/client/route.js +16 -32
  107. package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
  108. package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
  109. package/package.json +65 -65
  110. package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
  111. package/things-factory.config.js +0 -16
  112. package/translations/en.json +34 -2
  113. package/translations/ko.json +34 -3
  114. package/translations/ms.json +34 -3
  115. package/translations/zh.json +34 -3
  116. package/client/pages/inbound/location-selector.js +0 -224
  117. package/client/pages/master/picking-bin-list.js +0 -354
  118. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
  119. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
  120. package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
@@ -4,7 +4,7 @@ import '@things-factory/notification'
4
4
  import gql from 'graphql-tag'
5
5
  import { html } from 'lit-element'
6
6
 
7
- import { registerDefaultGroups } from '@operato/board/dist/src/component/register-default-groups'
7
+ import { registerDefaultGroups } from '@operato/board/register-default-groups.js'
8
8
  import { APPEND_APP_TOOL } from '@things-factory/apptool-base'
9
9
  import { auth } from '@things-factory/auth-base'
10
10
  import { setAuthManagementMenus } from '@things-factory/auth-ui'
@@ -280,7 +280,13 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
280
280
  <label class="content">${this?._selectedInventory?.packingType || '-'}</label>
281
281
 
282
282
  <label class="content-title">${i18next.t('label.qty')}</label>
283
- <label class="content">${this?._selectedInventory?.qty || '-'}</label>
283
+ <label class="content">${(this?._selectedInventory?.qty || 0).toString()}</label>
284
+
285
+ <label class="content-title">${i18next.t('label.reserve_qty')}</label>
286
+ <label class="content">${(this?._selectedInventory?.lockedQty || 0).toString()}</label>
287
+
288
+ <label class="content-title">${i18next.t('label.available_qty')}</label>
289
+ <label class="content">${(this?._selectedInventory?.availableQty || 0).toString()}</label>
284
290
 
285
291
  <!-- <input name="fromLocationName" readonly /> -->
286
292
  </fieldset>
@@ -299,11 +305,11 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
299
305
  this.qtyInput.value = 0
300
306
  }
301
307
  if (this._selectedInventory) {
302
- if (this._selectedInventory.qty > parseInt(this.qtyInput.value)) {
308
+ if (this._selectedInventory.availableQty > parseInt(this.qtyInput.value)) {
303
309
  this._requireNewId = true
304
310
  } else {
305
- if (parseInt(this.qtyInput.value) > this._selectedInventory.qty) {
306
- this.qtyInput.value = this._selectedInventory.qty
311
+ if (parseInt(this.qtyInput.value) > this._selectedInventory.availableQty) {
312
+ this.qtyInput.value = this._selectedInventory.availableQty
307
313
  }
308
314
  this._requireNewId = false
309
315
  }
@@ -396,6 +402,8 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
396
402
  'packingType',
397
403
  'packingSize',
398
404
  'qty',
405
+ 'lockedQty',
406
+ 'availableQty',
399
407
  'expirationDate'
400
408
  ]
401
409
  },
@@ -480,6 +488,20 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
480
488
  header: i18next.t('field.qty'),
481
489
  width: 60
482
490
  },
491
+ {
492
+ type: 'integer',
493
+ name: 'lockedQty',
494
+ label: true,
495
+ header: i18next.t('field.reserve_qty'),
496
+ width: 60
497
+ },
498
+ {
499
+ type: 'integer',
500
+ name: 'availableQty',
501
+ label: true,
502
+ header: i18next.t('field.available_qty'),
503
+ width: 60
504
+ },
483
505
  {
484
506
  type: 'date',
485
507
  name: 'expirationDate',
@@ -568,7 +590,7 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
568
590
  return {
569
591
  ...record,
570
592
  sku: record.product.sku,
571
- qty: record.qty - record.lockedQty > 0 ? record.qty - record.lockedQty : 0
593
+ availableQty: record.qty - (record.lockedQty > 0 ? record.lockedQty : 0)
572
594
  }
573
595
  })
574
596
  }
@@ -654,7 +676,11 @@ class TransferInventory extends connect(store)(localize(i18next)(PageView)) {
654
676
  throw new Error(i18next.t('text.please_select_an_inventory'))
655
677
  }
656
678
 
657
- if (!this.qtyInput.value > 0) {
679
+ if (!(this._selectedInventory.availableQty > 0)) {
680
+ throw new Error(i18next.t('text.not_enough_available_qty'))
681
+ }
682
+
683
+ if (!parseInt(this.qtyInput?.value || 0) > 0) {
658
684
  throw new Error(i18next.t('text.please_enter_transfer_qty'))
659
685
  }
660
686
 
@@ -4,7 +4,7 @@ import '@things-factory/grist-ui'
4
4
  import { i18next, localize } from '@things-factory/i18n-base'
5
5
  import { getCodeByName } from '@things-factory/code-base'
6
6
  import { client, PageView, store, UPDATE_CONTEXT } from '@things-factory/shell'
7
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
7
+ import { isMobileDevice } from '@things-factory/utils'
8
8
  import { CommonButtonStyles } from '@things-factory/styles'
9
9
  import gql from 'graphql-tag'
10
10
  import { css, html } from 'lit-element'
@@ -386,24 +386,22 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
386
386
 
387
387
  const response = await client.query({
388
388
  query: gql`
389
- query {
390
- claim(${gqlBuilder.buildArgs({
391
- id: this._claimId
392
- })}) {
389
+ query claim($id: String!) {
390
+ claim(id: $id) {
393
391
  id
394
392
  name
395
393
  description
396
394
  billingMode
397
- transportDriver{
395
+ transportDriver {
398
396
  id
399
397
  name
400
398
  driverCode
401
399
  }
402
- transportVehicle{
400
+ transportVehicle {
403
401
  id
404
402
  name
405
403
  }
406
- bizplace{
404
+ bizplace {
407
405
  id
408
406
  name
409
407
  }
@@ -420,7 +418,7 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
420
418
  claimOrders {
421
419
  id
422
420
  name
423
- }
421
+ }
424
422
  claimDetails {
425
423
  id
426
424
  name
@@ -430,7 +428,8 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
430
428
  }
431
429
  }
432
430
  }
433
- `
431
+ `,
432
+ variables: { id: this._claimId }
434
433
  })
435
434
 
436
435
  if (!response.errors) {
@@ -528,17 +527,15 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
528
527
  try {
529
528
  var result = await client.query({
530
529
  query: gql`
531
- query {
532
- claimOrderList (${gqlBuilder.buildArgs({
533
- transportDriver: this._selectedDriver,
534
- transportVehicle: this._selectedTruck
535
- })}){
536
- id
537
- name
538
- description
530
+ query claimOrderList($transportDriver: String, $transportVehicle: String) {
531
+ claimOrderList(tranportDriver: $transportDriver, transportVehicle: $transportVehicle) {
532
+ id
533
+ name
534
+ description
535
+ }
539
536
  }
540
- }
541
- `
537
+ `,
538
+ variables: { transportDriver: this._selectedDriver, transportVehicle: this._selectedTruck }
542
539
  })
543
540
  if (!result.errors) {
544
541
  this._claimOrderGristConfig = {
@@ -584,15 +581,17 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
584
581
  async fetchBizplaceList() {
585
582
  return await client.query({
586
583
  query: gql`
587
- query {
588
- bizplaces (${gqlBuilder.buildArgs({ filters: [], pagination: { page: 1, limit: 9999 } })}){
589
- items{
584
+ query bizplaces($filters: [Filter!], $pagination: Pagination) {
585
+ bizplaces(filters: $filters, pagination: $pagination) {
586
+ items {
590
587
  id
591
588
  name
592
589
  description
593
590
  }
594
591
  }
595
- }`
592
+ }
593
+ `,
594
+ variables: { filters: [], pagination: { page: 1, limit: 9999 } }
596
595
  })
597
596
  }
598
597
 
@@ -639,18 +638,16 @@ class ClaimChitDetail extends connect(store)(localize(i18next)(PageView)) {
639
638
  async _updateClaim() {
640
639
  try {
641
640
  var result = this._getClaimData()
642
- const response = await client.query({
643
- query: gql`
644
- mutation {
645
- updateClaim(${gqlBuilder.buildArgs({
646
- id: this._claimId,
647
- patch: result
648
- })}) {
649
- id
650
- name
651
- }
641
+ const response = await client.mutate({
642
+ mutation: gql`
643
+ mutation updateClaim($id: String!, $patch: ClaimPatch!) {
644
+ updateClaim(id: $id, patch: $patch) {
645
+ id
646
+ name
652
647
  }
653
- `
648
+ }
649
+ `,
650
+ variables: { id: this._claimId, patch: result }
654
651
  })
655
652
  if (!response.errors) {
656
653
  this._showToast({ message: i18next.t('claim_updated') })
@@ -3,7 +3,7 @@ import '@things-factory/grist-ui'
3
3
 
4
4
  import { PageView, client, navigate, store } from '@things-factory/shell'
5
5
  import { css, html } from 'lit-element'
6
- import { flattenObject, gqlBuilder, isMobileDevice } from '@things-factory/utils'
6
+ import { flattenObject, isMobileDevice } from '@things-factory/utils'
7
7
  import { i18next, localize } from '@things-factory/i18n-base'
8
8
 
9
9
  import { ScrollbarStyles } from '@things-factory/styles'
@@ -234,14 +234,16 @@ class ClaimChitList extends connect(store)(localize(i18next)(PageView)) {
234
234
  async fetchDriverList() {
235
235
  let result = await client.query({
236
236
  query: gql`
237
- query {
238
- transportDrivers (${gqlBuilder.buildArgs({ filters: [], pagination: { page: 1, limit: 9999 } })}){
239
- items{
237
+ query transportDrivers($filters: [Filter!], $pagination: Pagination) {
238
+ transportDrivers(filters: $filters, pagination: $pagination) {
239
+ items {
240
240
  id
241
241
  name
242
242
  }
243
243
  }
244
- }`
244
+ }
245
+ `,
246
+ variables: { filters: [], pagination: { page: 1, limit: 9999 } }
245
247
  })
246
248
  return result.data.transportDrivers.items
247
249
  }
@@ -249,29 +251,26 @@ class ClaimChitList extends connect(store)(localize(i18next)(PageView)) {
249
251
  async fetchVehicleList() {
250
252
  let result = await client.query({
251
253
  query: gql`
252
- query {
253
- transportVehicles (${gqlBuilder.buildArgs({ filters: [], pagination: { page: 1, limit: 9999 } })}){
254
- items{
254
+ query transportVehicles($filters: [Filter!], $pagination: Pagination) {
255
+ transportVehicles(filters: $filters, pagination: $pagination) {
256
+ items {
255
257
  id
256
258
  name
257
259
  }
258
260
  }
259
- }`
261
+ }
262
+ `,
263
+ variables: { filters: [], pagination: { page: 1, limit: 9999 } }
260
264
  })
261
265
  return result.data.transportVehicles.items
262
266
  }
263
267
 
264
268
  async fetchHandler({ page, limit, sorters = [{ name: 'createdAt', desc: true }] }) {
265
269
  try {
266
- let args = gqlBuilder.buildArgs({
267
- filters: [...this.searchForm.queryFilters],
268
- pagination: { page, limit },
269
- sortings: sorters
270
- })
271
270
  const response = await client.query({
272
271
  query: gql`
273
- query {
274
- claims(${args}) {
272
+ query claims($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
273
+ claims(filters: $filters, pagination: $pagination, sortings: $sortings)
275
274
  items {
276
275
  id
277
276
  name
@@ -307,7 +306,8 @@ class ClaimChitList extends connect(store)(localize(i18next)(PageView)) {
307
306
  total
308
307
  }
309
308
  }
310
- `
309
+ `,
310
+ variables: { filters: [...this.searchForm.queryFilters], pagination: { page, limit }, sortings: sorters }
311
311
  })
312
312
 
313
313
  if (!response.errors) {
@@ -4,7 +4,7 @@ import { MultiColumnFormStyles } from '@things-factory/form-ui'
4
4
  import '@things-factory/grist-ui'
5
5
  import { i18next, localize } from '@things-factory/i18n-base'
6
6
  import { client, PageView, store } from '@things-factory/shell'
7
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
7
+ import { isMobileDevice } from '@things-factory/utils'
8
8
  import { CommonButtonStyles } from '@things-factory/styles'
9
9
  import gql from 'graphql-tag'
10
10
  import { css, html } from 'lit-element'
@@ -434,39 +434,43 @@ class CreateClaimChit extends connect(store)(localize(i18next)(PageView)) {
434
434
  async fetchDriverList() {
435
435
  return await client.query({
436
436
  query: gql`
437
- query {
438
- transportDrivers (${gqlBuilder.buildArgs({ filters: [], pagination: { page: 1, limit: 9999 } })}){
439
- items{
437
+ query transportDrivers($filters: [Filter!], $pagination: Pagination) {
438
+ tranportDrivers(filters: $filters, pagination: $pagination) {
439
+ items {
440
440
  id
441
441
  name
442
442
  description
443
443
  driverCode
444
- bizplace{
444
+ bizplace {
445
445
  id
446
446
  name
447
447
  }
448
448
  }
449
449
  }
450
- }`
450
+ }
451
+ `,
452
+ variables: { filters: [], pagination: { page: 1, limit: 9999 } }
451
453
  })
452
454
  }
453
455
 
454
456
  async fetchVehicleList() {
455
457
  return await client.query({
456
458
  query: gql`
457
- query {
458
- transportVehicles (${gqlBuilder.buildArgs({ filters: [], pagination: { page: 1, limit: 9999 } })}){
459
- items{
459
+ query transportVehicles($filters: [Filter!], $pagination: Pagination) {
460
+ transportVehicles(filters: $filters, pagination: $pagination) {
461
+ items {
460
462
  id
461
463
  name
462
464
  description
463
- bizplace{
465
+ bizplace {
464
466
  id
465
467
  name
466
468
  }
467
469
  }
468
470
  }
469
- }`
471
+ }
472
+ `,
473
+ variables: { filters: [], pagination: { page: 1, limit: 9999 } }
470
474
  })
471
475
  }
472
476
 
@@ -474,14 +478,17 @@ class CreateClaimChit extends connect(store)(localize(i18next)(PageView)) {
474
478
  return await client.query({
475
479
  query: gql`
476
480
  query {
477
- bizplaces (${gqlBuilder.buildArgs({ filters: [], pagination: { page: 1, limit: 9999 } })}){
478
- items{
479
- id
480
- name
481
- description
481
+ bizplaces ($filters: [Filter!], $pagination: Pagination){
482
+ bizplaces (filters: $filters, pagination: $pagination){
483
+ items{
484
+ id
485
+ name
486
+ description
487
+ }
482
488
  }
483
489
  }
484
- }`
490
+ }`,
491
+ variables: { filters: [], pagination: { page: 1, limit: 9999 } }
485
492
  })
486
493
  }
487
494
 
@@ -493,16 +500,15 @@ class CreateClaimChit extends connect(store)(localize(i18next)(PageView)) {
493
500
  var result = await client.query({
494
501
  query: gql`
495
502
  query {
496
- claimOrderList (${gqlBuilder.buildArgs({
497
- transportDriver: this._selectedDriver,
498
- transportVehicle: this._selectedTruck
499
- })}){
503
+ claimOrderList ($transportDriver: String, $transportVehicle: String){
504
+ claimOrderList (transportDriver: $transportDriver, transportVehicle: $transportVehicle)
500
505
  id
501
506
  name
502
507
  description
503
508
  }
504
509
  }
505
- `
510
+ `,
511
+ variables: { transportDriver: this._selectedDriver, transportVehicle: this._selectedTruck }
506
512
  })
507
513
  if (!result.errors) {
508
514
  this._claimOrderGristConfig = {
@@ -538,17 +544,20 @@ class CreateClaimChit extends connect(store)(localize(i18next)(PageView)) {
538
544
  try {
539
545
  var result = this._getClaimData()
540
546
  this._validateData(result)
541
- const response = await client.query({
542
- query: gql`
547
+ const response = await client.mutate({
548
+ mutation: gql`
543
549
  mutation {
544
- createClaim(${gqlBuilder.buildArgs({
545
- claim: result
546
- })}) {
547
- id
548
- name
550
+ createClaim($claim: NewClaim!) {
551
+ createClaim(claim: $claim){
552
+ id
553
+ name
554
+ }
549
555
  }
550
556
  }
551
- `
557
+ `,
558
+ variables: {
559
+ claim: result
560
+ }
552
561
  })
553
562
  if (!response.errors) {
554
563
  this._resetAll()
@@ -3,7 +3,7 @@ import { MultiColumnFormStyles } from '@things-factory/form-ui'
3
3
  import '@things-factory/grist-ui'
4
4
  import { i18next, localize } from '@things-factory/i18n-base'
5
5
  import { client, PageView, store } from '@things-factory/shell'
6
- import { flattenObject, gqlBuilder, isMobileDevice } from '@things-factory/utils'
6
+ import { flattenObject, isMobileDevice } from '@things-factory/utils'
7
7
  import gql from 'graphql-tag'
8
8
  import { css, html } from 'lit-element'
9
9
  import { connect } from 'pwa-helpers/connect-mixin.js'
@@ -272,47 +272,46 @@ class TransportSummaryReport extends connect(store)(localize(i18next)(PageView))
272
272
 
273
273
  var result = await client.query({
274
274
  query: gql`
275
- query {
276
- claimDetails (${gqlBuilder.buildArgs({
277
- filters
278
- })}){
279
- deliveryOrder{
275
+ query claimDetails($filters: [Filter!]) {
276
+ claimDetails(filters: $filters) {
277
+ deliveryOrder {
280
278
  deliveryDateTime
281
279
  from
282
280
  to
283
281
  loadType
284
- transportDriver{
282
+ transportDriver {
285
283
  id
286
284
  name
287
285
  }
288
- transportVehicle{
286
+ transportVehicle {
289
287
  id
290
288
  name
291
289
  }
292
- bizplace{
290
+ bizplace {
293
291
  name
294
292
  }
295
- }
296
- collectionOrder{
293
+ }
294
+ collectionOrder {
297
295
  collectionDateTime
298
296
  from
299
297
  to
300
298
  loadType
301
- transportDriver{
299
+ transportDriver {
302
300
  id
303
301
  name
304
302
  }
305
- transportVehicle{
303
+ transportVehicle {
306
304
  id
307
305
  name
308
306
  }
309
- bizplace{
307
+ bizplace {
310
308
  name
311
309
  }
312
- }
310
+ }
313
311
  }
314
312
  }
315
- `
313
+ `,
314
+ variables: { filters }
316
315
  })
317
316
  this._fillOrderDetails(result.data.claimOrderDetail)
318
317
  }
@@ -321,17 +320,16 @@ class TransportSummaryReport extends connect(store)(localize(i18next)(PageView))
321
320
  try {
322
321
  var result = this._getClaimData()
323
322
  this._validateData(result)
324
- const response = await client.query({
325
- query: gql`
326
- mutation {
327
- createClaim(${gqlBuilder.buildArgs({
328
- claim: result
329
- })}) {
323
+ const response = await client.mutate({
324
+ mutation: gql`
325
+ mutation createClaim($claim: NewClaim!) {
326
+ createClaim(claim: $claim) {
330
327
  id
331
328
  name
332
329
  }
333
330
  }
334
- `
331
+ `,
332
+ variables: { claim: result }
335
333
  })
336
334
  if (!response.errors) {
337
335
  this._resetAll()