@things-factory/operato-wms 4.0.22 → 4.0.26

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 (101) hide show
  1. package/client/bootstrap.js +13 -6
  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 +60 -52
  31. package/client/pages/master/pallet-list.js +34 -30
  32. package/client/pages/master/print-location-label.js +37 -36
  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-list.js +9 -8
  44. package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
  45. package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
  46. package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
  47. package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
  48. package/client/pages/order/release-order/batch-picking-popup.js +19 -2
  49. package/client/pages/order/release-order/create-release-order.js +194 -89
  50. package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
  51. package/client/pages/order/release-order/release-order-detail.js +390 -107
  52. package/client/pages/order/return-order/check-return-order.js +15 -13
  53. package/client/pages/order/return-order/create-return-order.js +3 -3
  54. package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
  55. package/client/pages/order/return-order/rejected-return-order.js +8 -14
  56. package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
  57. package/client/pages/order/return-order/return-order-detail.js +35 -31
  58. package/client/pages/order/return-order/return-order-list.js +9 -8
  59. package/client/pages/order/return-order/return-order-requests.js +20 -18
  60. package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
  61. package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
  62. package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
  63. package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
  64. package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
  65. package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
  66. package/client/pages/order/transport-order/create-delivery-order.js +1 -1
  67. package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
  68. package/client/pages/order/transport-order/delivery-order-list.js +1 -1
  69. package/client/pages/order/transport-order/print-delivery-note.js +17 -16
  70. package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
  71. package/client/pages/order/transport-order/view-delivery-note.js +19 -22
  72. package/client/pages/order/vas-order/create-vas-order.js +12 -11
  73. package/client/pages/order/vas-order/receive-vas-order.js +25 -22
  74. package/client/pages/order/vas-order/vas-order-detail.js +26 -23
  75. package/client/pages/order/vas-order/vas-order-list.js +9 -8
  76. package/client/pages/order/vas-order/vas-order-requests.js +11 -12
  77. package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
  78. package/client/pages/outbound/packing-product.js +111 -236
  79. package/client/pages/outbound/picking-product.js +287 -380
  80. package/client/pages/outbound/single-outbound-worksheet.js +9 -8
  81. package/client/pages/outbound/sorting-product.js +66 -63
  82. package/client/pages/outbound/worksheet-loading.js +7 -3
  83. package/client/pages/outbound/worksheet-packing.js +3 -3
  84. package/client/pages/outbound/worksheet-picking.js +22 -18
  85. package/client/pages/report/job-sheet-list.js +9 -8
  86. package/client/pages/vas/print-product-label.js +17 -9
  87. package/client/route.js +16 -32
  88. package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
  89. package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
  90. package/package.json +65 -65
  91. package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
  92. package/things-factory.config.js +0 -16
  93. package/translations/en.json +34 -2
  94. package/translations/ko.json +34 -3
  95. package/translations/ms.json +34 -3
  96. package/translations/zh.json +34 -3
  97. package/client/pages/inbound/location-selector.js +0 -224
  98. package/client/pages/master/picking-bin-list.js +0 -354
  99. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
  100. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
  101. package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
@@ -2,7 +2,7 @@ import '@things-factory/barcode-ui'
2
2
  import { i18next, localize } from '@things-factory/i18n-base'
3
3
  import { css, html, LitElement } from 'lit-element'
4
4
  import '@things-factory/grist-ui'
5
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
5
+ import { isMobileDevice } from '@things-factory/utils'
6
6
  import { client, CustomAlert, store, UPDATE_CONTEXT } from '@things-factory/shell'
7
7
  import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
8
8
  import gql from 'graphql-tag'
