@things-factory/operato-wms 4.1.41 → 4.2.0

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 (62) hide show
  1. package/.eslintrc.json +11 -0
  2. package/client/pages/constants/index.js +1 -0
  3. package/client/pages/constants/inventory-item-change.js +10 -0
  4. package/client/pages/constants/order.js +5 -0
  5. package/client/pages/constants/picking-strategy.js +4 -0
  6. package/client/pages/constants/setting.js +1 -0
  7. package/client/pages/inbound/serial-number-list-popup.js +0 -1
  8. package/client/pages/inventory/inventory-adjustment-approval.js +34 -3
  9. package/client/pages/inventory/inventory-adjustment.js +144 -5
  10. package/client/pages/inventory/serial-number-list-popup.js +468 -0
  11. package/client/pages/master/pallet-list.js +24 -0
  12. package/client/pages/order/arrival-notice/edit-product-popup.js +13 -0
  13. package/client/pages/order/release-order/b2b/b2b-order-list.js +24 -1
  14. package/client/pages/order/release-order/batch-picking-popup.js +8 -0
  15. package/client/pages/outbound/inventory-assign-popup.js +3 -24
  16. package/client/pages/outbound/inventory-auto-assign-popup.js +25 -50
  17. package/client/pages/outbound/loading-product.js +3 -3
  18. package/client/pages/outbound/merged-outbound-worksheet.js +83 -16
  19. package/client/pages/outbound/packing-product.js +109 -9
  20. package/client/pages/outbound/picking-product.js +21 -8
  21. package/client/pages/outbound/picking-replacement-popup.js +5 -0
  22. package/client/pages/outbound/return-pallet-check-popup.js +7 -1
  23. package/client/pages/outbound/route-label-popup.js +464 -0
  24. package/client/pages/outbound/serial-number-popup.js +55 -26
  25. package/client/pages/outbound/single-outbound-worksheet.js +78 -11
  26. package/client/pages/outbound/sorting-product.js +125 -34
  27. package/client/pages/outbound/worksheet-batch-picking.js +3 -15
  28. package/client/pages/outbound/worksheet-picking.js +2 -6
  29. package/cypress/fixtures/globals.json +3 -0
  30. package/cypress/fixtures/master-data/location.json +31 -0
  31. package/cypress/fixtures/master-data/pallet.json +129 -0
  32. package/cypress/fixtures/master-data/palletImport.xlsx +0 -0
  33. package/cypress/fixtures/master-data/transport-driver.json +22 -0
  34. package/cypress/fixtures/master-data/transport-vehicle.json +24 -0
  35. package/cypress/fixtures/master-data/transportDriverDeletedImport.xlsx +0 -0
  36. package/cypress/fixtures/master-data/transportDriverImport.xlsx +0 -0
  37. package/cypress/fixtures/master-data/transportVehicleDeletedImport.xlsx +0 -0
  38. package/cypress/fixtures/master-data/transportVehicleImport.xlsx +0 -0
  39. package/cypress/fixtures/master-data/transportVehicleNameSizeImport.xlsx +0 -0
  40. package/cypress/fixtures/master-data/transportVehicleNameStatusImport.xlsx +0 -0
  41. package/cypress/fixtures/master-data/warehouse.json +20 -0
  42. package/cypress/fixtures/master-data/warehouseImport.xlsx +0 -0
  43. package/cypress/integration/master-data/location.spec.js +31 -0
  44. package/cypress/integration/master-data/pallet.spec.js +176 -0
  45. package/cypress/integration/master-data/transport-driver.spec.js +131 -0
  46. package/cypress/integration/master-data/transport-vehicle.spec.js +165 -0
  47. package/cypress/integration/master-data/warehouse.spec.js +135 -0
  48. package/cypress/plugins/index.js +22 -0
  49. package/cypress/support/commands.js +425 -0
  50. package/cypress/support/index.js +31 -0
  51. package/cypress.json +9 -0
  52. package/dist-server/graphql/resolvers/board-setting/board-settings.js +2 -1
  53. package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
  54. package/dist-server/opa-app-setting-constants.js +2 -1
  55. package/dist-server/opa-app-setting-constants.js.map +1 -1
  56. package/package.json +20 -10
  57. package/server/graphql/resolvers/board-setting/board-settings.ts +4 -2
  58. package/server/opa-app-setting-constants.ts +2 -1
  59. package/translations/en.json +13 -4
  60. package/translations/ko.json +12 -2
  61. package/translations/ms.json +11 -2
  62. package/translations/zh.json +11 -2
