@things-factory/operato-wms 4.3.449 → 4.3.452

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 (36) hide show
  1. package/client/constants/order.js +2 -1
  2. package/client/pages/inbound/undo-putaway-popup.js +3 -10
  3. package/client/pages/inventory-check/cycle-count-report.js +9 -3
  4. package/client/pages/order/draft-release-good/draft-release-good-card.js +292 -0
  5. package/client/pages/order/draft-release-good/draft-release-good-detail.js +24 -5
  6. package/client/pages/order/draft-release-good/draft-release-good-list.js +79 -27
  7. package/client/pages/order/draft-release-good/draft-release-good-popup.js +366 -0
  8. package/client/pages/order/release-order/b2b/b2b-order-list.js +33 -5
  9. package/client/pages/order/release-order/b2c/b2c-order-requests.js +12 -0
  10. package/client/pages/order/release-order/create-release-order.js +63 -27
  11. package/client/pages/order/release-order/release-order-detail.js +90 -27
  12. package/client/pages/order/vas-order/popup/order-vas-popup.js +236 -0
  13. package/client/pages/outbound/worksheet-picking.js +14 -9
  14. package/client/pages/report/order-vas-report.js +101 -39
  15. package/client/pages/report/vas-report.js +2 -25
  16. package/client/pages/vas/add-vas-order-level.js +383 -0
  17. package/client/pages/vas/vas-execution-page.js +41 -5
  18. package/client/pages/vas/worksheet-ref-vas.js +20 -18
  19. package/dist-server/graphql/resolvers/reports/cycle-count-report.js +7 -0
  20. package/dist-server/graphql/resolvers/reports/cycle-count-report.js.map +1 -1
  21. package/dist-server/graphql/resolvers/reports/shortage-report.js +3 -2
  22. package/dist-server/graphql/resolvers/reports/shortage-report.js.map +1 -1
  23. package/dist-server/graphql/resolvers/reports/vas-report.js +199 -88
  24. package/dist-server/graphql/resolvers/reports/vas-report.js.map +1 -1
  25. package/dist-server/graphql/types/reports/cycle-count-report.js +3 -0
  26. package/dist-server/graphql/types/reports/cycle-count-report.js.map +1 -1
  27. package/helps/release-note.md +9 -6
  28. package/package.json +21 -21
  29. package/server/graphql/resolvers/reports/cycle-count-report.ts +7 -0
  30. package/server/graphql/resolvers/reports/shortage-report.ts +3 -2
  31. package/server/graphql/resolvers/reports/vas-report.ts +203 -95
  32. package/server/graphql/types/reports/cycle-count-report.ts +3 -0
  33. package/translations/en.json +13 -0
  34. package/translations/ko.json +13 -0
  35. package/translations/ms.json +13 -0
  36. package/translations/zh.json +13 -0
@@ -2,7 +2,8 @@ export const DRAFT_RELEASE_ORDER_STATUS = {
2
2
  DRAFT: 'DRAFT',
3
3
  INSUFFICIENT: 'INSUFFICIENT',
4
4
  SUBMITTED: 'SUBMITTED',
5
- CANCELLED: 'CANCELLED'
5
+ CANCELLED: 'CANCELLED',
6
+ PARTIAL_RELEASED: 'PARTIAL RELEASED'
6
7
  }
7
8
 