@@ -12,6 +12,8 @@ class PopupUnloading extends localize(i18next)(LitElement) {
12
12
  return {
13
13
  title: String,
14
14
  ganNo: String,
15
+ orderType: String,
16
+ orderNo: String,
15
17
  reusablePallet: String,
16
18
  _productName: String,
17
19
  _productSku: String,
@@ -118,6 +120,10 @@ class PopupUnloading extends localize(i18next)(LitElement) {
118
120
  return this.shadowRoot.querySelector('#unloading-grist')
119
121
  }
120
122
 
123
+ get unloadedGrist() {
124
+ return this.shadowRoot.querySelector('#unloaded-grist')
125
+ }
126
+
121
127
  get reusablePalletInput() {
122
128
  return this.shadowRoot.querySelector('input[name=reusablePalletID]')
123
129
  }
@@ -359,10 +365,8 @@ class PopupUnloading extends localize(i18next)(LitElement) {
359
365
  async _fetchProducts(arrivalNoticeNo) {
360
366
  const response = await client.query({
361
367
  query: gql`
362
- query {
363
- unloadingWorksheet(${gqlBuilder.buildArgs({
364
- arrivalNoticeNo
365
- })}) {
368
+ query unloadingWorksheet($arrivalNoticeNo: String!) {
369
+ unloadingWorksheet(arrivalNoticeNo: $arrivalNoticeNo) {
366
370
  worksheetInfo {
367
371
  bizplaceName
368
372
  containerNo
@@ -391,7 +395,8 @@ class PopupUnloading extends localize(i18next)(LitElement) {
391
395
  }
392
396
  }
393
397
  }
394
- `
398
+ `,
399
+ variables: { arrivalNoticeNo }
395
400
  })
396
401
 
397
402
  if (!response.errors) {
@@ -413,11 +418,12 @@ class PopupUnloading extends localize(i18next)(LitElement) {
413
418
 
414
419
  const response = await client.query({
415
420
  query: gql`
416
- query {
417
- unloadedInventoriesByReusablePallet(${gqlBuilder.buildArgs({
418
- reusablePalletId: this.reusablePallet,
419
- worksheetDetailName: this._selectedOrderProduct.name
420
- })}) {
421
+ query unloadedInventoriesByReusablePallet($reusablePalletId: String!, $worksheetDetailName: String!) {
422
+ unloadedInventoriesByReusablePallet(
423
+ reusablePalletId: $reusablePalletId
424
+ worksheetDetailName: $worksheetDetailName
425
+ ) {
426
+ id
421
427
  batchId
422
428
  palletId
423
429
  qty
@@ -432,7 +438,11 @@ class PopupUnloading extends localize(i18next)(LitElement) {
432
438
  }
433
439
  }
434
440
  }
435
- `
441
+ `,
442
+ variables: {
443
+ reusablePalletId: this.reusablePallet,
444
+ worksheetDetailName: this._selectedOrderProduct.name
445
+ }
436
446
  })
437
447
 
438
448
  if (!response.errors) {
@@ -461,20 +471,21 @@ class PopupUnloading extends localize(i18next)(LitElement) {
461
471
  if (e.keyCode === 13) {
462
472
  try {
463
473
  this._validateUnloading()
464
- const response = await client.query({
465
- query: gql`
466
- mutation {
467
- unload(${gqlBuilder.buildArgs({
468
- worksheetDetailName: this._selectedOrderProduct.name,
469
- inventory: {
470
- palletId: this.palletInput.value.trim(),
471
- qty: parseInt(this.actualQtyInput.value),
472
- reusablePallet: this.reusablePalletData,
473
- expirationDate: this.expDateInput.value
474
- }
475
- })})
474
+ const response = await client.mutate({
475
+ mutation: gql`
476
+ mutation unload($worksheetDetailName: String!, $inventory: InventoryPatch!) {
477
+ unload(worksheetDetailName: $worksheetDetailName, inventory: $inventory)
476
478
  }
477
- `
479
+ `,
480
+ variables: {
481
+ worksheetDetailName: this._selectedOrderProduct.name,
482
+ inventory: {
483
+ palletId: this.palletInput.value.trim(),
484
+ qty: parseInt(this.actualQtyInput.value),
485
+ reusablePallet: this.reusablePalletData,
486
+ expirationDate: this.expDateInput.value
487
+ }
488
+ }
478
489
  })
479
490
 
480
491
  if (!response.errors) {
@@ -546,15 +557,17 @@ class PopupUnloading extends localize(i18next)(LitElement) {
546
557
  return
547
558
  }
548
559
 
549
- const response = await client.query({
550
- query: gql`
551
- mutation {
552
- undoUnloading(${gqlBuilder.buildArgs({
553
- worksheetDetailName: this._selectedOrderProduct.name,
554
- palletId: this._selectedInventory.palletId
555
- })})
556
- }
557
- `
560
+ const response = await client.mutate({
561
+ mutation: gql`
562
+ mutation undoUnloading($orderType: String!, $worksheetDetailName: String!, $selectedId: [String]!) {
563
+ undoUnloading(orderType: $orderType, orderNo: $worksheetDetailName, inventoryIds: $selectedId)
564
+ }
565
+ `,
566
+ variables: {
567
+ orderType: this.orderType,
568
+ worksheetDetailName: this.orderNo,
569
+ selectedId: this._selectedInventory.id
570
+ }
558
571
  })
559
572
 
560
573
  if (!response.errors) {
@@ -17,7 +17,8 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
17
17
  bizplaceId: String,
18
18
  searchFields: Array,
19
19
  _productName: String,
20
- productDetailData: Array
20
+ productDetailData: Array,
21
+ selectMultipleProducts: Boolean
21
22
  }
22
23
  }
23
24
 
@@ -118,10 +119,17 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
118
119
 
119
120
  this.productConfig = {
120
121
  pagination: { pages: [10, 20, 50, 100] },
121
- rows: { appendable: false, selectable: { multiple: false } },
122
+ rows: {
123
+ appendable: false,
124
+ selectable: { multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false }
125
+ },
122
126
  columns: [
123
127
  { type: 'gutter', gutterName: 'sequence' },
124
- { type: 'gutter', gutterName: 'row-selector', multiple: false },
128
+ {
129
+ type: 'gutter',
130
+ gutterName: 'row-selector',
131
+ multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false
132
+ },
125
133
  {
126
134
  type: 'string',
127
135
  name: 'productId',
@@ -233,35 +241,74 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
233
241
  }
234
242
 
235
243
  selectProduct() {
236
- const selectedProduct = this.productGrist.selected[0]
237
- if (selectedProduct) {
238
- this.dispatchEvent(
239
- new CustomEvent('selected', {
240
- detail: {
241
- productDetailId: selectedProduct.id,
242
- packingType: selectedProduct.packingType,
243
- uom: selectedProduct.uom,
244
- uomValue: selectedProduct.uomValue,
245
- productName: `${selectedProduct.name}(${selectedProduct.description}(${selectedProduct.sku}))`,
244
+ if (this.selectMultipleProducts !== true) {
245
+ const selectedProduct = this.productGrist.selected[0]
246
+ if (selectedProduct) {
247
+ this.dispatchEvent(
248
+ new CustomEvent('selected', {
249
+ detail: {
250
+ productDetailId: selectedProduct.id,
251
+ packingType: selectedProduct.packingType,
252
+ uom: selectedProduct.uom,
253
+ uomValue: selectedProduct.uomValue,
254
+ productName: `${selectedProduct.name}(${selectedProduct.description}(${selectedProduct.sku}))`,
255
+ isError: false,
256
+ productBrand: selectedProduct.brand,
257
+ product: {
258
+ id: selectedProduct.productId,
259
+ name: selectedProduct.name,
260
+ sku: selectedProduct.sku,
261
+ packingType: selectedProduct.packingType,
262
+ packingSize: selectedProduct.packingSize,
263
+ primaryUnit: selectedProduct.uom,
264
+ primaryValue: selectedProduct.uomValue
265
+ }
266
+ }
267
+ })
268
+ )
269
+ history.back()
270
+ } else {
271
+ document.dispatchEvent(
272
+ new CustomEvent('notify', { detail: { message: i18next.t('text.product_is_not_selected') } })
273
+ )
274
+ }
275
+ } else {
276
+ const selectedMultipleProducts = this.productGrist.selected
277
+ if (selectedMultipleProducts) {
278
+ const multipleProducts = selectedMultipleProducts.map(itm => {
279
+ return {
280
+ productDetailId: itm.id,
281
+ packingType: itm.packingType,
282
+ uom: itm.uom,
283
+ uomValue: itm.uomValue,
284
+ productName: `${itm.name}(${itm.description}(${itm.sku}))`,
246
285
  isError: false,
247
- productBrand: selectedProduct.brand,
286
+ productBrand: itm.brand,
248
287
  product: {
249
- id: selectedProduct.productId,
250
- name: selectedProduct.name,
251
- sku: selectedProduct.sku,
252
- packingType: selectedProduct.packingType,
253
- packingSize: selectedProduct.packingSize,
254
- primaryUnit: selectedProduct.uom,
255
- primaryValue: selectedProduct.uomValue
288
+ id: itm.productId,
289
+ name: itm.name,
290
+ sku: itm.sku,
291
+ packingType: itm.packingType,
292
+ packingSize: itm.packingSize,
293
+ primaryUnit: itm.uom,
294
+ primaryValue: itm.uomValue
256
295
  }
257
296
  }
258
297
  })
259
- )
260
- history.back()
261
- } else {
262
- document.dispatchEvent(
263
- new CustomEvent('notify', { detail: { message: i18next.t('text.product_is_not_selected') } })
264
- )
298
+
299
+ this.dispatchEvent(
300
+ new CustomEvent('selected', {
301
+ detail: {
302
+ multipleProducts
303
+ }
304
+ })
305
+ )
306
+ history.back()
307
+ } else {
308
+ document.dispatchEvent(
309
+ new CustomEvent('notify', { detail: { message: i18next.t('text.product_is_not_selected') } })
310
+ )
311
+ }
265
312
  }
266
313
  }
267
314
  }
@@ -0,0 +1,100 @@
1
+ import '@things-factory/grist-ui'
2
+
3
+ import { css, html, LitElement } from 'lit-element'
4
+ import { connect } from 'pwa-helpers/connect-mixin'
5
+
6
+ import { MultiColumnFormStyles } from '@things-factory/form-ui'
7
+ import { i18next, localize } from '@things-factory/i18n-base'
8
+ import { store } from '@things-factory/shell'
9
+
10
+ class WorksheetInformationPopup extends connect(store)(localize(i18next)(LitElement)) {
11
+ static get properties() {
12
+ return {
13
+ worksheetInformation: Object
14
+ }
15
+ }
16
+
17
+ static get styles() {
18
+ return [
19
+ MultiColumnFormStyles,
20
+ css`
21
+ :host {
22
+ padding: 10px;
23
+ display: flex;
24
+ flex-direction: column;
25
+ overflow-x: overlay;
26
+ background-color: var(--main-section-background-color);
27
+ }
28
+ `
29
+ ]
30
+ }
31
+
32
+ get infoForm() {
33
+ return this.shadowRoot.querySelector('form#info-form')
34
+ }
35
+
36
+ render() {
37
+ return html`
38
+ <form id="info-form" class="multi-column-form">
39
+ <fieldset>
40
+ <label>${i18next.t('label.company')}</label>
41
+ <input name="bizplaceName" readonly />
42
+
43
+ <label>${i18next.t('label.container_no')}</label>
44
+ <input name="containerNo" readonly />
45
+
46
+ <label>${i18next.t('label.ref_no')}</label>
47
+ <input name="refNo" readonly />
48
+
49
+ <label>${i18next.t('label.ref_no_2')}</label>
50
+ <input name="refNo2" readonly />
51
+
52
+ <label>${i18next.t('label.ref_no_3')}</label>
53
+ <input name="refNo3" readonly />
54
+
55
+ <label>${i18next.t('label.shipping_provider')}</label>
56
+ <input name="shippingProvider" readonly />
57
+
58
+ <label>${i18next.t('label.tracking_no')}</label>
59
+ <input name="trackingNo" readonly />
60
+
61
+ <label>${i18next.t('label.status')}</label>
62
+ <input name="marketplaceStatus" readonly />
63
+
64
+ <label>${i18next.t('label.staging_area')}</label>
65
+ <input name="bufferLocation" readonly />
66
+
67
+ <label>${i18next.t('label.started_at')}</label>
68
+ <input name="startedAt" type="datetime-local" readonly />
69
+ </fieldset>
70
+ </form>
71
+ `
72
+ }
73
+
74
+ firstUpdated() {
75
+ if (this.worksheetInformation) this._fillUpForm(this.infoForm, this.worksheetInformation)
76
+ }
77
+
78
+ _fillUpForm(form, data) {
79
+ for (let key in data) {
80
+ Array.from(form.querySelectorAll('input')).forEach(field => {
81
+ if (field.name === key && field.type === 'checkbox') {
82
+ field.checked = data[key]
83
+ } else if (field.name === key && field.type === 'datetime-local') {
84
+ const datetime = Number(data[key])
85
+ const timezoneOffset = new Date(datetime).getTimezoneOffset() * 60000
86
+ field.value = new Date(datetime - timezoneOffset).toISOString().slice(0, -1)
87
+ } else if (field.name === key) {
88
+ if (data[key] instanceof Object) {
89
+ const objectData = data[key]
90
+ field.value = `${objectData.name} ${objectData.description ? `(${objectData.description})` : ''}`
91
+ } else {
92
+ field.value = data[key]
93
+ }
94
+ }
95
+ })
96
+ }
97
+ }
98
+ }
99
+
100
+ window.customElements.define('worksheet-information-popup', WorksheetInformationPopup)
@@ -72,8 +72,8 @@ class ExpiryDatePopup extends connect(store)(localize(i18next)(LitElement)) {
72
72
  delete this.inventory.__seq__
73
73
  delete this.inventory.__origin__
74
74
 
75
- const response = await client.query({
76
- query: gql`
75
+ const response = await client.mutate({
76
+ mutation: gql`
77
77
  mutation updateInventory($patch: InventoryPatch!) {
78
78
  updateInventory(patch: $patch) {
79
79
  expirationDate
@@ -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 { gqlBuilder, isMobileDevice } from '@things-factory/utils'
6
+ import { isMobileDevice } from '@things-factory/utils'
7
7
  import { CommonButtonStyles } from '@things-factory/styles'
8
8
  import gql from 'graphql-tag'
9
9
  import { css, html } from 'lit-element'
@@ -184,26 +184,27 @@ class InboundReusablePallet extends connect(store)(localize(i18next)(PageView))
184
184
  try {
185
185
  const response = await client.query({
186
186
  query: gql`
187
- query {
188
- palletInboundValidate(${gqlBuilder.buildArgs({
189
- name: this.palletRefNoInput.value
190
- })}) {
191
- item{
187
+ query palletInboundValidate($name: String!) {
188
+ palletInboundValidate(name: $name) {
189
+ item {
192
190
  id
193
191
  name
194
- owner{
192
+ owner {
195
193
  id
196
194
  name
197
195
  }
198
- holder{
196
+ holder {
199
197
  id
200
198
  name
201
199
  }
202
- }
203
- error
200
+ }
201
+ error
204
202
  }
205
203
  }
206
- `
204
+ `,
205
+ variables: {
206
+ name: this.palletRefNoInput.value
207
+ }
207
208
  })
208
209
 
209
210
  if (!response.errors) {
@@ -224,20 +225,21 @@ class InboundReusablePallet extends connect(store)(localize(i18next)(PageView))
224
225
  let patches = this.dataGrist.__data.records
225
226
  if (patches && patches.length) {
226
227
  this.dataGrist.showSpinner()
227
- const response = await client.query({
228
- query: gql`
229
- mutation {
230
- palletReturn(${gqlBuilder.buildArgs({
231
- patches
232
- })}) {
228
+ const response = await client.mutate({
229
+ mutation: gql`
230
+ mutation palletReturn($patches: [PalletPatch!]!) {
231
+ palletReturn(patches: $patches) {
233
232
  id
234
233
  name
235
- holder{
234
+ holder {
236
235
  name
237
236
  }
238
237
  }
239
238
  }
240
- `
239
+ `,
240
+ variables: {
241
+ patches
242
+ }
241
243
  })
242
244
 
243
245
  if (!response.errors) {
@@ -3,7 +3,7 @@ import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/f
3
3
  import '@things-factory/grist-ui'
4
4
  import { i18next, localize } from '@things-factory/i18n-base'
5
5
  import { client } from '@things-factory/shell'
6
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
6
+ import { isMobileDevice } from '@things-factory/utils'
7
7
  import gql from 'graphql-tag'
8
8
  import { css, html, LitElement } from 'lit-element'
9
9
  import { VAS_TYPE, VAS_ETC_TYPE } from '../constants'
@@ -125,15 +125,16 @@ export class PalletizingPalletPopup extends localize(i18next)(LitElement) {
125
125
  }
126
126
 
127
127
  async _palletizingPallets() {
128
- const response = await client.query({
129
- query: gql`
130
- mutation {
131
- palletizingPallets(${gqlBuilder.buildArgs({
132
- refOrderNo: this.orderNo,
133
- patches: this._getOrderVass()
134
- })})
128
+ const response = await client.mutate({
129
+ mutation: gql`
130
+ mutation palletizingPallets($refOrderNo: String!, $patches: [OrderVasPatch]) {
131
+ palletizingPallets(refOrderNo: $refOrderNo, patches: $patches)
135
132
  }
136
- `
133
+ `,
134
+ variables: {
135
+ refOrderNo: this.orderNo,
136
+ patches: this._getOrderVass()
137
+ }
137
138
  })
138
139
 
139
140
  if (!response.errors) {