@@ -19,7 +19,7 @@ import { isMobileDevice } from '@things-factory/utils'
19
19
 
20
20
  import { fetchLocationSortingRule } from '../../fetch-location-sorting-rule'
21
21
  import { fetchSettingRule } from '../../fetch-setting-value'
22
- import { BATCH_PICKING, LOCATION_SORTING_RULE, PICKING } from '../constants'
22
+ import { BATCH_PICKING, LOCATION_SORTING_RULE, ORDER_SOURCES, PICKING } from '../constants'
23
23
 
24
24
  const PICKING_TYPES = { PICKING, BATCH_PICKING }
25
25
  class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
@@ -687,6 +687,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
687
687
  this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty
688
688
  ) {
689
689
  this.scannable = true
690
+ } else {
691
+ this.scannable = false
690
692
  }
691
693
 
692
694
  if (this._selectedOrderInventory) {
@@ -792,6 +794,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
792
794
  this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty
793
795
  ) {
794
796
  this.scannable = true
797
+ } else {
798
+ this.scannable = false
795
799
  }
796
800
 
797
801
  this._enableProductScanning = await fetchSettingRule('enable-product-scanning', worksheetInfo.partnerDomainId)
@@ -808,8 +812,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
808
812
 
809
813
  if (record.pickedQty == record.releaseQty) {
810
814
  if (this._isCartonLabel) {
811
- this.cartonInput.value = ''
812
- this.productBarcodeInput.value = ''
815
+ //need to relook into clearview logic
816
+ if (this.cartonInput) this.cartonInput.value = ''
817
+ if (this.productBarcodeInput) this.productBarcodeInput.value = ''
813
818
  }
814
819
  this.fillUpForm(this.inputForm, record)
815
820
  } else {
@@ -954,8 +959,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
954
959
 
955
960
  if (!response.errors) {
956
961
  if (this._isRequireSerialNumberScanningOutbound) this.serialInput.value = ''
957
- else if (this._enableProductScanning && !this._isRequireSerialNumberScanningOutbound)
958
- this.productBarcodeInput.value = ''
962
+ else if (this._enableProductScanning) this.productBarcodeInput.value = ''
959
963
  else this.releaseQtyInput.value = ''
960
964
 
961
965
  if (!this._isCartonLabel && !this._isRequireSerialNumberScanningOutbound) {
@@ -981,10 +985,17 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
981
985
  await this.fetchInventories(this.taskNo)
982
986
  }
983
987
  }
984
-
985
- this.focusOnInput()
988
+ } else {
989
+ this._selectedOrderInventory = null
990
+ if (this.refPickingType === PICKING_TYPES.PICKING.value) {
991
+ await this.fetchInventories(this.releaseGoodNo)
992
+ } else {
993
+ await this.fetchInventories(this.taskNo)
994
+ }
986
995
  }
987
996
 
997
+ this.focusOnInput()
998
+
988
999
  this.isReplacement = false
989
1000
  } catch (e) {
990
1001
  this._showToast(e)
@@ -1028,6 +1039,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1028
1039
  <serial-number-popup
1029
1040
  .orderInventory="${this?._selectedOrderInventory?.relatedOrderInv}"
1030
1041
  .orderType="${i18next.t('text.outbound')}"
1042
+ .orderSource="${ORDER_SOURCES.PICKING.value}"
1031
1043
  .orderId="${this.releaseGoodId}"
1032
1044
  .data="${this?._selectedOrderInventory}"
1033
1045
  @close-serial-number-popup="${async e => {
@@ -1158,6 +1170,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1158
1170
  } catch (e) {
1159
1171
  this._showToast(e)
1160
1172
  } finally {
1173
+ this._selectedOrderInventory = null
1161
1174
  this._isExecuting = false
1162
1175
  }
1163
1176
  }
@@ -1640,7 +1653,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1640
1653
 
