@things-factory/operato-wms 4.0.38 → 4.0.42

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 +2 -1
  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 +12 -10
  7. package/client/pages/inbound/unload-product.js +20 -31
  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 +2 -0
  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 +8 -1
  35. package/translations/ko.json +8 -1
  36. package/translations/ms.json +8 -1
  37. package/translations/zh.json +8 -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,
@@ -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
 
@@ -721,17 +721,17 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
721
721
  worksheetDetailNames.push(itm.name)
722
722
  })
723
723
  if (worksheetDetails.find(itm => itm.expirationDate)) {
724
- var answer = await this._checkExpiry(worksheetDetails, locationDetails.type)
724
+ let answer = await this._checkExpiry(worksheetDetails, locationDetails.type)
725
+ if (!answer?.value) return (this._scanning = false)
725
726
  }
726
727
  } else {
727
728
  worksheetDetailNames.push(this._selectedOrderProduct.name)
728
729
  if (this._selectedOrderProduct.expirationDate) {
729
- var answer = await this._checkExpiry(this._selectedOrderProduct, locationDetails.type)
730
+ let answer = await this._checkExpiry(this._selectedOrderProduct, locationDetails.type)
731
+ if (!answer?.value) return (this._scanning = false)
730
732
  }
731
733
  }
732
734
 
