@things-factory/operato-wms 4.0.37 → 4.0.41

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 (37) hide show
  1. package/client/bootstrap.js +24 -1
  2. package/client/pages/bulk-operation/bulk-operation.js +4 -3
  3. package/client/pages/bulk-operation/validate-gan-popup.js +10 -2
  4. package/client/pages/bulk-operation/validate-ro-popup.js +3 -5
  5. package/client/pages/components/popup-reusable-pallet.js +0 -1
  6. package/client/pages/inbound/putaway-product.js +45 -38
  7. package/client/pages/inbound/unload-product.js +27 -27
  8. package/client/pages/inventory/inventory-adjustment.js +22 -26
  9. package/client/pages/inventory/inventory-by-product.js +0 -12
  10. package/client/pages/manifest/create-loading-manifest.js +1 -1
  11. package/client/pages/manifest/loading-manifest-list.js +3 -3
  12. package/client/pages/order/arrival-notice/assign-buffer-location.js +24 -9
  13. package/client/pages/order/arrival-notice/create-arrival-notice.js +1 -1
  14. package/client/pages/order/release-order/b2b/b2b-order-list.js +12 -1
  15. package/client/pages/order/release-order/b2c/b2c-order-requests.js +55 -3
  16. package/client/pages/order/release-order/create-release-order.js +14 -0
  17. package/client/pages/order/release-order/release-order-detail.js +2 -1
  18. package/client/pages/order/transport-order/contact-point-selector-popup.js +11 -10
  19. package/client/pages/outbound/picking-product.js +3 -1
  20. package/client/pages/outbound/single-outbound-worksheet.js +3 -3
  21. package/client/pages/outbound/worksheet-picking.js +1 -1
  22. package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +5 -1
  23. package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +1 -1
  24. package/client/pages/report/custom-elccl/elccl-inventory-report.js +13 -1
  25. package/client/pages/report/inventory-report.js +1 -0
  26. package/client/pages/report/product-label-report.js +0 -39
  27. package/config.development.js +73 -0
  28. package/config.production.js +113 -0
  29. package/helps/release-note.ko.md +3 -0
  30. package/helps/release-note.md +3 -0
  31. package/helps/release-note.ms.md +3 -0
  32. package/helps/release-note.zh.md +3 -0
  33. package/package.json +65 -65
  34. package/translations/en.json +9 -1
  35. package/translations/ko.json +9 -1
  36. package/translations/ms.json +9 -1
  37. package/translations/zh.json +9 -1
@@ -1,5 +1,6 @@
1
1
  import '@things-factory/barcode-base'
2
2
  import '@things-factory/notification'
3
+ import '@things-factory/system-ui'
3
4
 
4
5
  import gql from 'graphql-tag'
5
6
  import { html } from 'lit-element'
@@ -8,12 +9,14 @@ import { registerDefaultGroups } from '@operato/board/register-default-groups.js
8
9
  import { APPEND_APP_TOOL } from '@things-factory/apptool-base'
9
10
  import { auth } from '@things-factory/auth-base'
10
11
  import { setAuthManagementMenus } from '@things-factory/auth-ui'
11
- import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@things-factory/layout-base'
12
+ import { i18next } from '@things-factory/i18n-base'
13
+ import { appendViewpart, openPopup, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@things-factory/layout-base'
12
14
  import { updateMenuProvider } from '@things-factory/menu-base'
13
15
  import { USE_ROLE_BY_MENUS_MANAGEMENT } from '@things-factory/menu-base/client/actions/menu'
14
16
  import { ADD_MORENDA } from '@things-factory/more-base'
15
17
  import { ADD_REFRESH_HANDLER, ADD_SETTING } from '@things-factory/setting-base'
16
18
  import { client, navigate, store, UPDATE_BASE_URL } from '@things-factory/shell'
19
+ import { ReleaseNoteNotice } from '@things-factory/system-ui/client/viewparts/release-note-notice'
17
20
  import { isMobileDevice } from '@things-factory/utils'
18
21
 
19
22
  import { UPDATE_DASHBOARD_SETTINGS } from './actions/dashboard-settings'
@@ -81,6 +84,14 @@ export default function bootstrap() {
81
84
  }
82
85
  })
83
86
 