1641
1654
  if (this._selectedOrderInventory) {
1642
1655
  const record = this.data.records.find(record => record.name === this._selectedOrderInventory.name)
1643
- if (record.pickedQty == record.releaseQty) {
1656
+ if (record?.pickedQty == record?.releaseQty) {
1644
1657
  if (this._isCartonLabel) {
1645
1658
  this.cartonInput.value = ''
1646
1659
  this._focusOnCartonNoInput()
@@ -297,6 +297,11 @@ class PickingReplacementPopup extends localize(i18next)(LitElement) {
297
297
  throw new Error(i18next.t('text.release_qty_is_empty'))
298
298
  }
299
299
 
300
+ if (parseInt(this.releaseQtyInput.value) < 0) {
301
+ this._focusOnInput(this.releaseQtyInput)
302
+ throw new Error(i18next.t('text.release_qty_invalid'))
303
+ }
304
+
300
305
  if (this.targetInventory.qty < parseInt(this.releaseQtyInput.value)) {
301
306
  this._focusOnInput(this.releaseQtyInput)
302
307
  throw new Error(i18next.t('text.release_qty_cannot_exceed_stored_qty'))
@@ -113,6 +113,12 @@ class ReturnPalletCheckPopup extends localize(i18next)(LitElement) {
113
113
  return this.shadowRoot.querySelector('barcode-scanable-input[name=palletId]').shadowRoot.querySelector('input')
114
114
  }
115
115
 
116
+ _focusOnReleaseQtyInput() {
117
+ if (this.palletIdInput) {
118
+ setTimeout(() => this.palletIdInput.focus(), 50)
119
+ }
120
+ }
121
+
116
122
  render() {
117
123
  return html`
118
124
  <div class="grist">
@@ -145,7 +151,7 @@ class ReturnPalletCheckPopup extends localize(i18next)(LitElement) {
145
151
 
146
152
  focusOnPalletInput() {
147
153
  this.palletIdInput.value = ''
148
- this.palletIdInput.focus()
154
+ this._focusOnReleaseQtyInput()
149
155
  }
150
156
 
151
157
  _checkPalletId() {
@@ -0,0 +1,464 @@
1
+ import '@things-factory/barcode-ui'
2
+ import '@things-factory/grist-ui'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html, LitElement } from 'lit-element'
6
+
7
+ import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
8
+ import { connect } from 'pwa-helpers/connect-mixin'
9
+ import { i18next, localize } from '@things-factory/i18n-base'
10
+ import { client, store } from '@things-factory/shell'
11
+ import { isMobileDevice } from '@things-factory/utils'
12
+
13
+ import { LOCATION_TYPE } from '../constants'
14
+
15
+ import { DirectPrinter } from '@things-factory/barcode-base'
16
+ import { ROUTE_LABEL_SETTING_KEY } from '../constants'
17
+ class RouteLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
18
+ static get styles() {
19
+ return [
20
+ MultiColumnFormStyles,
21
+ SingleColumnFormStyles,
22
+ css`
23
+ :host {
24
+ padding: 10px;
25
+ display: flex;
26
+ flex-direction: column;
27
+ overflow-x: overlay;
28
+ background-color: var(--main-section-background-color);
29
+ }
30
+ .grist {
31
+ background-color: var(--main-section-background-color);
32
+ display: flex;
33
+ flex-direction: column;
34
+ flex: 1;
35
+ overflow-y: auto;
36
+ }
37
+ data-grist {
38
+ overflow-y: hidden;
39
+ flex: 1;
40
+ }
41
+ .button-container {
42
+ padding: 10px 0 12px 0;
43
+ text-align: center;
44
+ }
45
+
46
+ @media (max-width: 460px) {
47
+ .single-column-form {
48
+ max-width: 100%;
49
+ }
50
+ .mobile-full-width {
51
+ grid-column: span 12 / auto;
52
+ }
53
+ }
54
+ `
55
+ ]
56
+ }
57
+
58
+ static get properties() {
59
+ return {
60
+ config: Object,
61
+ data: Object,
62
+ partnerId: String,
63
+ worksheetType: String,
64
+ _binNumberList: Array,
65
+ _selectedBinNumber: String,
66
+ _selectedPriority: String,
67
+ _searchFields: Array,
68
+ _routeLabel: Object,
69
+ orderInventories: Object
70
+ }
71
+ }
72
+
73
+ get dataGrist() {
74
+ return this.shadowRoot.querySelector('data-grist')
75
+ }
76
+
77
+ get searchForm() {
78
+ return this.shadowRoot.querySelector('search-form')
79
+ }
80
+
81
+ _focusOnSerialInput() {
82
+ if (this.serialInput) {
83
+ setTimeout(() => this.serialInput.focus(), 50)
84
+ }
85
+ }
86
+
87
+ constructor() {
88
+ super()
89
+ }
90
+
91
+ render() {
92
+ return html`
93
+ <form id="search-form" class="multi-column-form">
94
+ <fieldset>
95
+ <select
96
+ name="binNumber"
97
+ @change="${e => {
98
+ this._selectedBinNumber = this._binNumberList.filter(itm => itm.name == e.currentTarget.value)
99
+ if (this._selectedBinNumber) this.dataGrist.fetch()
100
+ }}"
101
+ >
102
+ <option value="">-- ${i18next.t('text.bin_number')} --</option>
103
+ ${(this._binNumberList || []).map(list => html` <option value=${list.name}>${list.name}</option> `)}
104
+ </select>
105
+ ${this.worksheetType == 'merged'
106
+ ? html`
107
+ <select
108
+ name="sortingRule"
109
+ @change="${e => {
110
+ this._selectedPriority = e.currentTarget.value
111
+ if (this._selectedPriority) this.dataGrist.fetch()
112
+ }}"
113
+ >
114
+ <option value="">-- ${i18next.t('text.priority')} --</option>
115
+ <option value="roSku">${'RO, Sku'}</option>
116
+ <option value="roBin">${'RO, Bin'}</option>
117
+ <option value="skuRo">${'Sku, Ro'}</option>
118
+ <option value="skuBin">${'Sku, Bin'}</option>
119
+ <option value="binRo">${'Bin, Ro'}</option>
120
+ <option value="binSku">${'Bin, Sku'}</option>
121
+ </select>
122
+ `
123
+ : ''}
124
+ </fieldset>
125
+ </form>
126
+
127
+ <div class="grist">
128
+ <data-grist
129
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
130
+ .config=${this.config}
131
+ .fetchHandler=${this.worksheetType == 'single'
132
+ ? this.fetchOrderInventoriesOfMultipleReleaseOrders.bind(this)
133
+ : this.fetchOrderInventoriesOfMergedReleaseOrders.bind(this)}
134
+ ></data-grist>
135
+ </div>
136
+
137
+ <div class="button-container">
138
+ <mwc-button danger raised @click="${this._printRouteLabel.bind(this)}">${i18next.t('button.print')}</mwc-button>
139
+
140
+ <mwc-button
141
+ danger
142
+ @click=${() => {
143
+ history.back()
144
+ }}
145
+ raised
146
+ label="${i18next.t('button.back')}"
147
+ ></mwc-button>
148
+ </div>
149
+ `
150
+ }
151
+
152
+ stateChanged(state) {
153
+ let routeLabelSetting = state.dashboard[ROUTE_LABEL_SETTING_KEY]
154
+ this._routeLabel = (routeLabelSetting && routeLabelSetting.board) || {}
155
+ }
156
+
157
+ async firstUpdated() {
158
+ await this.fetchLocations()
159
+ this.config = {
160
+ rows: {
161
+ appendable: false,
162
+ classifier: (record, rowIndex) => {
163
+ return {
164
+ emphasized: record.completed == true
165
+ }
166
+ }
167
+ },
168
+ pagination: { infinite: true },
169
+ list: {
170
+ fields: ['productSku', 'releaseQty', 'roName', 'binNumber']
171
+ },
172
+ columns: [
173
+ { type: 'gutter', gutterName: 'sequence' },
174
+ { type: 'gutter', gutterName: 'row-selector', multiple: true },
175
+ {
176
+ type: 'string',
177
+ name: 'productSku',
178
+ header: i18next.t('field.sku'),
179
+ sortable: true,
180
+ width: 150
181
+ },
182
+ {
183
+ type: 'integer',
184
+ name: 'releaseQty',
185
+ header: i18next.t('field.release_qty'),
186
+ width: 150
187
+ },
188
+ {
189
+ type: 'string',
190
+ name: 'roName',
191
+ header: i18next.t('field.ro'),
192
+ sortable: true,
193
+ width: 150
194
+ },
195
+ {
196
+ type: 'string',
197
+ name: 'binNumber',
198
+ header: i18next.t('field.bin_number'),
199
+ sortable: true,
200
+ width: 150
201
+ }
202
+ ]
203
+ }
204
+ }
205
+
206
+ async fetchOrderInventoriesOfMultipleReleaseOrders({ sorters = [] }) {
207
+ const filters = []
208
+ if (this._selectedBinNumber && this._selectedBinNumber.length !== 0) {
209
+ filters.push({
210
+ name: 'binNumber',
211
+ operator: 'eq',
212
+ value: this._selectedBinNumber[0].name
213
+ })
214
+ }
215
+ try {
216
+ const response = await client.query({
217
+ query: gql`
218
+ query orderInventoriesOfMultipleReleaseOrders(
219
+ $partnerId: String!
220
+ $filters: [Filter!]
221
+ $sortings: [Sorting!]
222
+ ) {
223
+ orderInventoriesOfMultipleReleaseOrders(partnerId: $partnerId, filters: $filters, sortings: $sortings) {
224
+ items {
225
+ id
226
+ name
227
+ releaseQty
228
+ releaseGood {
229
+ id
230
+ name
231
+ routeId
232
+ storeId
233
+ storeName
234
+ stopId
235
+ }
236
+ product {
237
+ id
238
+ sku
239
+ name
240
+ }
241
+ inventory {
242
+ id
243
+ name
244
+ }
245
+ binLocation {
246
+ id
247
+ name
248
+ }
249
+ }
250
+ total
251
+ }
252
+ }
253
+ `,
254
+ variables: { partnerId: this.partnerId, filters, sortings: sorters }
255
+ })
256
+
257
+ if (!response.errors) {
258
+ let records = response.data.orderInventoriesOfMultipleReleaseOrders
259
+
260
+ return (this.orderInventories = {
261
+ total: records.total || 0,
262
+ records:
263
+ records.items.map(itm => {
264
+ return {
265
+ ...itm,
266
+ productSku: itm.product?.sku,
267
+ productName: itm.product?.name,
268
+ roName: itm.releaseGood?.name,
269
+ binNumber: itm.binLocation?.name
270
+ }
271
+ }) || {}
272
+ })
273
+ }
274
+ } catch (e) {
275
+ this._showToast(e)
276
+ }
277
+ }
278
+
279
+ async fetchOrderInventoriesOfMergedReleaseOrders({ sorters = [] }) {
280
+ const filters = []
281
+ if (this._selectedBinNumber && this._selectedBinNumber.length !== 0) {
282
+ filters.push({
283
+ name: 'binNumber',
284
+ operator: 'eq',
285
+ value: this._selectedBinNumber[0].name
286
+ })
287
+ }
288
+
289
+ if (this._selectedPriority && this._selectedPriority.length !== 0) {
290
+ filters.push({
291
+ name: 'priority',
292
+ operator: 'eq',
293
+ value: this._selectedPriority
294
+ })
295
+ }
296
+ try {
297
+ const response = await client.query({
298
+ query: gql`
299
+ query orderInventoriesOfMergedReleaseOrders($partnerId: String!, $filters: [Filter!], $sortings: [Sorting!]) {
300
+ orderInventoriesOfMergedReleaseOrders(partnerId: $partnerId, filters: $filters, sortings: $sortings) {
301
+ items {
302
+ id
303
+ name
304
+ releaseQty
305
+ releaseGood {
306
+ id
307
+ name
308
+ routeId
309
+ storeId
310
+ storeName
311
+ stopId
312
+ }
313
+ product {
314
+ id
315
+ sku
316
+ name
317
+ }
318
+ inventory {
319
+ id
320
+ name
321
+ }
322
+ binLocation {
323
+ id
324
+ name
325
+ }
326
+ }
327
+ total
328
+ }
329
+ }
330
+ `,
331
+ variables: { partnerId: this.partnerId, filters, sortings: sorters }
332
+ })
333
+
334
+ if (!response.errors) {
335
+ let records = response.data.orderInventoriesOfMergedReleaseOrders
336
+
337
+ return (this.orderInventories = {
338
+ total: records.total || 0,
339
+ records:
340
+ records.items.map(itm => {
341
+ return {
342
+ ...itm,
343
+ productSku: itm.product?.sku,
344
+ productName: itm.product?.name,
345
+ roName: itm.releaseGood?.name,
346
+ binNumber: itm.binLocation?.name
347
+ }
348
+ }) || {}
349
+ })
350
+ }
351
+ } catch (e) {
352
+ this._showToast(e)
353
+ }
354
+ }
355
+
356
+ async _printRouteLabel() {
357
+ const records = this.dataGrist.selected
358
+ let labelId = this._routeLabel && this._routeLabel.id
359
+
360
+ if (!records || records.length == 0) {
361
+ this._showToast({ message: i18next.t('text.there_is_no_selected_items') })
362
+ }
363
+ if (!labelId) {
364
+ this._showToast({
365
+ type: 'error',
366
+ message: `${i18next.t('text.no_label_setting_was_found')}. ${i18next.t('text.please_check_your_setting')}`
367
+ })
368
+ } else {
369
+ for (var record of records) {
370
+ for (let qty = 1; qty <= record.releaseQty; qty++) {
371
+ var searchParams = new URLSearchParams()
372
+
373
+ /* for pallet record mapping */
374
+ searchParams.append('roName', record.roName)
375
+ searchParams.append('productSku', record.productSku)
376
+ searchParams.append('productName', record.productName)
377
+ searchParams.append('binNumber', record.binNumber)
378
+ searchParams.append('qty', qty)
379
+ searchParams.append('releaseQty', record.releaseQty)
380
+ searchParams.append('stopId', record.releaseGood.stopId)
381
+ searchParams.append('routeId', record.releaseGood.routeId)
382
+ searchParams.append('storeId', record.releaseGood.storeId)
383
+ searchParams.append('storeName', record.releaseGood.storeName)
384
+ searchParams.append('str', `STR: ${record.releaseGood.storeId}`)
385
+ searchParams.append(
386
+ 'storeInformation',
387
+ `(Store ID) ${record.releaseGood.storeId}, (Store Name) ${record.releaseGood.storeName}, (Route ID) ${record.releaseGood.routeId}, (Stop ID) ${record.releaseGood.stopId}`
388
+ )
389
+ searchParams.append('counter', `${qty} of ${record.releaseQty}`)
390
+
391
+ try {
392
+ const response = await fetch(`label-command/${labelId}?${searchParams.toString()}`, {
393
+ method: 'GET'
394
+ })
395
+
396
+ if (response.status !== 200) {
397
+ throw `Error : Can't get label command from server (response: ${response.status})`
398
+ }
399
+
400
+ var command = await response.text()
401
+
402
+ if (!this.printer) {
403
+ this.printer = new DirectPrinter()
404
+ }
405
+
406
+ await this.printer.print(command)
407
+ } catch (e) {
408
+ this._showToast(e)
409
+
410
+ delete this.printer
411
+ break
412
+ }
413
+ }
414
+ }
415
+ }
416
+ }
417
+
418
+ async fetchLocations() {
419
+ const response = await client.query({
420
+ query: gql`
421
+ query locations($filters: [Filter!]) {
422
+ locations(filters: $filters) {
423
+ items {
424
+ id
425
+ name
426
+ description
427
+ row
428
+ column
429
+ shelf
430
+ status
431
+ }
432
+ total
433
+ }
434
+ }
435
+ `,
436
+ variables: {
437
+ filters: [
438
+ {
439
+ name: 'type',
440
+ operator: 'eq',
441
+ value: LOCATION_TYPE.BIN.value
442
+ }
443
+ ]
444
+ }
445
+ })
446
+
447
+ if (!response.errors) {
448
+ this._binNumberList = response.data.locations.items
449
+ }
450
+ }
451
+
452
+ _showToast({ type, message }) {
453
+ document.dispatchEvent(
454
+ new CustomEvent('notify', {
455
+ detail: {
456
+ type,
457
+ message
458
+ }
459
+ })
460
+ )
461
+ }
462
+ }
463
+
464
+ window.customElements.define('route-label-popup', RouteLabelPopup)