@things-factory/operato-wms 4.3.137 → 4.3.139

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 (79) hide show
  1. package/client/pages/adjustment/transfer-inventory.js +14 -6
  2. package/client/pages/bulk-operation/bulk-operation.js +3 -1
  3. package/client/pages/components/select-inventory-popup.js +7 -1
  4. package/client/pages/components/select-product-popup.js +33 -3
  5. package/client/pages/constants/order.js +3 -1
  6. package/client/pages/inbound/external-return-worksheet.js +39 -2
  7. package/client/pages/inbound/undo-putaway-popup.js +5 -9
  8. package/client/pages/inbound/undo-unload-popup.js +42 -35
  9. package/client/pages/inbound/unload-product.js +79 -69
  10. package/client/pages/inventory/inventory-adjustment-approval.js +4 -5
  11. package/client/pages/inventory/inventory-adjustment.js +56 -2
  12. package/client/pages/inventory/inventory-by-product-detail.js +23 -17
  13. package/client/pages/inventory/inventory-by-product.js +7 -0
  14. package/client/pages/inventory/inventory-history-by-pallet.js +14 -5
  15. package/client/pages/inventory/inventory-history.js +10 -0
  16. package/client/pages/inventory-check/check-inventory-popup.js +1 -1
  17. package/client/pages/inventory-check/create-cycle-count.js +2 -3
  18. package/client/pages/inventory-check/inspecting-product.js +7 -3
  19. package/client/pages/manifest/create-loading-manifest.js +8 -1
  20. package/client/pages/manifest/loading-manifest-detail.js +7 -4
  21. package/client/pages/master/generate-location-list.js +30 -22
  22. package/client/pages/master/location-list.js +141 -70
  23. package/client/pages/master/pallet-list.js +137 -58
  24. package/client/pages/master/product/product-details-popup.js +3 -3
  25. package/client/pages/master/tote-list.js +40 -27
  26. package/client/pages/master/transport-driver.js +48 -41
  27. package/client/pages/master/transport-vehicle.js +45 -41
  28. package/client/pages/master/warehouse-list.js +56 -34
  29. package/client/pages/order/arrival-notice/arrival-notice-detail.js +36 -25
  30. package/client/pages/order/arrival-notice/create-arrival-notice.js +79 -97
  31. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +2 -0
  32. package/client/pages/order/arrival-notice/edit-product-popup.js +10 -8
  33. package/client/pages/order/draft-release-good/draft-release-good-detail.js +88 -4
  34. package/client/pages/order/draft-release-good/draft-release-good-list.js +1 -1
  35. package/client/pages/order/release-order/create-release-order.js +34 -9
  36. package/client/pages/order/release-order/release-extra-product-popup.js +4 -1
  37. package/client/pages/order/release-order/release-order-detail.js +40 -3
  38. package/client/pages/order/return-order/create-return-order.js +5 -0
  39. package/client/pages/order/return-order/return-order-inventory-popup.js +1 -0
  40. package/client/pages/order/return-order/return-order-requests.js +37 -2
  41. package/client/pages/order/transport-order/delivery-note-popup.js +30 -24
  42. package/client/pages/order/transport-order/delivery-order-list.js +27 -1
  43. package/client/pages/outbound/inventory-reassign-popup.js +7 -3
  44. package/client/pages/outbound/packing-product.js +7 -7
  45. package/client/pages/outbound/packing-worksheet-list.js +3 -1
  46. package/client/pages/outbound/picking-product.js +17 -5
  47. package/client/pages/outbound/serial-number-popup.js +1 -1
  48. package/client/pages/outbound/show-my-worksheet-list-popup.js +12 -3
  49. package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +5 -2
  50. package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +2 -2
  51. package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +34 -8
  52. package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +42 -4
  53. package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +46 -4
  54. package/client/pages/report/volume-summary-report.js +8 -3
  55. package/config.development.js +28 -21
  56. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +6 -5
  57. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
  58. package/dist-server/graphql/resolvers/other/add-release-good-products.js +7 -11
  59. package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -1
  60. package/dist-server/graphql/resolvers/reports/costing-report.js +18 -24
  61. package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
  62. package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +6 -6
  63. package/dist-server/graphql/resolvers/reports/inbound-serial-number-report.js +1 -1
  64. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +8 -9
  65. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  66. package/dist-server/graphql/resolvers/reports/release-inventory-report.js +3 -3
  67. package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +1 -1
  68. package/package.json +24 -24
  69. package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +6 -5
  70. package/server/graphql/resolvers/other/add-release-good-products.ts +8 -12
  71. package/server/graphql/resolvers/reports/costing-report.ts +18 -24
  72. package/server/graphql/resolvers/reports/inbound-order-details-report.ts +6 -6
  73. package/server/graphql/resolvers/reports/inbound-serial-number-report.ts +1 -1
  74. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +8 -9
  75. package/server/graphql/resolvers/reports/release-inventory-report.ts +6 -4
  76. package/translations/en.json +28 -3
  77. package/translations/ko.json +26 -2
  78. package/translations/ms.json +26 -2
  79. package/translations/zh.json +26 -2