87
+ store.dispatch({
88
+ type: ADD_SETTING,
89
+ setting: {
90
+ seq: 30,
91
+ template: html` <release-note-setting-let></release-note-setting-let> `
92
+ }
93
+ })
94
+
84
95
  store.dispatch({
85
96
  type: ADD_MORENDA,
86
97
  morenda: {
@@ -162,6 +173,18 @@ export default function bootstrap() {
162
173
  })
163
174
 
164
175
  store.dispatch({ type: USE_ROLE_BY_MENUS_MANAGEMENT })
176
+
177
+ if (!ReleaseNoteNotice.seen) {
178
+ i18next.on('initialized', () =>
179
+ setTimeout(() => {
180
+ openPopup(html` <release-note-notice></release-note-notice> `, {
181
+ backdrop: true,
182
+ size: 'large',
183
+ title: i18next.t('title.release-note')
184
+ })
185
+ }, 1000)
186
+ )
187
+ }
165
188
  }
166
189
 
167
190
  async function loadOpaAppSettings() {
@@ -175,7 +175,7 @@ class BulkOperation extends localize(i18next)(PageView) {
175
175
  importCargo: false,
176
176
  sku: '',
177
177
  batchId: '',
178
- batchRefNo: '',
178
+ batchIdRef: '',
179
179
  packingType: '',
180
180
  packingSize: 0,
181
181
  uom: '',
@@ -362,6 +362,7 @@ class BulkOperation extends localize(i18next)(PageView) {
362
362
  containerSize: String(raw.containerSize || ''),
363
363
  sku: String(raw.sku || ''),
364
364
  batchId: String(raw.batchId || ''),
365
+ batchIdRef: String(raw.batchIdRef || ''),
365
366
  packingType: raw.packingType && raw.packingType != '' ? String(raw.packingType) : null,
366
367
  packingSize: !isNaN(Number(raw.packingSize || 'x')) ? Number(raw.packingSize) : null,
367
368
  uom: raw.uom && raw.uom != '' ? String(raw.uom) : null,
@@ -411,8 +412,8 @@ class BulkOperation extends localize(i18next)(PageView) {
411
412
  packingSize: !isNaN(Number(record.packingSize || 'x')) ? Number(record.packingSize) : null,
412
413
  uom: record.uom && record.uom != '' ? String(record.uom) : null,
413
414
  releaseQty: Number(record.releaseQty),
414
- postalCode: String(record.postalCode),
415
- phone1: String(record.phone1),
415
+ postalCode: String(record.postalCode || ''),
416
+ phone1: String(record.phone1 || ''),
416
417
  exportOption: false
417
418
  }
418
419
  })}
@@ -71,7 +71,7 @@ class ValidateGanPopup extends localize(i18next)(LitElement) {
71
71
  appendable: false,
72
72
  classifier: (record, rowIndex) => {
73
73
  return {
74
- emphasized: record.remark && record.remark != ''
74
+ emphasized: record.errorMsg && record.errorMsg != ''
75
75
  }
76
76
  }
77
77
  },
@@ -162,6 +162,12 @@ class ValidateGanPopup extends localize(i18next)(LitElement) {
162
162
  header: i18next.t('field.batch_no'),
163
163
  width: 150
164
164
  },
165
+ {
166
+ type: 'string',
167
+ name: 'batchIdRef',
168
+ header: i18next.t('field.batch_no_ref'),
169
+ width: 150
170
+ },
165
171
  {
166
172
  type: 'integer',
167
173
  name: 'packQty',
@@ -276,6 +282,7 @@ class ValidateGanPopup extends localize(i18next)(LitElement) {
276
282
  sku
277
283
  productInfo
278
284
  batchId
285
+ batchIdRef
279
286
  packingType
280
287
  packingSize
281
288
  uom
@@ -332,6 +339,7 @@ class ValidateGanPopup extends localize(i18next)(LitElement) {
332
339
  containerSize: raw.containerSize,
333
340
  sku: raw.sku,
334
341
  batchId: raw.batchId,
342
+ batchIdRef: raw.batchIdRef,
335
343
  packingType: raw.packingType,
336
344
  packingSize: raw.packingSize,
337
345
  uom: raw.uom,
@@ -364,7 +372,7 @@ class ValidateGanPopup extends localize(i18next)(LitElement) {
364
372
  }
365
373
 
366
374
  _validateArrivalNotices() {
367
- if (this.records.some(record => record.remark && record.remark != '')) {
375
+ if (this.records.some(record => record.errorMsg && record.errorMsg != '')) {
368
376
  throw new Error(i18next.t('text.please_recheck_your_request_data'))
369
377
  }
370
378
  }
@@ -367,11 +367,9 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
367
367
  this._showToast({ message: i18next.t('text.release_order_created') })
368
368
  history.back()
369
369
  } else {
370
- let insufficientStockError = response.errors.find(err => err.extensions.exception.errorCode == 'ins1')
371
- if (insufficientStockError) {
372
- // if system suddenly found that any item is insufficient,
373
- // display the available items again.
374
- await this._getAvailableItems(this.records, this.bizplaceId)
370
+ let invalidDataError = response.errors.find(err => err.extensions.exception.errorCode == 'ivd1')
371
+ if (invalidDataError) {
372
+ this.records = JSON.parse(invalidDataError.extensions.exception.detail.data)
375
373
  this._showToast({ message: i18next.t('text.please_recheck_your_request_data') })
376
374
  }
377
375
  }
@@ -93,7 +93,6 @@ class PopupReusablePallet extends localize(i18next)(LitElement) {
93
93
  label="${i18next.t('button.disable')}"
94
94
  ></mwc-button>
95
95
  </div>
96
- }
97
96
  `
98
97
  }
99
98
 
@@ -206,7 +206,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
206
206
  <barcode-scanable-input name="cartonId" custom-input></barcode-scanable-input>
207
207
  `
208
208
  : html`
209
- <label>${i18next.t('label.lot_barcode')}</label>
209
+ <label>${i18next.t('label.lot_id')}</label>
210
210
  <barcode-scanable-input name="palletId" .value=${this._pallet} custom-input></barcode-scanable-input>
211
211
  `}
212
212
  ${this._operationType === OPERATION_TYPE.PUTAWAY
@@ -716,23 +716,19 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
716
716
  const locationDetails = await this._fetchLocation(this.locationInput.value.trim())
717
717
 
718
718
  if (this._enableCartonLabel) {
719
- let worksheetDetail = this._getSelectedOrderProducts(this.cartonInput.value)
720
- worksheetDetailNames.push(worksheetDetail[0].name)
721
- if (worksheetDetail[0].expirationDate) {
722
- await this._checkExpiry(
723
- worksheetDetail[0].expirationPeriod,
724
- new Date(worksheetDetail[0].expirationDate),
725
- locationDetails.type
726
- )
719
+ let worksheetDetails = this._getSelectedOrderProducts(this.cartonInput.value)
720
+ worksheetDetails.forEach(itm => {
721
+ worksheetDetailNames.push(itm.name)
722
+ })
723
+ if (worksheetDetails.find(itm => itm.expirationDate)) {
724
+ let answer = await this._checkExpiry(worksheetDetails, locationDetails.type)
725
+ if (!answer?.value) return (this._scanning = false)
727
726
  }
728
727
  } else {
729
728
  worksheetDetailNames.push(this._selectedOrderProduct.name)
730
729
  if (this._selectedOrderProduct.expirationDate) {
731
- await this._checkExpiry(
732
- this._selectedOrderProduct.expirationPeriod,
733
- new Date(this._selectedOrderProduct.expirationDate),
734
- locationDetails.type
735
- )
730
+ let answer = await this._checkExpiry(this._selectedOrderProduct, locationDetails.type)
731
+ if (!answer?.value) return (this._scanning = false)
736
732
  }
737
733
  }
738
734
 
@@ -797,23 +793,19 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
797
793
  const locationDetails = await this._fetchLocation(this.locationInput.value.trim())
798
794
 
799
795
  if (this._enableCartonLabel) {
800
- let worksheetDetail = this._getSelectedOrderProducts(this.cartonInput.value)
801
- worksheetDetailNames.push(worksheetDetail[0].name)
802
- if (worksheetDetail[0].expirationDate) {
803
- await this._checkExpiry(
804
- worksheetDetail[0].expirationPeriod,
805
- new Date(worksheetDetail[0].expirationDate),
806
- locationDetails.type
807
- )
796
+ let worksheetDetails = this._getSelectedOrderProducts(this.cartonInput.value)
797
+ worksheetDetails.forEach(itm => {
798
+ worksheetDetailNames.push(itm.name)
799
+ })
800
+ if (worksheetDetails.find(itm => itm.expirationDate)) {
801
+ let answer = await this._checkExpiry(worksheetDetails, locationDetails.type)
802
+ if (!answer?.value) return (this._scanning = false)
808
803
  }
809
804
  } else {
810
805
  worksheetDetailNames.push(this._selectedOrderProduct.name)
811
806
  if (this._selectedOrderProduct.expirationDate) {
812
- await this._checkExpiry(
813
- this._selectedOrderProduct.expirationPeriod,
814
- new Date(this._selectedOrderProduct.expirationDate),
815
- locationDetails.type
816
- )
807
+ let answer = await this._checkExpiry(this._selectedOrderProduct, locationDetails.type)
808
+ if (!answer?.value) return (this._scanning = false)
817
809
  }
818
810
  }
819
811
 
@@ -890,8 +882,10 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
890
882
  if (!this.incompleteLocationName) {
891
883
  let worksheetDetailNames = []
892
884
  if (this._enableCartonLabel) {
893
- const selectedWorksheetDetailName = this._getSelectedOrderProducts(this.cartonInput.value)
894
- worksheetDetailNames.push(selectedWorksheetDetailName[0].name)
885
+ let worksheetDetails = this._getSelectedOrderProducts(this.cartonInput.value)
886
+ worksheetDetails.forEach(itm => {
887
+ worksheetDetailNames.push(itm.name)
888
+ })
895
889
  } else worksheetDetailNames.push(this._selectedOrderProduct.name)
896
890
 
897
891
  const response = await client.mutate({
@@ -977,11 +971,15 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
977
971
  }
978
972
  }
979
973
 
980
- async _expiryAlert() {
981
- await CustomAlert({
974
+ async _expiryAlert(expiringProducts) {
975
+ const answer = await CustomAlert({
982
976
  title: i18next.t('title.location_scanned_is_not_a_quarantine_zone'),
983
- confirmButton: { text: i18next.t('button.confirm') }
977
+ text: i18next.t('text.x_is_expiring', { x: expiringProducts }),
978
+ confirmButton: { text: i18next.t('button.confirm') },
979
+ cancelButton: { text: i18next.t('button.cancel') }
984
980
  })
981
+
982
+ return answer
985
983
  }
986
984
 
987
985
  _getSelectedOrderProducts(scannedCartonId) {
@@ -991,7 +989,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
991
989
  return {
992
990
  name: record.name,
993
991
  expirationDate: record.expirationDate,
994
- expirationPeriod: record.product.expirationPeriod
992
+ expirationPeriod: record.product.expirationPeriod,
993
+ palletId: record.palletId
995
994
  }
996
995
  })
997
996
  }
@@ -1048,13 +1047,21 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1048
1047
  }
1049
1048
  }
1050
1049
 
1051
- async _checkExpiry(expirationPeriod, expiryDate, locationType) {
1052
- let date = new Date()
1053
- let acceptBefore = new Date(date.setDate(date.getDate() + expirationPeriod))
1050
+ async _checkExpiry(worksheetDetails, locationType) {
1051
+ let expiringProducts = []
1052
+ for (let wsd of worksheetDetails) {
1053
+ new Date(wsd.expirationDate)
1054
+ let date = new Date()
1055
+ let acceptBefore = new Date(date.setDate(date.getDate() + wsd.expirationPeriod))
1054
1056
 
1055
- if (expirationPeriod > 0) {
1056
- if (expiryDate < acceptBefore && locationType !== 'QUARANTINE') await this._expiryAlert()
1057
+ if (wsd.expirationPeriod > 0 && wsd.expirationDate) {
1058
+ if (new Date(wsd.expirationDate) < acceptBefore && locationType !== 'QUARANTINE') {
1059
+ expiringProducts.push(wsd.palletId)
1060
+ }
1061
+ }
1057
1062
  }
1063
+
1064
+ return this._expiryAlert(expiringProducts.toString())
1058
1065
  }
1059
1066
 
1060
1067
  _validateTransfer() {
@@ -460,14 +460,14 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
460
460
  type: 'integer',
461
461
  name: 'palletQty',
462
462
  label: true,
463
- header: i18next.t('field.pallet_qty'),
463
+ header: i18next.t('field.lot_qty'),
464
464
  width: 90
465
465
  },
466
466
  {
467
467
  type: 'integer',
468
468
  name: 'actualPalletQty',
469
469
  label: true,
470
- header: i18next.t('field.actual_pallet_qty'),
470
+ header: i18next.t('field.actual_lot_qty'),
471
471
  width: 100
472
472
  },
473
473
  {
@@ -792,6 +792,12 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
792
792
  async _scanProductUnload() {
793
793
  if (this._scanning) return this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
794
794
  this._scanning = true
795
+
796
+ if (this._isRequiredCheckExpiry && this._expirationPeriod > 0) {
797
+ const answer = await this._checkExpiry()
798
+ if (answer && !answer.value) return (this._scanning = false)
799
+ }
800
+
795
801
  try {
796
802
  const response = await client.mutate({
797
803
  mutation: gql`
@@ -819,7 +825,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
819
825
  })
820
826
 
821
827
  if (!response.errors) {
822
- await this._checkExpiry()
823
828
  await this._fetchProducts(this._orderNo)
824
829
  }
825
830
  } catch (e) {
@@ -834,22 +839,27 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
834
839
  }
835
840
 
836
841
  async _checkExpiry() {
837
- if (this._isRequiredCheckExpiry && this._expirationPeriod > 0) {
838
- let date = new Date()
839
- const acceptBefore = new Date(date.setDate(date.getDate() + this._expirationPeriod))
840
- let expiryDate = new Date(this.expDateInput.value)
841
- if (expiryDate < acceptBefore) {
842
- await CustomAlert({
843
- title: i18next.t('title.item_unloading_is_expiring_soon'),
844
- confirmButton: { text: i18next.t('button.confirm') }
845
- })
846
- }
842
+ let date = new Date()
843
+ const acceptBefore = new Date(date.setDate(date.getDate() + this._expirationPeriod))
844
+ let expiryDate = new Date(this.expDateInput.value)
845
+ if (expiryDate < acceptBefore) {
846
+ return await CustomAlert({
847
+ title: i18next.t('title.item_unloading_is_expiring_soon'),
848
+ confirmButton: { text: i18next.t('button.confirm') },
849
+ cancelButton: { text: i18next.t('button.cancel') }
850
+ })
847
851
  }
848
852
  }
849
853
 
850
854
  async _qtyUnload() {
851
855
  if (this._scanning) return this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
852
856
  this._scanning = true
857
+
858
+ if (this._isRequiredCheckExpiry && this._expirationPeriod > 0) {
859
+ const answer = await this._checkExpiry()
860
+ if (answer && !answer.value) return (this._scanning = false)
861
+ }
862
+
853
863
  try {
854
864
  const response = await client.mutate({
855
865
  mutation: gql`
@@ -870,7 +880,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
870
880
  }
871
881
  })
872
882
  if (!response.errors) {
873
- await this._checkExpiry()
874
883
  await this._fetchProducts(this._orderNo)
875
884
  }
876
885
  } catch (e) {
@@ -1130,16 +1139,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1130
1139
  }
1131
1140
 
1132
1141
  if (!response.errors) {
1133
- await CustomAlert({
1134
- title: i18next.t('title.completed'),
1135
- text: i18next.t('text.unloading_completed'),
1136
- confirmButton: { text: i18next.t('button.confirm') }
1137
- })
1138
-
1139
- if (this._enableProductScanning) {
1140
- if (this.cartonInput?.value) this.cartonInput.value = ''
1141
- }
1142
-
1142
+ if (this._enableProductScanning && this.cartonInput?.value) this.cartonInput.value = ''
1143
1143
  await this._fetchProducts(this._orderNo)
1144
1144
  }
1145
1145
  } catch (e) {
@@ -1350,11 +1350,11 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1350
1350
  }
1351
1351
  }
1352
1352
 
1353
- _getWorksheetDetails(completeType) {
1353
+ _getWorksheetDetails(unloadType) {
1354
1354
  return this.orderProductData.records.map(task => {
1355
- return (completeType = 'partial'
1355
+ return unloadType == 'partial'
1356
1356
  ? { name: task.name, issue: task.issue ? task.issue : null, actualPackQty: task.actualPackQty }
1357
- : { name: task.name, issue: task.issue ? task.issue : null })
1357
+ : { name: task.name, issue: task.issue ? task.issue : null }
1358
1358
  })
1359
1359
  }
1360
1360
 
@@ -117,7 +117,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
117
117
  this._searchFields = [
118
118
  {
119
119
  label: i18next.t('field.company'),
120
- name: 'bizplaceId',
120
+ name: 'bizplace',
121
121
  type: 'select',
122
122
  options: [
123
123
  { value: '' },
@@ -511,6 +511,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
511
511
  id
512
512
  name
513
513
  sku
514
+ productInformation
514
515
  brand
515
516
  auxUnit1
516
517
  auxValue1
@@ -571,8 +572,8 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
571
572
  const filters = await this.searchForm.getQueryFilters()
572
573
  const response = await client.query({
573
574
  query: gql`
574
- query inventories($filters: [Filter!]!, $pagination: Pagination, $sortings: [Sorting!]!) {
575
- inventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
575
+ query inventoriesForExport($filters: [Filter!]!, $pagination: Pagination, $sortings: [Sorting!]!) {
576
+ inventoriesForExport(filters: $filters, pagination: $pagination, sortings: $sortings) {
576
577
  items {
577
578
  id
578
579
  palletId
@@ -598,6 +599,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
598
599
  brand
599
600
  name
600
601
  description
602
+ productInformation
601
603
  }
602
604
  qty
603
605
  warehouse {
@@ -612,10 +614,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
612
614
  description
613
615
  }
614
616
  updatedAt
615
- updater {
616
- name
617
- description
618
- }
619
617
  }
620
618
  total
621
619
  }
@@ -628,7 +626,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
628
626
  }
629
627
  })
630
628
 
631
- return response.data.inventories.items || []
629
+ return response.data.inventoriesForExport.items || []
632
630
  }
633
631
 
634
632
  async _fetchPartners(filters = []) {
@@ -836,7 +834,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
836
834
  })
837
835
  ]
838
836
 
839
- const bizplaceFilters = (await this.searchForm.getQueryFilters()).filter(x => x.name === 'bizplaceId')
837
+ const bizplaceFilters = (await this.searchForm.getQueryFilters()).filter(x => x.name === 'bizplace')
840
838
 
841
839
  if (bizplaceFilters.length == 0) {
842
840
  throw new Error(`Please select a customer for export.`)
@@ -848,7 +846,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
848
846
  data = await this.fetchInventoriesForExport()
849
847
  }
850
848
 
851
- let [product, bizplace, location] = await Promise.all([
849
+ let [products, bizplaces, locations] = await Promise.all([
852
850
  this.fetchProduct(bizplaceFilters),
853
851
  this.fetchBizplaces([{ ...bizplaceFilters[0], name: 'bizplace' }]),
854
852
  this.fetchLocation()
@@ -857,15 +855,13 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
857
855
  headerSetting = headerSetting.map(column => {
858
856
  switch (column.key) {
859
857
  case 'bizplace.name':
860
- column.arrData = bizplace
858
+ column.arrData = bizplaces
861
859
  break
862
860
  case 'product.name':
863
- column.arrData = product.map(itm => {
864
- return { ...itm, name: `(${itm.sku}) ${itm.name} - ${itm.description}` }
865
- })
861
+ column.arrData = products
866
862
  break
867
863
  case 'location.name':
868
- column.arrData = location
864
+ column.arrData = locations
869
865
  break
870
866
  default:
871
867
  break
@@ -878,7 +874,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
878
874
  item.expirationDate = new Date(item.expirationDate).getTime()
879
875
  }
880
876
 
881
- item.product.name = `(${item.product.sku}) ${item.product.name} - ${item.product.description}`
877
+ item.product.name = item.product.productInformation
882
878
  return {
883
879
  id: item.id,
884
880
  ...this.columns
@@ -893,7 +889,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
893
889
  }
894
890
  })
895
891
 
896
- // throw new error('test')
897
892
  return { header: headerSetting, data: data }
898
893
  } catch (e) {
899
894
  this._showToast(e)
@@ -930,20 +925,20 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
930
925
  bizplace[0].name = 'bizplace'
931
926
  const response = await client.query({
932
927
  query: gql`
933
- query productsByBizplace($filters: [Filter!]!) {
934
- productsByBizplace(filters: $filters) {
928
+ query pureProductsByBizplace($filters: [Filter!]!) {
929
+ pureProductsByBizplace(filters: $filters) {
935
930
  items {
936
931
  id
937
- sku
938
- name
939
- description
932
+ productInformation
940
933
  }
941
934
  }
942
935
  }
943
936
  `,
944
937
  variables: { filters: [...bizplace] }
945
938
  })
946
- return response.data.productsByBizplace.items
939
+ return response.data.pureProductsByBizplace.items.map(product => {
940
+ return { id: product.id, name: product.productInformation }
941
+ })
947
942
  } catch (ex) {
948
943
  throw ex
949
944
  }
@@ -952,8 +947,8 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
952
947
  async fetchLocation() {
953
948
  const response = await client.query({
954
949
  query: gql`
955
- query locations($filters: [Filter!]!) {
956
- locations(filters: $filters) {
950
+ query pureLocations($filters: [Filter!]!) {
951
+ pureLocations(filters: $filters) {
957
952
  items {
958
953
  id
959
954
  name
@@ -963,7 +958,8 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
963
958
  `,
964
959
  variables: { filters: [] }
965
960
  })
966
- return response.data.locations.items
961
+ this._locations = response.data.pureLocations.items
962
+ return response.data.pureLocations.items
967
963
  }
968
964
 
969
965
  async updateRemark(id, remark) {
@@ -164,11 +164,6 @@ class InventoryByProduct extends localize(i18next)(PageView) {
164
164
  type: 'object',
165
165
  name: 'bizplace',
166
166
  header: i18next.t('field.company'),
167
- record: {
168
- options: {
169
- queryName: 'bizplaces'
170
- }
171
- },
172
167
  imex: {
173
168
  header: i18next.t('field.company'),
174
169
  key: 'bizplace.name',
@@ -243,13 +238,6 @@ class InventoryByProduct extends localize(i18next)(PageView) {
243
238
  header: i18next.t('field.qty'),
244
239
  width: 80
245
240
  }
246
- // {
247
- // type: 'decimal',
248
- // name: 'averageUnitCost',
249
- // imex: { header: i18next.t('field.average_unit_cost'), key: 'averageUnitCost', width: 50, type: 'decimal' },
250
- // header: i18next.t('field.average_unit_cost'),
251
- // width: 160
252
- // }
253
241
  ]
254
242
  }
255
243
  }
@@ -178,7 +178,7 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
178
178
  type: 'string',
179
179
  name: 'transporter',
180
180
  label: true,
181
- header: i18next.t('field.shipping_provider'),
181
+ header: i18next.t('field.transporter'),
182
182
  width: 200
183
183
  }
184
184
  ]
@@ -95,7 +95,7 @@ class LoadingManifestList extends localize(i18next)(PageView) {
95
95
  props: { searchOper: 'i_like' }
96
96
  },
97
97
  {
98
- label: i18next.t('field.shipping_provider'),
98
+ label: i18next.t('field.transporter'),
99
99
  name: 'shippingProvider',
100
100
  type: 'text',
101
101
  props: { searchOper: 'i_like' }
@@ -174,7 +174,7 @@ class LoadingManifestList extends localize(i18next)(PageView) {
174
174
  {
175
175
  type: 'string',
176
176
  name: 'shippingProvider',
177
- header: i18next.t('field.shipping_provider'),
177
+ header: i18next.t('field.transporter'),
178
178
  label: true,
179
179
  sortable: true,
180
180
  width: 150
@@ -272,7 +272,7 @@ class LoadingManifestList extends localize(i18next)(PageView) {
272
272
 
273
273
  var headerSetting = [
274
274
  { header: i18next.t('field.manifest_no'), key: 'name', width: 25, type: 'string' },
275
- { header: i18next.t('field.shipping_provider'), key: 'shippingProvider', width: 25, type: 'string' },
275
+ { header: i18next.t('field.transporter'), key: 'shippingProvider', width: 25, type: 'string' },
276
276
  { header: i18next.t('field.dispatch_at'), key: 'dispatchedAt', width: 25, type: 'date' },
277
277
  { header: i18next.t('field.status'), key: 'status', width: 25, type: 'string' },
278
278
  { header: i18next.t('field.created_at'), key: 'createdAt', width: 30, type: 'date' },