@things-factory/operato-wms 4.3.776 → 4.3.777

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.
@@ -100,7 +100,8 @@ export const ORDER_PRODUCT_STATUS = {
100
100
  READY_TO_UNLOAD: { name: 'product_status_ready_to_unload', value: 'READY_TO_UNLOAD' },
101
101
  READY_TO_DELIVER: { name: 'product_status_ready_to_deliver', value: 'READY_TO_DELIVER' },
102
102
  COLLECTED: { name: 'product_status_collected', value: 'COLLECTED' },
103
- DELIVERED: { name: 'product_status_delivered', value: 'DELIVERED' }
103
+ DELIVERED: { name: 'product_status_delivered', value: 'DELIVERED' },
104
+ CANCELLED: { name: 'product_status_cancelled', value: 'CANCELLED' }
104
105
  }
105
106
 
106
107
  export const ORDER_INVENTORY_STATUS = {
@@ -135,8 +136,8 @@ export const ORDER_INVENTORY_STATUS = {
135
136
  export const ORDER_VAS_STATUS = {
136
137
  PENDING: { name: 'vas_status_pending', value: 'PENDING' },
137
138
  PENDING_RECEIVE: { name: 'vas_status_pending_receive', value: 'PENDING_RECEIVE' },
138
- PENDING_APPROVE: { name: 'vas_status_pending_approve', value: 'PENDING_APPROVE'},
139
- PENDING_CANCEL: { name: 'vas_status_pending_cancel', value: 'PENDING_CANCEL'},
139
+ PENDING_APPROVE: { name: 'vas_status_pending_approve', value: 'PENDING_APPROVE' },
140
+ PENDING_CANCEL: { name: 'vas_status_pending_cancel', value: 'PENDING_CANCEL' },
140
141
  PROCESSING: { name: 'vas_status_processing', value: 'PROCESSING' },
141
142
  READY_TO_PROCESS: { name: 'vas_status_ready_to_process', value: 'READY_TO_PROCESS' },
142
143
  DONE: { name: 'vas_status_done', value: 'DONE' },
@@ -207,7 +207,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
207
207
  })
208
208
  }
209
209
 
210
- if(this.enableDirectInbound && this._status === ORDER_STATUS.PENDING.value && isNotAdmin) {
210
+ if (this.enableDirectInbound && this._status === ORDER_STATUS.PENDING.value && isNotAdmin) {
211
211
  actions.push({
212
212
  title: i18next.t('button.edit_product'),
213
213
  action: this.openEditProductPopup.bind(this),
@@ -418,7 +418,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
418
418
  titleName = i18next.t('title.rejected_arrival_notice_detail')
419
419
  }
420
420
 
421
- if(this.enableDirectInbound && this._status === ORDER_STATUS.DONE.value) {
421
+ if (this.enableDirectInbound && this._status === ORDER_STATUS.DONE.value) {
422
422
  actions.push({
423
423
  title: i18next.t('button.carton_label_print'),
424
424
  action: this._openCartonLabelPrintPopup.bind(this),
@@ -447,16 +447,16 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
447
447
  name="ownTransport"
448
448
  ?checked="${this._ownTransport}"
449
449
  @change="${e => {
450
- this._ownTransport = e.currentTarget.checked
451
- if (this._ownTransport) {
452
- this._warehouseTransportInput.checked = false
453
- this._warehouseTransport = false
454
- } else {
455
- this._warehouseTransportInput.checked = true
456
- this._warehouseTransport = true
457
- }
458
- this._validateTransport()
459
- }}"
450
+ this._ownTransport = e.currentTarget.checked
451
+ if (this._ownTransport) {
452
+ this._warehouseTransportInput.checked = false
453
+ this._warehouseTransport = false
454
+ } else {
455
+ this._warehouseTransportInput.checked = true
456
+ this._warehouseTransport = true
457
+ }
458
+ this._validateTransport()
459
+ }}"
460
460
  ?disabled=${this.determineStatus() || this._disableTransport}
461
461
  />
462
462
  <label for="ownTransport">${i18next.t('label.own_transport')}</label>
@@ -468,16 +468,16 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
468
468
  ?checked="${!this._ownTransport}"
469
469
  ?disabled=${this.determineStatus() || this._disableTransport}
470
470
  @change="${e => {
471
- this._warehouseTransport = e.currentTarget.checked
472
- if (this._warehouseTransport) {
473
- this._ownTransportInput.checked = false
474
- this._ownTransport = false
475
- } else {
476
- this._ownTransportInput.checked = true
477
- this._ownTransport = true
478
- }
479
- this._validateTransport()
480
- }}"
471
+ this._warehouseTransport = e.currentTarget.checked
472
+ if (this._warehouseTransport) {
473
+ this._ownTransportInput.checked = false
474
+ this._ownTransport = false
475
+ } else {
476
+ this._ownTransportInput.checked = true
477
+ this._ownTransport = true
478
+ }
479
+ this._validateTransport()
480
+ }}"
481
481
  />