733
- if (!answer.value) return (this._scanning = false)
734
-
735
735
  const response = await client.mutate({
736
736
  mutation: gql`
737
737
  mutation putaway(
@@ -798,17 +798,17 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
798
798
  worksheetDetailNames.push(itm.name)
799
799
  })
800
800
  if (worksheetDetails.find(itm => itm.expirationDate)) {
801
- var answer = await this._checkExpiry(worksheetDetails, locationDetails.type)
801
+ let answer = await this._checkExpiry(worksheetDetails, locationDetails.type)
802
+ if (!answer?.value) return (this._scanning = false)
802
803
  }
803
804
  } else {
804
805
  worksheetDetailNames.push(this._selectedOrderProduct.name)
805
806
  if (this._selectedOrderProduct.expirationDate) {
806
- var answer = await this._checkExpiry(this._selectedOrderProduct, locationDetails.type)
807
+ let answer = await this._checkExpiry(this._selectedOrderProduct, locationDetails.type)
808
+ if (!answer?.value) return (this._scanning = false)
807
809
  }
808
810
  }
809
811
 
810
- if (!answer.value) return (this._scanning = false)
811
-
812
812
  const response = await client.mutate({
813
813
  mutation: gql`
814
814
  mutation putawayReturn(
@@ -882,8 +882,10 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
882
882
  if (!this.incompleteLocationName) {
883
883
  let worksheetDetailNames = []
884
884
  if (this._enableCartonLabel) {
885
- const selectedWorksheetDetailName = this._getSelectedOrderProducts(this.cartonInput.value)
886
- worksheetDetailNames.push(selectedWorksheetDetailName[0].name)
885
+ let worksheetDetails = this._getSelectedOrderProducts(this.cartonInput.value)
886
+ worksheetDetails.forEach(itm => {
887
+ worksheetDetailNames.push(itm.name)
888
+ })
887
889
  } else worksheetDetailNames.push(this._selectedOrderProduct.name)
888
890
 
889
891
  const response = await client.mutate({
@@ -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
  {
@@ -793,9 +793,10 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
793
793
  if (this._scanning) return this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
794
794
  this._scanning = true
795
795
 
796
- const answer = await this._checkExpiry()
797
-
798
- if (!answer.value) return (this._scanning = false)
796
+ if (this._isRequiredCheckExpiry && this._expirationPeriod > 0) {
797
+ const answer = await this._checkExpiry()
798
+ if (answer && !answer.value) return (this._scanning = false)
799
+ }
799
800
 
800
801
  try {
801
802
  const response = await client.mutate({
@@ -838,29 +839,26 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
838
839
  }
839
840
 
840
841
  async _checkExpiry() {
841
- if (this._isRequiredCheckExpiry && this._expirationPeriod > 0) {
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
- var answer = 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
- })
851
- }
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
+ })
852
851
  }
853
-
854
- return answer
855
852
  }
856
853
 
857
854
  async _qtyUnload() {
858
855
  if (this._scanning) return this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
859
856
  this._scanning = true
860
857
 
861
- const answer = await this._checkExpiry()
862
-
863
- if (!answer.value) return (this._scanning = false)
858
+ if (this._isRequiredCheckExpiry && this._expirationPeriod > 0) {
859
+ const answer = await this._checkExpiry()
860
+ if (answer && !answer.value) return (this._scanning = false)
861
+ }
864
862
 
865
863
  try {
866
864
  const response = await client.mutate({
@@ -1141,16 +1139,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1141
1139
  }
1142
1140
 
1143
1141
  if (!response.errors) {
1144
- await CustomAlert({
1145
- title: i18next.t('title.completed'),
1146
- text: i18next.t('text.unloading_completed'),
1147
- confirmButton: { text: i18next.t('button.confirm') }
1148
- })
1149
-
1150
- if (this._enableProductScanning) {
1151
- if (this.cartonInput?.value) this.cartonInput.value = ''
1152
- }
1153
-
1142
+ if (this._enableProductScanning && this.cartonInput?.value) this.cartonInput.value = ''
1154
1143
  await this._fetchProducts(this._orderNo)
1155
1144
  }
1156
1145
  } catch (e) {
@@ -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' },
@@ -1,16 +1,20 @@
1
- import { MultiColumnFormStyles } from '@things-factory/form-ui'
2
- import { CommonButtonStyles } from '@things-factory/styles'
3
1
  import '@things-factory/grist-ui'
2
+ import '../../components/attachment-viewer'
3
+ import '../../components/popup-note'
4
+ import '../../components/vas-templates'
5
+ import '@things-factory/warehouse-ui'
6
+
7
+ import gql from 'graphql-tag'
8
+ import { css, html } from 'lit-element'
9
+
10
+ import { MultiColumnFormStyles } from '@things-factory/form-ui'
4
11
  import { getRenderer } from '@things-factory/grist-ui'
5
12
  import { i18next, localize } from '@things-factory/i18n-base'
6
13
  import { openPopup } from '@things-factory/layout-base'
7
14
  import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
15
+ import { CommonButtonStyles } from '@things-factory/styles'
8
16
  import { isMobileDevice } from '@things-factory/utils'
9
- import gql from 'graphql-tag'
10
- import { css, html } from 'lit-element'
11
- import '../../components/attachment-viewer'
12
- import '../../components/popup-note'
13
- import '../../components/vas-templates'
17
+
14
18
  import {
15
19
  ORDER_STATUS,
16
20
  VAS_BATCH_AND_PRODUCT_TYPE,
@@ -18,7 +22,6 @@ import {
18
22
  VAS_ETC_TYPE,
19
23
  VAS_PRODUCT_TYPE
20
24
  } from '../../constants'
21
- import { BufferLocationSelector } from '@things-factory/warehouse-ui'
22
25
 
23
26
  class AssignBufferLocation extends localize(i18next)(PageView) {
24
27
  static get properties() {
@@ -432,6 +435,12 @@ class AssignBufferLocation extends localize(i18next)(PageView) {
432
435
  refNo2
433
436
  refNo3
434
437
  importCargo
438
+ purchaseOrder {
439
+ bufferLocation {
440
+ id
441
+ name
442
+ }
443
+ }
435
444
  attachment {
436
445
  id
437
446
  name
@@ -504,7 +513,13 @@ class AssignBufferLocation extends localize(i18next)(PageView) {
504
513
 
505
514
  if (!response.errors) {
506
515
  const { arrivalNotice } = response.data
507
- const { orderProducts, orderVass } = arrivalNotice
516
+ const { orderProducts, orderVass, purchaseOrder } = arrivalNotice
517
+
518
+ if (purchaseOrder) {
519
+ const bufferLocation = purchaseOrder.bufferLocation
520
+ this.bufferLocationField.value = bufferLocation?.name
521
+ this.bufferLocationField.setAttribute('location-id', bufferLocation.id)
522
+ }
508
523
 
509
524
  this.orderBizplace = arrivalNotice.bizplace
510
525
  this._hasContainer = arrivalNotice.containerNo ? true : false
@@ -1658,7 +1658,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1658
1658
  async bulkUploadValidateOrderProducts(patches) {
1659
1659
  const response = await client.query({
1660
1660
  query: gql`
1661
- query bulkUploadValidateOrderProducts($orderProducts: [NewOrderProduct], $partnerBizplaceId: String!) {
1661
+ query bulkUploadValidateOrderProducts($orderProducts: [NewOrderProduct!], $partnerBizplaceId: String!) {
1662
1662
  bulkUploadValidateOrderProducts(orderProducts: $orderProducts, partnerBizplaceId: $partnerBizplaceId) {
1663
1663
  id
1664
1664
  packingType
@@ -106,7 +106,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
106
106
  async pageInitialized() {
107
107
  this.isUserBelongsDomain = await this._checkUserBelongsDomain()
108
108
  const [_orderStatusReq, _bizplacesReq] = await Promise.allSettled([
109
- getCodeByName('RO_LIST_STATUS'),
109
+ getCodeByName('RO_REQUESTS_STATUS'),
110
110
  this._fetchBizplaces()
111
111
  ])
112
112
 
@@ -577,6 +577,17 @@ class B2bOrderList extends localize(i18next)(PageView) {
577
577
  })
578
578
  return { header: headerSetting, data: data }
579
579
  }
580
+
581
+ _showToast({ type, message }) {
582
+ document.dispatchEvent(
583
+ new CustomEvent('notify', {
584
+ detail: {
585
+ type,
586
+ message
587
+ }
588
+ })
589
+ )
590
+ }
580
591
  }
581
592
 
582
593
  window.customElements.define('b2b-order-list', B2bOrderList)