@things-factory/operato-wms 4.3.50 → 4.3.51

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.
@@ -121,8 +121,7 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
121
121
  pagination: { pages: [10, 20, 50, 100] },
122
122
  rows: {
123
123
  appendable: false,
124
- selectable: { multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false },
125
- handlers: { dblclick: this.selectProduct.bind(this) }
124
+ selectable: { multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false }
126
125
  },
127
126
  columns: [
128
127
  { type: 'gutter', gutterName: 'sequence' },
@@ -241,9 +240,9 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
241
240
  }
242
241
  }
243
242
 
244
- selectProduct(columns, data, column, record, rowIndex, target) {
243
+ selectProduct() {
245
244
  if (this.selectMultipleProducts !== true) {
246
- const selectedProduct = record || this.productGrist.selected[0]
245
+ const selectedProduct = this.productGrist.selected[0]
247
246
  if (selectedProduct) {
248
247
  this.dispatchEvent(
249
248
  new CustomEvent('selected', {
@@ -273,6 +272,43 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
273
272
  new CustomEvent('notify', { detail: { message: i18next.t('text.product_is_not_selected') } })
274
273
  )
275
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}))`,
285
+ isError: false,
286
+ productBrand: itm.brand,
287
+ product: {
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
295
+ }
296
+ }
297
+ })
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
+ }
276
312
  }
277
313
  }
278
314
  }
@@ -77,7 +77,7 @@ exports.outboundOrderByStatusResolver = {
77
77
  UNION ALL
78
78
  SELECT 'AWAITING DISPATCH' AS "status", count(*) FROM manifests m
79
79
  INNER JOIN release_goods rg ON rg.manifest_id = m.id
80
- WHERE m."status" = 'OPEN' or m."status" = 'IN_QUEUE'
80
+ WHERE m."status" in ('OPEN', 'IN_QUEUE')
81
81
  AND m."domain_id" = $1
82
82
  AND rg."bizplace_id" IN (${bizplaceIds})
83
83
  UNION ALL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.50",
3
+ "version": "4.3.51",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -118,5 +118,5 @@
118
118
  "cypress-localstorage-commands": "^1.6.1",
119
119
  "eslint-plugin-cypress": "^2.12.1"
120
120
  },
121
- "gitHead": "4be34f9fc5e863e89894a44501e6194a3b74c21e"
121
+ "gitHead": "2f4e4825183242e10f4c2f2e1181e3fd5618d19e"
122
122
  }
@@ -80,7 +80,7 @@ export const outboundOrderByStatusResolver = {
80
80
  UNION ALL
81
81
  SELECT 'AWAITING DISPATCH' AS "status", count(*) FROM manifests m
82
82
  INNER JOIN release_goods rg ON rg.manifest_id = m.id
83
- WHERE m."status" = 'OPEN' or m."status" = 'IN_QUEUE'
83
+ WHERE m."status" in ('OPEN', 'IN_QUEUE')
84
84
  AND m."domain_id" = $1
85
85
  AND rg."bizplace_id" IN (${bizplaceIds})
86
86
  UNION ALL