482
482
  <label for="warehouseTransport">${i18next.t('label.warehouse_transport')}</label>
483
483
 
@@ -487,8 +487,8 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
487
487
  name="container"
488
488
  ?checked="${this._hasContainer}"
489
489
  @change="${e => {
490
- this._hasContainer = e.currentTarget.checked
491
- }}"
490
+ this._hasContainer = e.currentTarget.checked
491
+ }}"
492
492
  ?disabled=${this.determineStatus()}
493
493
  />
494
494
  <label for="container">${i18next.t('label.container')}</label>
@@ -512,7 +512,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
512
512
  <label for="importedOrder">${i18next.t('label.import_cargo')}</label>
513
513
 
514
514
  ${this._crossDocking
515
- ? html`
515
+ ? html`
516
516
  <input
517
517
  id="crossDocking"
518
518
  type="checkbox"
@@ -522,7 +522,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
522
522
  />
523
523
  <label for="crossDocking">${i18next.t('label.cross_docking')}</label>
524
524
  `
525
- : ''}
525
+ : ''}
526
526
  </div>
527
527
 
528
528
  <label>${i18next.t('label.company')}</label>
@@ -565,40 +565,40 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
565
565
  <select name="containerSize" ?hidden="${!this._hasContainer}" ?disabled=${this.determineStatus()}>
566
566
  <option value="">--${i18next.t('label.please_select_a_container_size')}--</option>
567
567
  ${(this.containerSizes || []).map(
568
- containerSize =>
569
- html`
568
+ containerSize =>
569
+ html`
570
570
  <option value="${containerSize && containerSize.name}">
571
571
  ${containerSize && containerSize.name}
572
572
  </option>
573
573
  `
574
- )}
574
+ )}
575
575
  </select>
576
576
 
577
577
  <label>${i18next.t('label.status')}</label>
578
578
  <select name="status" disabled>
579
579
  ${Object.keys(ORDER_STATUS).map(key => {
580
- const status = ORDER_STATUS[key]
581
- return html` <option value="${status.value}">${i18next.t(`label.${status.name}`)}</option> `
582
- })}
580
+ const status = ORDER_STATUS[key]
581
+ return html` <option value="${status.value}">${i18next.t(`label.${status.name}`)}</option> `
582
+ })}
583
583
  </select>
584
584
 
585
585
  ${this._attachments?.length > 0
586
- ? html`
586
+ ? html`
587
587
  <label>${i18next.t('label.attachment')}</label>
588
588
  <ul attachment-wrap>
589
589
  ${(this._attachments || []).map(
590
- attachment =>
591
- html`
590
+ attachment =>
591
+ html`
592
592
  <li>
593
593
  <a href="${location.origin}/attachment/${attachment.path}" download
594
594
  ><mwc-icon>attach_file</mwc-icon> ${attachment.name}</a
595
595
  >
596
596
  </li>
597
597
  `
598
- )}
598
+ )}
599
599
  </ul>
600
600
  `
601
- : ''}
601
+ : ''}
602
602
  </fieldset>
603
603
 
604
604
  <fieldset style=${this._showAssignWarehouse ? '' : 'display: none'}>
@@ -627,8 +627,8 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
627
627
 
628
628
  <h2
629
629
  @click="${e => {
630
- this._vasExpanded = !this._vasExpanded
631
- }}"
630
+ this._vasExpanded = !this._vasExpanded
631
+ }}"
632
632
  >