@@ -114,6 +114,12 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
114
114
  this._cartonLabel = (cartonLabelSetting && cartonLabelSetting.board) || {}
115
115
  }
116
116
 
117
+ pageUpdated(changes, lifecycle) {
118
+ if (this.active) {
119
+ this.dataGrist.fetch()
120
+ }
121
+ }
122
+
117
123
  render() {
118
124
  return html`
119
125
  <search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.dataGrist.fetch()}></search-form>
@@ -586,6 +592,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
586
592
  isRequireSerialNumberScanningOutbound
587
593
  isRequireSerialNumberScanningInbound
588
594
  }
595
+ productDetail {
596
+ id
597
+ }
589
598
  qty
590
599
  lockedQty
591
600
  warehouse {
@@ -654,6 +663,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
654
663
  description
655
664
  productInformation
656
665
  }
666
+ productDetail {
667
+ id
668
+ }
657
669
  qty
658
670
  lockedQty
659
671
  warehouse {
@@ -749,6 +761,11 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
749
761
  }
750
762
 
751
763
  switch (e.detail.column.name) {
764
+ case 'batchId':
765
+ if(e.detail.after == '' || e.detail.after == null || e.detail.after.toString() == NaN.toString()){
766
+ item._data.records[e.detail.row].batchId = e.detail.before
767
+ this.showToast({ level: 'error', message: i18next.t('text.invalid_batch_no') })
768
+ }
752
769
  case 'uomValue':
753
770
  if (e.detail.after < 0 || e.detail.after.toString() == NaN.toString()) {
754
771
  item._data.records[e.detail.row].uomValue = e.detail.before
@@ -768,7 +785,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
768
785
  }
769
786
  break
770
787
  case 'packingSize':
771
- if (e.detail.after < 0 || !Number.isInteger(e.detail.after)) {
788
+ if (e.detail.after <= 0 || !Number.isInteger(e.detail.after)) {
772
789
  item._data.records[e.detail.row].packingSize = e.detail.before
773
790
  this.showToast({ level: 'error', message: i18next.t('text.invalid_packing_size') })
774
791
  }
@@ -781,7 +798,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
781
798
  break
782
799
  case 'manufactureDate':
783
800
  if (new Date(e.detail.after) > new Date()) {
784
- item._data.records[e.detail.row].manufactureDate = e.detail.before
801
+ // item._data.records[e.detail.row].manufactureDate = null
785
802
  this.showToast({ message: i18next.t('text.invalid_manufacture_date') })
786
803
  }
787
804
  break
@@ -869,6 +886,10 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
869
886
  delete row.productUomValue
870
887
  delete row.inventoryItemCount
871
888
 
889
+ if (new Date(row.expirationDate) < new Date()){
890
+ throw new Error(i18next.t('text.invalid_expiration_date'))
891
+ }
892
+
872
893
  if (row.cuFlag == '+') {
873
894
  if (
874
895
  !row.bizplace ||
@@ -898,6 +919,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
898
919
 
899
920
  row.bizplace = row.bizplace ? { id: row.bizplace.id } : undefined
900
921
  row.location = row.location ? { id: row.location.id } : undefined
922
+ row.productDetailId = row.product ? row.product.id : undefined
901
923
  row.product = row.product ? { id: row.product.productId } : undefined
902
924
  row.uomValue = row.uomValue ? parseFloat(row.uomValue) : undefined
903
925
  row.unitCost = row.unitCost ? parseFloat(row.unitCost) : undefined
@@ -910,6 +932,10 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
910
932
  return row
911
933
  })
912
934
 
935
+ if (patches.length == 0){
936
+ this.showToast({ message: i18next.t('text.nothing_updated') })
937
+ }
938
+
913
939
  if (patches && patches.length) {
914
940
  const validateInventoryChanges = await client.query({
915
941
  query: gql`
@@ -949,6 +975,30 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
949
975
  async importHandler(patches) {
950
976
  try {
951
977
  patches.map(itm => {
978
+ if (itm?.uomValue < 0 || itm?.uommValue?.toString() == NaN.toString()) {
979
+ throw new Error(i18next.t('text.invalid_uom_value'))
980
+ }
981
+ if (itm?.qty < 0) {
982
+ throw new Error(i18next.t('text.invalid_qty'))
983
+ }
984
+ if (itm?.packingType?.trim() == '') {
985
+ throw new Error(i18next.t('text.invalid_packing_type'))
986
+ }
987
+ if (itm?.packingSize <= 0) {
988
+ throw new Error(i18next.t('text.invalid_packing_size'))
989
+ }
990
+ if (itm?.unitCost < 0) {
991
+ throw new Error(i18next.t('text.invalid_unit_cost'))
992
+ }
993
+ if (new Date(itm?.manufactureDate) > new Date()) {
994
+ throw new Error(i18next.t('text.invalid_manufacture_date'))
995
+ }
996
+ if (itm.expirationDate != null){
997
+ if (new Date(itm.expirationDate) < new Date()){
998
+ throw new Error(i18next.t('text.invalid_expiration_date'))
999
+ }
1000
+ }
1001
+
952
1002
  if (itm.cuFlag == '+') {
953
1003
  if (
954
1004
  !itm.bizplace?.id ||
@@ -1011,6 +1061,10 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1011
1061
  if (itm.serialNumbers) {
1012
1062
  let serialNumbers = itm.serialNumbers
1013
1063
  itm.serialNumbers = serialNumbers.replace(' ', '')
1064
+
1065
+ if (itm.serialNumbers.split(',').length != itm.qty) {
1066
+ throw new Error(i18next.t('text.serial_number_not_tally_with_qty'))
1067
+ }
1014
1068
  }
1015
1069
  })
1016
1070
 
@@ -3,9 +3,16 @@ import '@things-factory/grist-ui'
3
3
  import './inventory-history-by-pallet'
4
4
 
5
5
  import gql from 'graphql-tag'
6
- import { css, html, LitElement } from 'lit-element'
6
+ import {
7
+ css,
8
+ html,
9
+ LitElement
10
+ } from 'lit-element'
7
11
 
8
- import { i18next, localize } from '@things-factory/i18n-base'
12
+ import {
13
+ i18next,
14
+ localize
15
+ } from '@things-factory/i18n-base'
9
16
  import { openPopup } from '@things-factory/layout-base'
10
17
  import { client } from '@things-factory/shell'
11
18
  import { ScrollbarStyles } from '@things-factory/styles'
@@ -82,19 +89,19 @@ class InventoryByProductDetail extends localize(i18next)(LitElement) {
82
89
  queryName: 'locations',
83
90
  field: 'name'
84
91
  },
85
- {
86
- label: i18next.t('field.expirying_in'),
87
- name: 'expiryingIn',
88
- type: 'select',
89
- options: [
90
- { value: '' },
91
- { name: i18next.t('text.3_months'), value: '3 months' },
92
- { name: i18next.t('text.6_months'), value: '6 months' },
93
- { name: i18next.t('text.9_months'), value: '9 months' },
94
- { name: i18next.t('text.12_months'), value: '12 months' }
95
- ],
96
- props: { searchOper: 'eq' }
97
- },
92
+ // {
93
+ // label: i18next.t('field.expiring_in'),
94
+ // name: 'expiringIn',
95
+ // type: 'select',
96
+ // options: [
97
+ // { value: '' },
98
+ // { name: i18next.t('text.3_months'), value: '3 months' },
99
+ // { name: i18next.t('text.6_months'), value: '6 months' },
100
+ // { name: i18next.t('text.9_months'), value: '9 months' },
101
+ // { name: i18next.t('text.12_months'), value: '12 months' }
102
+ // ],
103
+ // props: { searchOper: 'eq' }
104
+ // },
98
105
  {
99
106
  label: i18next.t('field.has_balance'),
100
107
  name: 'remainOnly',
@@ -229,7 +236,7 @@ class InventoryByProductDetail extends localize(i18next)(LitElement) {
229
236
  description
230
237
  }
231
238
  uom
232
- remainQty
239
+ lockedQty
233
240
  qty
234
241
  uomValue
235
242
  batchIdRef
@@ -258,7 +265,6 @@ class InventoryByProductDetail extends localize(i18next)(LitElement) {
258
265
  response.data.inventories.items.map(item => {
259
266
  return {
260
267
  ...item,
261
- lockedQty: item.qty - item.remainQty,
262
268
  remainingQty: item.remainQty,
263
269
  uomValue: `${item.uomValue} ${item.uom}`
264
270
  }
@@ -133,6 +133,12 @@ class InventoryByProduct extends localize(i18next)(PageView) {
133
133
  type: 'string',
134
134
  props: { searchOper: 'eq' }
135
135
  },
136
+ {
137
+ label: i18next.t('field.expiry_date'),
138
+ name: 'expirationDate',
139
+ type: 'date',
140
+ props: { searchOper: 'eq' }
141
+ },
136
142
  {
137
143
  label: i18next.t('field.available_qty_only'),
138
144
  name: 'availableStock',
@@ -350,6 +356,7 @@ class InventoryByProduct extends localize(i18next)(PageView) {
350
356
  quarantineQty
351
357
  reserveQty
352
358
  draftQty
359
+ expirationDate
353
360
  warehouseQty
354
361
  }
355
362
  total
@@ -1,11 +1,20 @@
1
1
  import '@material/mwc-button/mwc-button'
2
2
  import '@things-factory/grist-ui'
3
- import { i18next, localize } from '@things-factory/i18n-base'
3
+
4
+ import gql from 'graphql-tag'
5
+ import {
6
+ css,
7
+ html,
8
+ LitElement
9
+ } from 'lit-element'
10
+
11
+ import {
12
+ i18next,
13
+ localize
14
+ } from '@things-factory/i18n-base'
4
15
  import { client } from '@things-factory/shell'
5
- import { isMobileDevice } from '@things-factory/utils'
6
16
  import { ScrollbarStyles } from '@things-factory/styles'
7
- import gql from 'graphql-tag'
8
- import { css, html, LitElement } from 'lit-element'
17
+ import { isMobileDevice } from '@things-factory/utils'
9
18
 
10
19
  class InventoryHistoryByPallet extends localize(i18next)(LitElement) {
11
20
  static get styles() {
@@ -173,7 +182,7 @@ class InventoryHistoryByPallet extends localize(i18next)(LitElement) {
173
182
  },
174
183
  {
175
184
  type: 'string',
176
- name: 'description',
185
+ name: 'transactionType',
177
186
  header: i18next.t('field.transaction_type'),
178
187
  sortable: true,
179
188
  width: 150
@@ -429,10 +429,20 @@ class InventoryHistory extends localize(i18next)(PageView) {
429
429
  inventoryHistory[filter.name] = toDt.toISOString()
430
430
  break
431
431
  default:
432
+ if (filter.operator == 'i_like') {
433
+ filter.value = `%${filter.value.replaceAll('%', '').trim()}%`
434
+ } else {
435
+ filter.value = filter.value.trim()
436
+ }
432
437
  inventoryHistory[filter.name] = filter.value
433
438
  break
434
439
  }
435
440
  } else {
441
+ if (filter.operator == 'i_like') {
442
+ filter.value = `%${filter.value.replaceAll('%', '').trim()}%`
443
+ } else {
444
+ filter.value = filter.value.trim()
445
+ }
436
446
  filters.push(filter)
437
447
  }
438
448
  })
@@ -124,7 +124,7 @@ class CheckInventoryPopup extends localize(i18next)(LitElement) {
124
124
 
125
125
  async _checkPalletId() {
126
126
  try {
127
- this._validateInput()
127
+ await this._validateInput()
128
128
 
129
129
  const isInventoryOwner = await this._checkInventoryOwnership(this.palletIdInput.value, this.bizplaceName)
130
130
  if (!isInventoryOwner)
@@ -166,6 +166,7 @@ class CreateCycleCount extends localize(i18next)(PageView) {
166
166
  descriptionField: 'productName',
167
167
  select: [
168
168
  { name: 'productId', hidden: true },
169
+ { name: 'productDetailId', hidden: true },
169
170
  { name: 'remainUomValue', hidden: true },
170
171
  { name: 'uom', hidden: true },
171
172
  { name: 'batchId', header: i18next.t('field.batch_id') },
@@ -553,9 +554,7 @@ class CreateCycleCount extends localize(i18next)(PageView) {
553
554
  return {
554
555
  batchId: itm.batchId,
555
556
  batchIdRef: itm.batchIdRef,
556
- packingSize: itm.packingSize,
557
- packingType: itm.packingType,
558
- productId: itm.productId
557
+ productDetailId: itm.productDetailId
559
558
  }
560
559
  }) || []
561
560
 
@@ -820,7 +820,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
820
820
 
821
821
  async addExtraPallet() {
822
822
  try {
823
- this.checkInputFormValidity()
823
+ await this.checkInputFormValidity()
824
824
 
825
825
  const palletId = this.palletIdInput.value
826
826
 
@@ -1013,7 +1013,11 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
1013
1013
  try {
1014
1014
  const filters = [
1015
1015
  { name: 'inventoryId', operator: 'eq', value: this.selectedInventory.inventoryId },
1016
- { name: 'status', operator: 'noteq', value: ORDER_INVENTORY_STATUS.TERMINATED.value },
1016
+ {
1017
+ name: 'status',
1018
+ operator: 'notin',
1019
+ value: [ORDER_INVENTORY_STATUS.TERMINATED.value, ORDER_INVENTORY_STATUS.CANCELLED.value]
1020
+ },
1017
1021
  { name: 'type', operator: 'eq', value: ORDER_TYPES.RELEASE_OF_GOODS.value }
1018
1022
  ]
1019
1023
 
@@ -1135,7 +1139,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
1135
1139
 
1136
1140
  async submitInventoryCheck() {
1137
1141
  try {
1138
- this.checkInputFormValidity()
1142
+ await this.checkInputFormValidity()
1139
1143
 
1140
1144
  let { inspectedBatchNo, inspectedQty, inspectedUomValue } = Object.fromEntries(
1141
1145
  new FormData(this.inputForm).entries()
@@ -218,6 +218,7 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
218
218
  name
219
219
  }
220
220
  status
221
+ manifestedAt
221
222
  }
222
223
  }
223
224
  `,
@@ -247,9 +248,15 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
247
248
  }
248
249
  }
249
250
 
251
+ if (releaseGood.manifestedAt != null){
252
+ this._showToast({ message: i18next.t('text.tracking_no_already_exist_in_other_manifest_list') })
253
+ return
254
+ }
255
+
250
256
  manifestItems.push({ ...releaseGood, bizplaceName: releaseGood.bizplace.name, orderNo: releaseGood.refNo })
251
257
  this.shippingData = { records: manifestItems }
252
- } else {
258
+ }
259
+ else {
253
260
  this._showToast({ message: i18next.t('text.tracking_no_already_exist_in_manifest_list') })
254
261
  }
255
262
 
@@ -503,10 +503,10 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
503
503
  }
504
504
 
505
505
  async _validateOrderStatus() {
506
- let foundCancelOrder = this.shippingData.records.filter(
507
- itm => itm.orderStatus == ORDER_STATUS.PENDING_CANCEL || itm.orderStatus == ORDER_STATUS.CANCELLED
506
+ let foundCancelOrder = this.shippingData.records.some(
507
+ itm => itm.orderStatus == ORDER_STATUS.PENDING_CANCEL.value || itm.orderStatus == ORDER_STATUS.CANCELLED.value
508
508
  )
509
- if (foundCancelOrder?.length > 0) {
509
+ if (foundCancelOrder) {
510
510
  const answer = await CustomAlert({
511
511
  title: i18next.t('title.do_you_wish_to_proceed'),
512
512
  text: i18next.t('text.parcels_are_found_with_cancelled_or_pending_cancelled_status'),
@@ -543,7 +543,10 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
543
543
  if (!response.error) {
544
544
  let releaseGood = response.data.releaseGood
545
545
 
546
- if (releaseGood?.status === ORDER_STATUS.CANCELLED || releaseGood?.status === ORDER_STATUS.PENDING_CANCEL) {
546
+ if (
547
+ releaseGood?.status === ORDER_STATUS.CANCELLED.value ||
548
+ releaseGood?.status === ORDER_STATUS.PENDING_CANCEL.value
549
+ ) {
547
550
  let answer = await CustomAlert({
548
551
  type: 'warning',
549
552
  title: i18next.t('title.order(s)_is_at_pending_cancelled_or_cancelled'),
@@ -6,6 +6,7 @@ import { i18next, localize } from '@things-factory/i18n-base'
6
6
  import { isMobileDevice } from '@things-factory/utils'
7
7
  import { ScrollbarStyles } from '@things-factory/styles'
8
8
  import { css, html, LitElement } from 'lit-element'
9
+ import { showToast } from '../../util'
9
10
 
10
11
  export class GenerateLocationList extends localize(i18next)(LitElement) {
11
12
  static get properties() {
@@ -337,39 +338,46 @@ export class GenerateLocationList extends localize(i18next)(LitElement) {
337
338
  }
338
339
 
339
340
  _validateGenerator() {
340
- let dataFromGrist = this.data.records
341
- let validationError = false
342
- for (let x = 1; x < dataFromGrist.length; x++) {
343
- if (dataFromGrist[x].start <= dataFromGrist[x - 1].end) {
341
+ try {
342
+ if (!this._selectedFormat) {
343
+ throw new Error(i18next.t('text.select_location_format'))
344
+ }
345
+ let dataFromGrist = this.data.records
346
+ let validationError = false
347
+ for (let x = 1; x < dataFromGrist.length; x++) {
348
+ if (dataFromGrist[x].start <= dataFromGrist[x - 1].end) {
349
+ document.dispatchEvent(
350
+ new CustomEvent('notify', {
351
+ detail: {
352
+ level: 'error',
353
+ message: i18next.t('text.already_existed', {
354
+ state: {
355
+ text: dataFromGrist[x].start
356
+ }
357
+ })
358
+ }
359
+ })
360
+ )
361
+ validationError = true
362
+ }
363
+ }
364
+
365
+ if (this._zoneName === '') {
344
366
  document.dispatchEvent(
345
367
  new CustomEvent('notify', {
346
368
  detail: {
347
369
  level: 'error',
348
- message: i18next.t('text.already_existed', {
349
- state: {
350
- text: dataFromGrist[x].start
351
- }
352
- })
370
+ message: i18next.t('text.missing_zone_name')
353
371
  }
354
372
  })
355
373
  )
356
374
  validationError = true
357
375
  }
358
- }
359
376
 
360
- if (this._zoneName === '') {
361
- document.dispatchEvent(
362
- new CustomEvent('notify', {
363
- detail: {
364
- level: 'error',
365
- message: i18next.t('text.missing_zone_name')
366
- }
367
- })
368
- )
369
- validationError = true
377
+ if (!validationError) this._generateLocationList()
378
+ } catch (e) {
379
+ showToast(e)
370
380
  }
371
-
372
- if (!validationError) this._generateLocationList()
373
381
  }
374
382
 
375
383
  async _generateLocationList() {