8
9
  /**
@@ -113,15 +113,6 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
113
113
  return this.shadowRoot.querySelector('barcode-scanable-input[name=lotId]').shadowRoot.querySelector('input')
114
114
  }
115
115
 
116
- _handleKeyPress(e) {
117
- this._populateTargetedInventory(e);
118
- setTimeout(() => this._clickButton(), 100);
119
- }
120
-
121
- _clickButton() {
122
- this.shadowRoot.querySelector('mwc-button').click();
123
- }
124
-
125
116
  render() {
126
117
  return html`
127
118
  <form id="input-form" class="single-column-form">
@@ -139,7 +130,9 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
139
130
  <barcode-scanable-input
140
131
  name="lotId"
141
132
  custom-input
142
- @keypress="${this._handleKeyPress}"
133
+ @keypress="${ e=> {
134
+ this._populateTargetedInventory(e)
135
+ }}"
143
136
  ></barcode-scanable-input>`}
144
137
  </fieldset>
145
138
  </form>
@@ -356,6 +356,9 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
356
356
  uom
357
357
  }
358
358
  systemQty
359
+ systemBatchNo
360
+ systemLocationName
361
+ systemUomValue
359
362
  originLocationId
360
363
  inspectedLocationId
361
364
  countData
@@ -458,6 +461,9 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
458
461
  originQty,
459
462
  inspectedQty,
460
463
  systemQty: item.systemQty,
464
+ systemBatchNo: item.systemBatchNo,
465
+ systemLocationName: item.systemLocationName,
466
+ systemUomValue: item.systemUomValue,
461
467
  originLocationId: item.originLocationId,
462
468
  originLocationName,
463
469
  inspectedLocationId: item.inspectedLocationId,
@@ -705,11 +711,11 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
705
711
  { header: i18next.t('field.product_description'), key: 'description', width: 60, type: 'string' },
706
712
  { header: i18next.t('field.brand'), key: 'brand', width: 20, type: 'string' },
707
713
  { header: i18next.t('field.packing_type'), key: 'packingType', width: 20, type: 'string' },
708
- { header: i18next.t('field.system_batch_no'), key: 'originBatchNo', width: 25, type: 'string' },
714
+ { header: i18next.t('field.system_batch_no'), key: 'systemBatchNo', width: 25, type: 'string' },
709
715
  { header: i18next.t('field.inspected_batch_no'), key: 'inspectedBatchNo', width: 25, type: 'string' },
710
- { header: i18next.t('field.system_location'), key: 'originLocationName', width: 25, type: 'string' },
716
+ { header: i18next.t('field.system_location'), key: 'systemLocationName', width: 25, type: 'string' },
711
717
  { header: i18next.t('field.inspected_location'), key: 'inspectedLocationName', width: 25, type: 'string' },
712
- { header: i18next.t('field.system_uom_value'), key: 'originUomValue', width: 25, type: 'string' },
718
+ { header: i18next.t('field.system_uom_value'), key: 'systemUomValue', width: 25, type: 'string' },
713
719
  { header: i18next.t('field.inspected_uom_value'), key: 'inspectedUomValue', width: 25, type: 'string' },
714
720
  { header: i18next.t('field.uom'), key: 'uom', width: 25, type: 'string' },
715
721
  { header: i18next.t('field.system_qty'), key: 'systemQty', width: 20, type: 'string' },
@@ -0,0 +1,292 @@
1
+ import gql from 'graphql-tag'
2
+ import { css, html, LitElement } from 'lit-element'
3
+
4
+ import { i18next, localize } from '@things-factory/i18n-base'
5
+ import { client } from '@things-factory/shell'
6
+ import { isMobileDevice } from '@things-factory/utils'
7
+
8
+ class DraftReleaseGoodCard extends localize(i18next)(LitElement) {
9
+ closeCard() {
10
+ this.dispatchEvent(new CustomEvent('remove-card', { detail: null, bubbles: true, composed: true }))
11
+ this.parentElement.removeChild(this)
12
+ }
13
+
14
+ handleInputChange(event) {
15
+ const checkbox = this.shadowRoot.querySelector('input[id="selectDraftOrder"]')
16
+ const radioValue = this.shadowRoot.querySelector('input[name="orderType"]:checked')?.value || ''
17
+
18
+ const value = {
19
+ valueInfo: checkbox.value,
20
+ valueRadio: radioValue,
21
+ valueCheckBox: checkbox.checked
22
+ }
23
+
24
+ this.dispatchEvent(new CustomEvent('value-change', { detail: value, bubbles: true, composed: true }))
25
+ }
26
+
27
+ updated(changedProperties) {
28
+ super.updated(changedProperties)
29
+ if (changedProperties.has('selected') && this.selected) {
30
+ this.handleInputChange()
31
+ }
32
+ }
33
+
34
+ static get properties() {
35
+ return {
36
+ config: Object,
37
+ fetchHandler: Object,
38
+ draftInfo: Object,
39
+ draftOrder: Object,
40
+ checkDisable: Object,
41
+ selected: Boolean,
42
+ checkReleaseType: Boolean,
43
+ checkStatus: Boolean,
44
+ checkAvailableQty: Boolean
45
+ }
46
+ }
47
+
48
+ static get styles() {
49
+ return [
50
+ css`
51
+ :host {
52
+ display: flex;
53
+ flex-direction: column;
54
+ width: 100%;
55
+ }
56
+
57
+ table {
58
+ padding: 18px;
59
+ }
60
+
61
+ th,
62
+ td {
63
+ padding-top: 5px;
64
+ padding-bottom: 5px;
65
+ padding-left: 5x;
66
+ padding-right: 5px;
67
+ }
68
+
69
+ td {
70
+ text-align: center;
71
+ }
72
+
73
+ table,
74
+ th,
75
+ td {
76
+ border: 1px solid black;
77
+ }
78
+
79
+ .card {
80
+ width: 1300px;
81
+ margin: auto;
82
+ background-color: rgb(255, 255, 249);
83
+ min-height: 200px;
84
+ position: relative;
85
+ border-radius: 10px;
86
+ border: 2px solid rgb(20, 154, 155);
87
+ }
88
+
89
+ #close {
90
+ float: right;
91
+ display: inline-block;
92
+ padding: 2px 5px;
93
+ margin-top: 3px;
94
+ margin-right: 3px;
95
+ background: #696969;
96
+ border-radius: 50%;
97
+ font-size: 8px;
98
+ color: white;
99
+ }
100
+
101
+ .topLeft {
102
+ color: rgb(20, 155, 155);
103
+ font-size: 14px;
104
+ display: flex;
105
+ margin-left: 7px;
106
+ }
107
+
108
+ .selectOption {
109
+ position: absolute;
110
+ left: 5px;
111
+ top: 30px;
112
+ margin-top: 10px;
113
+ }
114
+
115
+ label {
116
+ color: #3a5877;
117
+ }
118
+
119
+ .grist {
120
+ margin-top: 13px;
121
+ margin-left: auto;
122
+ margin-right: auto;
123
+ width: 95%;
124
+ height: 125px;
125
+ }
126
+
127
+ .border1 {
128
+ border-top: 1px solid black;
129
+ width: 100%;
130
+ margin-top: 10px;
131
+ }
132
+
133
+ .center {
134
+ margin-left: auto;
135
+ margin-right: auto;
136
+ margin-top: 40px;
137
+ border-collapse: collapse;
138
+ }
139
+
140
+ .button button {
141
+ width: 20px;
142
+ height: 20px;
143
+ border-radius: 50%;
144
+ background-color: #909090;
145
+ color: white;
146
+ border: none;
147
+ outline: none;
148
+ cursor: pointer;
149
+ display: flex;
150
+ justify-content: center;
151
+ align-items: center;
152
+ float: right;
153
+ margin-right: 10px;
154
+ margin-top: 5px;
155
+ }
156
+ `
157
+ ]
158
+ }
159
+
160
+ constructor() {
161
+ super()
162
+
163
+ this.properties = {
164
+ config: {},
165
+ fetchHandler: () => {},
166
+ draftInfo: {},
167
+ checkStatus: false,
168
+ checkAvailableQty: false
169
+ }
170
+ this.selected = false
171
+ }
172
+
173
+ render() {
174
+ return html`
175
+ <div class="card">
176
+ <div class="button">
177
+ <button @click=${() => this.closeCard()} ${this.closeCard}>X</button>
178
+ </div>
179
+ <div class="topLeft">
180
+ <h3>
181
+ <input
182
+ type="checkbox"
183
+ id="selectDraftOrder"
184
+ value="${this.draftInfo.id}"
185
+ .checked=${this.selected ? true : false}
186
+ @change=${(this.selected ? this.handleInputChange : null) || this.handleInputChange}
187
+ ?disabled="${this.draftInfo.status === 'SUBMITTED'}"
188
+ />
189
+ <b> ${this.draftInfo.name} [${this.draftInfo.status}]</b>
190
+ </h3>
191
+ </div>
192
+ <div class="selectOption">
193
+ <input
194
+ type="radio"
195
+ id="releaseOrder"
196
+ name="orderType"
197
+ value="release"
198
+ .checked="${!this.checkStatus}"
199
+ @change=${this.handleInputChange}
200
+ ?hidden=${this.checkStatus}
201
+ />
202
+ <label ?hidden=${this.checkStatus}><b> Release Order </b></label>
203
+ <input
204
+ type="radio"
205
+ id="partialReleaseOrder"
206
+ name="orderType"
207
+ value="partial"
208
+ .checked="${this.draftInfo.source === 'OTHERS' && this.checkStatus && !this.checkAvailableQty}"
209
+ @change=${this.handleInputChange}
210
+ ?hidden="${!(this.draftInfo.source === 'OTHERS' && this.checkStatus)}"
211
+ ?disabled="${this.checkAvailableQty}"
212
+ />
213
+ <label ?hidden="${!(this.draftInfo.source === 'OTHERS' && this.checkStatus)}"
214
+ ><b> Partial Release Order </b></label
215
+ >
216
+ </div>
217
+ <data-grist
218
+ class="grist"
219
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
220
+ .config=${this.config}
221
+ .fetchHandler=${this.draftReleaseGoodInfo.bind(this, this.draftOrder)}
222
+ ></data-grist>
223
+ </div>
224
+ `
225
+ }
226
+
227
+ async draftReleaseGoodInfo() {
228
+ const orderItem = this.draftOrder
229
+ const response = await client.query({
230
+ query: gql`
231
+ query draftReleaseGoodByName($id: String) {
232
+ draftReleaseGoodByName(id: $id) {
233
+ id
234
+ name
235
+ type
236
+ status
237
+ bizplace {
238
+ id
239
+ name
240
+ description
241
+ }
242
+ orderProducts {
243
+ id
244
+ name
245
+ product {
246
+ id
247
+ name
248
+ sku
249
+ }
250
+ uomValue
251
+ uom
252
+ releaseQty
253
+ remainQty
254
+ remainUomValue
255
+ groupType
256
+ remainUomValueWithUom
257
+ status
258
+ }
259
+ createdAt
260
+ updatedAt
261
+ }
262
+ }
263
+ `,
264
+ variables: { id: orderItem.id }
265
+ })
266
+
267
+ if (!response.errors) {
268
+ const items = response.data.draftReleaseGoodByName
269
+
270
+ this.draftOrderStatus = response.data.draftReleaseGoodByName.status
271
+ const records = items.orderProducts.map(itm => {
272
+ return {
273
+ sku: itm.product.sku,
274
+ groupType: itm.groupType,
275
+ releaseQty: itm.releaseQty,
276
+ bizplace: items.bizplace.name,
277
+ availableQty: itm.remainQty,
278
+ status: itm.status
279
+ }
280
+ })
281
+
282
+ this.checkStatus = records.some(itm => itm.status === 'INSUFFICIENT')
283
+ this.checkAvailableQty = records.every(itm => itm.availableQty == 0)
284
+
285
+ return {
286
+ records
287
+ }
288
+ }
289
+ }
290
+ }
291
+
292
+ window.customElements.define('draft-release-good-card', DraftReleaseGoodCard)
@@ -4,20 +4,38 @@ import '@things-factory/warehouse-ui'
4
4
  import '@things-factory/import-ui'
5
5
 
6
6
  import gql from 'graphql-tag'
7
- import { css, html } from 'lit-element'
7
+ import {
8
+ css,
9
+ html
10
+ } from 'lit-element'
8
11
  import isEmpty from 'lodash-es/isEmpty'
9
12
  import { connect } from 'pwa-helpers/connect-mixin'
10
13
 
11
14
  import { getCodeByName } from '@things-factory/code-base'
12
15
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
13
- import { i18next, localize } from '@things-factory/i18n-base'
16
+ import {
17
+ i18next,
18
+ localize
19
+ } from '@things-factory/i18n-base'
14
20
  import { openPopup } from '@things-factory/layout-base'
15
21
  import { fetchSettingRule } from '@things-factory/setting-ui'
16
- import { client, CustomAlert, navigate, PageView, store } from '@things-factory/shell'
22
+ import {
23
+ client,
24
+ CustomAlert,
25
+ navigate,
26
+ PageView,
27
+ store
28
+ } from '@things-factory/shell'
17
29
  import { CommonButtonStyles } from '@things-factory/styles'
18
- import { flattenObject, isMobileDevice } from '@things-factory/utils'
30
+ import {
31
+ flattenObject,
32
+ isMobileDevice
33
+ } from '@things-factory/utils'
19
34
 
20
- import { DRAFT_RELEASE_ORDER_STATUS, PRODUCT_GROUP_TYPES } from '../../../constants'
35
+ import {
36
+ DRAFT_RELEASE_ORDER_STATUS,
37
+ PRODUCT_GROUP_TYPES
38
+ } from '../../../constants'
21
39
 
22
40
  class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView)) {
23
41
  static get properties() {
@@ -235,6 +253,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
235
253
 
236
254
  if (
237
255
  this._draftOrderData?.status != DRAFT_RELEASE_ORDER_STATUS.PENDING &&
256
+ this._draftOrderData?.status != DRAFT_RELEASE_ORDER_STATUS.PARTIAL_RELEASED &&
238
257
  this._draftOrderData?.status != DRAFT_RELEASE_ORDER_STATUS.SUBMITTED &&
239
258
  this._draftOrderData?.status != DRAFT_RELEASE_ORDER_STATUS.CANCELLED
240
259
  ) {
@@ -1,27 +1,15 @@
1
1
  import '@things-factory/form-ui'
2
2
  import '@things-factory/grist-ui'
3
+ import './draft-release-good-popup'
3
4
 
4
5
  import gql from 'graphql-tag'
5
- import {
6
- css,
7
- html
8
- } from 'lit-element'
6
+ import { css, html } from 'lit-element'
9
7
 
10
8
  import { GhostPrint } from '@operato/ghost-print'
11
- import {
12
- i18next,
13
- localize
14
- } from '@things-factory/i18n-base'
15
- import {
16
- client,
17
- CustomAlert,
18
- navigate,
19
- PageView
20
- } from '@things-factory/shell'
21
- import {
22
- CommonButtonStyles,
23
- ScrollbarStyles
24
- } from '@things-factory/styles'
9
+ import { openPopup } from '@operato/layout'
10
+ import { i18next, localize } from '@things-factory/i18n-base'
11
+ import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
12
+ import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
25
13
  import { isMobileDevice } from '@things-factory/utils'
26
14
 
27
15
  import { DRAFT_RELEASE_ORDER_STATUS } from '../../../constants'
@@ -32,6 +20,10 @@ import { DRAFT_RELEASE_ORDER_STATUS } from '../../../constants'
32
20
  // }
33
21
 
34
22
  class DraftReleaseGoodList extends localize(i18next)(PageView) {
23
+ connectedCallback() {
24
+ super.connectedCallback()
25
+ this.addEventListener('reload-page', this.pageUpdated, true)
26
+ }
35
27
  static get styles() {
36
28
  return [
37
29
  ScrollbarStyles,
@@ -58,7 +50,9 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
58
50
  return {
59
51
  _searchFields: Array,
60
52
  config: Object,
61
- data: Object
53
+ data: Object,
54
+ _source: String,
55
+ _settingValue: String
62
56
  }
63
57
  }
64
58
 
@@ -81,10 +75,17 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
81
75
  name: i18next.t('title.draft_release_order'),
82
76
  data: this.exportableData.bind(this)
83
77
  },
78
+
84
79
  actions: [
85
80
  {
86
81
  title: i18next.t('button.create_release_order'),
87
- action: this._generateReleaseGood.bind(this),
82
+ action: () => {
83
+ if (this._settingValue == 'true') {
84
+ this._generatePopupReleaseGood(this)
85
+ } else {
86
+ this._generateReleaseGoods(this)
87
+ }
88
+ },
88
89
  ...CommonButtonStyles.activate
89
90
  },
90
91
  {
@@ -388,6 +389,7 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
388
389
  exportOption
389
390
  releaseDate
390
391
  status
392
+ source
391
393
  platformCode
392
394
  createdAt
393
395
  updatedAt
@@ -397,6 +399,7 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
397
399
  description
398
400
  }
399
401
  }
402
+ settingValue
400
403
  total
401
404
  }
402
405
  }
@@ -411,6 +414,7 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
411
414
  if (!response.errors) {
412
415
  this._ownTransport = response.data.draftReleaseGoods.ownTransport
413
416
  this._exportOption = response.data.draftReleaseGoods.exportOption
417
+ this._settingValue = response.data.draftReleaseGoods.settingValue
414
418
  return {
415
419
  total: response.data.draftReleaseGoods.total || 0,
416
420
  records: response.data.draftReleaseGoods.items || []
@@ -422,16 +426,16 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
422
426
  return this.config.columns
423
427
  }
424
428
 
425
- async _generateReleaseGood() {
429
+ async _generateReleaseGoods() {
426
430
  try {
427
431
  let orderIds = []
428
-
429
432
  let selectedGristData = this.dataGrist.selected
433
+
430
434
  if (selectedGristData.filter(itm => itm.status == DRAFT_RELEASE_ORDER_STATUS.DRAFT).length <= 0)
431
435
  throw new Error(i18next.t('text.please_select_a_valid_draft_order_to_generate_release_order'))
432
436
 
433
437
  let selectedOrders = selectedGristData.filter(itm => itm.status === DRAFT_RELEASE_ORDER_STATUS.DRAFT)
434
- orderIds = selectedOrders.map(record => record.id)
438
+ orderIds = selectedOrders.map(record => ({ id: record.id, releaseType: 'release' }))
435
439
 
436
440
  let result = await CustomAlert({
437
441
  title: i18next.t('title.are_you_sure'),
@@ -442,14 +446,14 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
442
446
 
443
447
  if (!result.value) return
444
448
 
445
- const response = await client.mutate({
449
+ let response = await client.mutate({
446
450
  mutation: gql`
447
- mutation generateReleaseGoodsFromDraft($ids: [String!]!) {
448
- generateReleaseGoodsFromDraft(ids: $ids)
451
+ mutation generateReleaseGoodsFromDraft($releaseInfo: [DraftReleaseGoodInfos!]!) {
452
+ generateReleaseGoodsFromDraft(releaseInfo: $releaseInfo)
449
453
  }
450
454
  `,
451
455
  variables: {
452
- ids: orderIds
456
+ releaseInfo: orderIds
453
457
  }
454
458
  })
455
459
 
@@ -462,6 +466,54 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
462
466
  }
463
467
  }
464
468
 
469
+ async _generatePopupReleaseGood() {
470
+ let selectedGristData = this.dataGrist.selected
471
+ const selectedStatuses = [
472
+ DRAFT_RELEASE_ORDER_STATUS.DRAFT,
473
+ DRAFT_RELEASE_ORDER_STATUS.INSUFFICIENT,
474
+ DRAFT_RELEASE_ORDER_STATUS.PARTIAL_RELEASED
475
+ ]
476
+ let selectedOrders
477
+
478
+ try {
479
+ if (selectedGristData.length > 10) {
480
+ throw new Error(i18next.t('text.only_ten_draft_orders_are_allowed_to_generate_release_order_at_a_time'))
481
+ }
482
+
483
+ if (selectedGristData.length < 1) {
484
+ throw new Error(i18next.t('text.please_select_a_valid_draft_order_to_generate_release_order'))
485
+ }
486
+
487
+ let submittedOrders = selectedGristData.some(itm => itm.status === DRAFT_RELEASE_ORDER_STATUS.SUBMITTED)
488
+
489
+ selectedOrders = selectedGristData.filter(itm => selectedStatuses.includes(itm.status))
490
+
491
+ if (submittedOrders) {
492
+ this._showToast({message:i18next.t('text.submitted_draft_orders_will_not_be_displayed')})
493
+ }
494
+
495
+ if (selectedOrders.length < 1) {
496
+ throw new Error('No draft orders to display')
497
+ }
498
+
499
+ openPopup(
500
+ html`
501
+ <draft-release-good-popup
502
+ .draftOrder="${selectedOrders}"
503
+ @reload-page="${this.pageUpdated.bind(this)}"
504
+ ></draft-release-good-popup>
505
+ `,
506
+ {
507
+ backdrop: true,
508
+ size: 'large',
509
+ title: i18next.t('title.create_release_order')
510
+ }
511
+ )
512
+ } catch (e) {
513
+ this._showToast(e)
514
+ }
515
+ }
516
+
465
517
  _navigateToCreate() {
466
518
  navigate(`draft_release_good_detail/new`)
467
519
  }