633
633
  <mwc-icon>list_alt</mwc-icon>${i18next.t('title.vas')}<mwc-icon
634
634
  >${this._vasExpanded ? 'expand_less' : 'expand_more'}</mwc-icon
@@ -891,15 +891,15 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
891
891
  },
892
892
  ...(this._enableLotIdInput
893
893
  ? [
894
- {
895
- type: 'string',
896
- name: 'palletId',
897
- header: i18next.t('field.lot_id'),
898
- imex: { header: i18next.t('field.lot_id'), key: 'palletId', width: 25, type: 'string' },
899
- record: { editable: true },
900
- width: 150
901
- }
902
- ]
894
+ {
895
+ type: 'string',
896
+ name: 'palletId',
897
+ header: i18next.t('field.lot_id'),
898
+ imex: { header: i18next.t('field.lot_id'), key: 'palletId', width: 25, type: 'string' },
899
+ record: { editable: true },
900
+ width: 150
901
+ }
902
+ ]
903
903
  : []),
904
904
  {
905
905
  type: 'date',
@@ -954,10 +954,10 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
954
954
  width: 150
955
955
  }
956
956
 
957
- function insertAfter (cols, anchorName, newCols) {
957
+ function insertAfter(cols, anchorName, newCols) {
958
958
  const idx = cols.findIndex(c => c.name === anchorName)
959
959
  if (idx >= 0) cols.splice(idx + 1, 0, ...newCols)
960
- }
960
+ }
961
961
 
962
962
  if (this.enableDirectInbound) {
963
963
  const anchor = this._enableLotIdInput ? 'palletId' : 'palletQty'
@@ -1221,9 +1221,8 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1221
1221
  this._fillupForm(this.arrivalNoticeForm, data)
1222
1222
 
1223
1223
  if (data?.purchaseOrder?.bufferLocation) {
1224
- this.bufferLocationField.value = `${data.purchaseOrder.bufferLocation.name} ${
1225
- data.purchaseOrder.bufferLocation.description ? `(${data.purchaseOrder.bufferLocation.description})` : ''
1226
- }`
1224
+ this.bufferLocationField.value = `${data.purchaseOrder.bufferLocation.name} ${data.purchaseOrder.bufferLocation.description ? `(${data.purchaseOrder.bufferLocation.description})` : ''
1225
+ }`
1227
1226
  this.bufferLocationField.setAttribute('location-id', data.purchaseOrder.bufferLocation.id)
1228
1227
  }
1229
1228
  }
@@ -1388,47 +1387,47 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1388
1387
  <popup-note
1389
1388
  .title="${i18next.t('title.remark')}"
1390
1389
  @submit="${async e => {
1391
- try {
1392
- if (!e.detail.value) throw new Error(i18next.t('text.remark_is_empty'))
1390
+ try {
1391
+ if (!e.detail.value) throw new Error(i18next.t('text.remark_is_empty'))
1392
+ const result = await CustomAlert({
1393
+ title: i18next.t('title.are_you_sure'),
1394
+ text: i18next.t('text.reject_arrival_notice'),
1395
+ confirmButton: { text: i18next.t('button.confirm') },
1396
+ cancelButton: { text: i18next.t('button.cancel') }
1397
+ })
1398
+
1399
+ if (!result.value) return
1400
+
1401
+ if (this._crossDocking) {
1393
1402
  const result = await CustomAlert({
1394
- title: i18next.t('title.are_you_sure'),
1395
- text: i18next.t('text.reject_arrival_notice'),
1403
+ title: i18next.t('title.cross_docking'),
1404
+ text: i18next.t('text.related_release_order_will_be_rejected'),
1396
1405
  confirmButton: { text: i18next.t('button.confirm') },
1397
1406
  cancelButton: { text: i18next.t('button.cancel') }
1398
1407
  })
1399
1408
 
1400
1409
  if (!result.value) return
1410
+ }
1401
1411
 
1402
- if (this._crossDocking) {
1403
- const result = await CustomAlert({
1404
- title: i18next.t('title.cross_docking'),
1405
- text: i18next.t('text.related_release_order_will_be_rejected'),
1406
- confirmButton: { text: i18next.t('button.confirm') },
1407
- cancelButton: { text: i18next.t('button.cancel') }
1408
- })
1409
-
1410
- if (!result.value) return
1411
- }
1412
-
1413
- const response = await client.mutate({
1414
- mutation: gql`
1412
+ const response = await client.mutate({
1413
+ mutation: gql`
1415
1414
  mutation rejectArrivalNotice($name: String!, $patch: ArrivalNoticePatch!) {
1416
1415
  rejectArrivalNotice(name: $name, patch: $patch) {
1417
1416
  name
1418
1417
  }
1419
1418
  }
1420
1419
  `,
1421
- variables: { name: this._ganNo, patch: { remark: e.detail.value } }
1422
- })
1420
+ variables: { name: this._ganNo, patch: { remark: e.detail.value } }
1421
+ })
1423
1422
 
1424
- if (!response.errors) {
1425
- navigate('arrival_notices')
1426
- this._showToast({ message: i18next.t('text.arrival_notice_rejected') })
1427
- }
1428
- } catch (e) {
1429
- this._showToast(e)
1423
+ if (!response.errors) {
1424
+ navigate('arrival_notices')
1425
+ this._showToast({ message: i18next.t('text.arrival_notice_rejected') })
1430
1426
  }
1431
- }}"
1427
+ } catch (e) {
1428
+ this._showToast(e)
1429
+ }
1430
+ }}"
1432
1431
  ></popup-note>
1433
1432
  `,
1434
1433
  {
@@ -1594,6 +1593,27 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1594
1593
  }
1595
1594
 
1596
1595
  async _confirmArrivalNotice() {
1596
+ // Check if ALL products have packQty = 0 AND palletQty = 0
1597
+ const isAllZero = this.productData.records.every(product => {
1598
+ // Products might not have packQty/palletQty properties directly if they are in a different format,
1599
+ // but usually grist data has them.
1600
+ // Need to handle null/undefined as 0
1601
+ const packQty = product.packQty || 0
1602
+ const palletQty = product.palletQty || 0
1603
+ return packQty === 0 && palletQty === 0
1604
+ })
1605
+
1606
+ if (isAllZero) {
1607
+ const confirmZero = await CustomAlert({
1608
+ title: i18next.t('title.are_you_sure'),
1609
+ text: i18next.t('text.changing_all_product_quantities_to_0_will_cancel_order'),
1610
+ confirmButton: { text: i18next.t('button.confirm') },
1611
+ cancelButton: { text: i18next.t('button.cancel') }
1612
+ })
1613
+
1614
+ if (!confirmZero.value) return
1615
+ }
1616
+
1597
1617
  let result = await CustomAlert({
1598
1618
  title: i18next.t('title.are_you_sure'),
1599
1619
  text: i18next.t('text.confirm_arrival_notice'),
@@ -1623,7 +1643,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1623
1643
  }
1624
1644
  }
1625
1645
  `
1626
- : gql `
1646
+ : gql`
1627
1647
  mutation confirmArrivalNotice($name: String!) {
1628
1648
  confirmArrivalNotice(name: $name) {
1629
1649
  name
@@ -1684,15 +1704,14 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1684
1704
  html`
1685
1705
  <buffer-location-selector
1686
1706
  @selected="${async e => {
1687
- this.bufferLocationField.value = `${e.detail.name} ${
1688
- e.detail.description ? `(${e.detail.description})` : ''
1707
+ this.bufferLocationField.value = `${e.detail.name} ${e.detail.description ? `(${e.detail.description})` : ''
1689
1708
  }`
1690
- this.bufferLocationField.setAttribute('location-id', e.detail.id)
1709
+ this.bufferLocationField.setAttribute('location-id', e.detail.id)
1691
1710
 
1692
- if (this._ganProcessingSetting == '1' || this._ganProcessingSetting == '2') {
1693
- await this._assignBufferLocation()
1694
- }
1695
- }}"
1711
+ if (this._ganProcessingSetting == '1' || this._ganProcessingSetting == '2') {
1712
+ await this._assignBufferLocation()
1713
+ }
1714
+ }}"
1696
1715
  ></buffer-location-selector>
1697
1716
  `,
1698
1717
  {
@@ -1835,9 +1854,9 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1835
1854
  .data="${this.productData}"
1836
1855
  .enableDirectInbound="${this.enableDirectInbound}"
1837
1856
  @completed="${() => {
1838
- this._fetchGAN()
1839
- this.updateContext()
1840
- }}"
1857
+ this._fetchGAN()
1858
+ this.updateContext()
1859
+ }}"
1841
1860
  ></proceed-edit-product-popup>
1842
1861
  `,
1843
1862
  {
@@ -1872,7 +1891,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1872
1891
  .data="${this.productData}"
1873
1892
  .enableDirectInbound="${this.enableDirectInbound}"
1874
1893
  ></view-product-changes-popup>
1875
- `,
1894
+ `,
1876
1895
  {
1877
1896
  backdrop: true,
1878
1897
  size: 'large',
@@ -59,8 +59,8 @@ export class ProceedEditProductPopup extends localize(i18next)(LitElement) {
59
59
  background-color: var(--button-container-background);
60
60
  height: var(--button-container-height);
61
61
  }
62
- [danger] {
63
- --mdc-theme-primary: var(--mdc-danger-button-primary-color);
62
+ mwc-button[danger] {
63
+ --mdc-theme-primary: var(--status-danger-color, #d14946) !important;
64
64
  }
65
65
  `
66
66
  ]
@@ -114,8 +114,9 @@ export class ProceedEditProductPopup extends localize(i18next)(LitElement) {
114
114
  ></mwc-button>
115
115
  <mwc-button
116
116
  raised
117
+ ?danger="${this._isAllProductsRemoved}"
117
118
  @click="${this._proceedExtraProducts.bind(this)}"
118
- label="${i18next.t('button.confirm')}"
119
+ label="${this._isAllProductsRemoved ? i18next.t('button.cancel_order') : i18next.t('button.confirm')}"
119
120
  ></mwc-button>
120
121
  </div>
121
122
  `
@@ -135,6 +136,40 @@ export class ProceedEditProductPopup extends localize(i18next)(LitElement) {
135
136
  return this.shadowRoot.querySelector('data-grist#reject-grist')
136
137
  }
137
138
 
139
+ get _isAllProductsRemoved() {
140
+ if (!this.approveGrist || !this.rejectGrist || !this.data || !this.data.records) return false
141
+
142
+ const totalProductCount = this.data.records.length
143
+ if (totalProductCount === 0) return false
144
+
145
+ let removeCount = 0
146
+
147
+ const approvedRecords = this.approveGrist.data.records || []
148
+ approvedRecords.forEach(record => {
149
+ const packQty =
150
+ record.adjustedPackQty !== undefined && record.adjustedPackQty !== null
151
+ ? record.adjustedPackQty
152
+ : record.packQty
153
+ const palletQty =
154
+ record.adjustedPalletQty !== undefined && record.adjustedPalletQty !== null
155
+ ? record.adjustedPalletQty
156
+ : record.palletQty
157
+
158
+ if (!packQty && !palletQty) {
159
+ removeCount++
160
+ }
161
+ })
162
+
163
+ const rejectedRecords = this.rejectGrist.data.records || []
164
+ rejectedRecords.forEach(record => {
165
+ if (record.status === ORDER_PRODUCT_STATUS.ADDED.value) {
166
+ removeCount++
167
+ }
168
+ })
169
+
170
+ return removeCount === totalProductCount
171
+ }
172
+
138
173
  updated(changedProps) {
139
174
  if (changedProps.has('data')) {
140
175
  this.approvedData = {
@@ -286,56 +321,56 @@ export class ProceedEditProductPopup extends localize(i18next)(LitElement) {
286
321
  ]
287
322
 
288
323
  function insertAfter(cols, anchorName, newCols) {
289
- const idx = cols.findIndex(c => c.name === anchorName)
290
- if (idx >= 0) cols.splice(idx + 1, 0, ...newCols)
291
- }
324
+ const idx = cols.findIndex(c => c.name === anchorName)
325
+ if (idx >= 0) cols.splice(idx + 1, 0, ...newCols)
326
+ }
292
327
 
293
- const expDateColumn = {
294
- type: 'date',
295
- name: 'expDate',
296
- header: i18next.t('field.exp_date'),
297
- width: 120
298
- }
328
+ const expDateColumn = {
329
+ type: 'date',
330
+ name: 'expDate',
331
+ header: i18next.t('field.exp_date'),
332
+ width: 120
333
+ }
299
334
 
300
- const adjustedExpDateColumn = {
301
- type: 'date',
302
- name: 'adjustedExpDate',
303
- header: i18next.t('field.adjusted_exp_date'),
304
- width: 120
305
- }
335
+ const adjustedExpDateColumn = {
336
+ type: 'date',
337
+ name: 'adjustedExpDate',
338
+ header: i18next.t('field.adjusted_exp_date'),
339
+ width: 120
340
+ }
306
341
 
307
- const locationColumn = {
308
- type: 'object',
309
- name: 'location',
310
- header: i18next.t('field.location'),
311
- width: 150
312
- }
342
+ const locationColumn = {
343
+ type: 'object',
344
+ name: 'location',
345
+ header: i18next.t('field.location'),
346
+ width: 150
347
+ }
313
348
 
314
- const adjustedLocationColumn = {
315
- type: 'object',
316
- name: 'adjustedLocation',
317
- header: i18next.t('field.adjusted_location'),
318
- width: 150
319
- }
349
+ const adjustedLocationColumn = {
350
+ type: 'object',
351
+ name: 'adjustedLocation',
352
+ header: i18next.t('field.adjusted_location'),
353
+ width: 150
354
+ }
320
355
 
321
- const warehouseColumn = {
322
- type: 'object',
323
- name: 'warehouse',
324
- header: i18next.t('field.warehouse'),
325
- width: 150
326
- }
356
+ const warehouseColumn = {
357
+ type: 'object',
358
+ name: 'warehouse',
359
+ header: i18next.t('field.warehouse'),
360
+ width: 150
361
+ }
327
362
 
328
- const adjustedWarehouseColumn = {
329
- type: 'object',
330
- name: 'adjustedWarehouse',
331
- header: i18next.t('field.adjusted_warehouse'),
332
- width: 150
333
- }
363
+ const adjustedWarehouseColumn = {
364
+ type: 'object',
365
+ name: 'adjustedWarehouse',
366
+ header: i18next.t('field.adjusted_warehouse'),
367
+ width: 150
368
+ }
334
369
 
335
- if (this.enableDirectInbound) {
336
- insertAfter(columns, 'adjustedPalletQty', [expDateColumn, adjustedExpDateColumn] )
337
- insertAfter(columns, 'adjustedBatchIdRef', [warehouseColumn, locationColumn, adjustedWarehouseColumn, adjustedLocationColumn])
338
- }
370
+ if (this.enableDirectInbound) {
371
+ insertAfter(columns, 'adjustedPalletQty', [expDateColumn, adjustedExpDateColumn])
372
+ insertAfter(columns, 'adjustedBatchIdRef', [warehouseColumn, locationColumn, adjustedWarehouseColumn, adjustedLocationColumn])
373
+ }
339
374
 
340
375
  this.config = this.productGristConfig = {
341
376
  list: {
@@ -414,8 +449,14 @@ export class ProceedEditProductPopup extends localize(i18next)(LitElement) {
414
449
  try {
415
450
  const result = await CustomAlert({
416
451
  title: i18next.t('title.are_you_sure'),
417
- text: i18next.t('text.you_wont_be_able_to_revert_this'),
418
- confirmButton: { text: i18next.t('button.confirm') },
452
+ type: this._isAllProductsRemoved ? 'warning' : 'question',
453
+ text: this._isAllProductsRemoved
454
+ ? i18next.t('text.approving_change_will_cancel_order_irreversible')
455
+ : i18next.t('text.you_wont_be_able_to_revert_this'),
456
+ confirmButton: {
457
+ text: this._isAllProductsRemoved ? i18next.t('button.cancel_order') : i18next.t('button.confirm'),
458
+ color: this._isAllProductsRemoved ? '#d14946' : '#22a6a7'
459
+ },
419
460
  cancelButton: { text: i18next.t('button.cancel') }
420
461
  })
421
462
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.776",
3
+ "version": "4.3.777",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -91,7 +91,7 @@
91
91
  "@things-factory/print-ui": "^4.3.767",
92
92
  "@things-factory/product-base": "^4.3.776",
93
93
  "@things-factory/resource-ui": "^4.3.770",
94
- "@things-factory/sales-ui": "^4.3.776",
94
+ "@things-factory/sales-ui": "^4.3.777",
95
95
  "@things-factory/scene-data-transform": "^4.3.767",
96
96
  "@things-factory/scene-excel": "^4.3.767",
97
97
  "@things-factory/scene-firebase": "^4.3.767",
@@ -108,7 +108,7 @@
108
108
  "@things-factory/transport-base": "^4.3.767",
109
109
  "@things-factory/tutorial-ui": "^4.3.767",
110
110
  "@things-factory/warehouse-base": "^4.3.776",
111
- "@things-factory/worksheet-base": "^4.3.776"
111
+ "@things-factory/worksheet-base": "^4.3.777"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.767",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "a2ad3248858837746d6c4f477bce580c604d1991"
120
+ "gitHead": "7f574cc7c94e99f728d7d0e732dffddf231ea0b5"
121
121
  }
@@ -994,7 +994,6 @@
994
994
  "label.manufacture_date": "manufacture date",
995
995
  "label.export": "export",
996
996
  "label.export_remark": "export remark",
997
- "label.export": "export",
998
997
  "label.fax": "fax",
999
998
  "label.fefo": "FEFO",
1000
999
  "label.fifo": "FIFO",
@@ -1365,6 +1364,7 @@
1365
1364
  "text.already_existed": "row {state.text} is already existed",
1366
1365
  "text.are_empty": "are empty",
1367
1366
  "text.are_you_sure_to_change_the_order_status_to_Done": "are you sure to change the to Done?",
1367
+ "text.approving_change_will_cancel_order_irreversible": "Approving this change will cancel the arrival order. You won't be able to revert this.",
1368
1368
  "text.arrival_notice_cancelled": "arrival notice cancelled",
1369
1369
  "text.arrival_notice_details_updated": "arrival notice details updated",
1370
1370
  "text.arrival_notice_form_invalid": "arrival notice form invalid",
@@ -2025,6 +2025,7 @@
2025
2025
  "text.you_wont_be_able_to_revert_this": "you won't be able to revert this",
2026
2026
  "text.you.are.now.in": "you are now in {state.text}",
2027
2027
  "text.your_work_has_completed": "your work has completed",
2028
+ "text.changing_all_product_quantities_to_0_will_cancel_order": "Changing all product quantities to 0 will cancel the order.",
2028
2029
  "text.zip/postal_code_is_empty_please_fill_in_the_data_before_proceed_create_order": "ZIP/Postal code is empty. please fill in the data before proceed create order.",
2029
2030
  "text.zone_picking": "zone picking",
2030
2031
  "text.no_products_found": "No Products Found",