@things-factory/product-ui 4.3.163 → 4.3.165

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.
@@ -540,13 +540,6 @@ export class ProductDetailsPopup extends localize(i18next)(LitElement) {
540
540
 
541
541
  let data = this._updateRowOption(response.data.productDetails.items)
542
542
 
543
- data.map(item => {
544
- item.costPrice === null ? (item.costPrice = 0) : item.costPrice
545
- if (item.costPrice == 0 || item.costPrice) {
546
- item.costPrice = item.costPrice.toFixed(2)
547
- }
548
- })
549
-
550
543
  if (!response.errors) {
551
544
  this._data = {
552
545
  total: response.data.productDetails.total || 0,
@@ -649,6 +642,7 @@ export class ProductDetailsPopup extends localize(i18next)(LitElement) {
649
642
 
650
643
  this.dataGrist.hideSpinner()
651
644
  this.buttonSave.disabled = false
645
+ this._showToast({ message: i18next.t('text.saved') })
652
646
  this.dispatchEvent(new CustomEvent('saved', {}))
653
647
  history.back()
654
648
  } catch (error) {
@@ -660,9 +654,6 @@ export class ProductDetailsPopup extends localize(i18next)(LitElement) {
660
654
 
661
655
  _validate() {
662
656
  let errors = []
663
- if (this.dataGrist.dirtyRecords.length < 1) {
664
- throw new Error(i18next.t('text.nothing_changed'))
665
- }
666
657
  if (!this.dataGrist._data.records.find(x => x.isDefault)) {
667
658
  errors.push({ type: 'isDefault', value: 'Must have 1 default' })
668
659
  }
@@ -690,11 +681,6 @@ export class ProductDetailsPopup extends localize(i18next)(LitElement) {
690
681
  let data = this.dataGrist._data.records.map((itm, index) => {
691
682
  itm.error = false
692
683
 
693
- if (itm.productBarcodes?.length <= 0 || !itm.productBarcodes) {
694
- itm.error = true
695
- if (!errors.find(err => err.type == 'gtin')) errors.push({ type: 'gtin', value: 'GTIN is required' })
696
- }
697
-
698
684
  if (isEmpty(itm.packingType) || '') {
699
685
  itm.error = true
700
686
  if (!errors.find(err => err.type == 'packingType'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/product-ui",
3
- "version": "4.3.163",
3
+ "version": "4.3.165",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -28,8 +28,8 @@
28
28
  "@things-factory/i18n-base": "^4.3.159",
29
29
  "@things-factory/import-ui": "^4.3.159",
30
30
  "@things-factory/layout-base": "^4.3.159",
31
- "@things-factory/product-base": "^4.3.163",
31
+ "@things-factory/product-base": "^4.3.165",
32
32
  "@things-factory/shell": "^4.3.159"
33
33
  },
34
- "gitHead": "082339ccf43992dc550c7078c605cc2794758c7f"
34
+ "gitHead": "92f67631971ac0fa8358d9f1a7c865893d1ae0bd"
35
35
  }
@@ -74,6 +74,7 @@
74
74
  "text.data_restore_successfully": "data restore successfully",
75
75
  "text.invalid_bundle_qty_for_item_number": "invalid bundle qty for item number",
76
76
  "text.invalid_qty_for_item_number_x": "invalid qty for item #{state.x}",
77
+ "text.saved": "saved",
77
78
  "text.there_is_nothing_to_restore": "there is nothing to restore",
78
79
  "title.combination_sets": "combination sets",
79
80
  "title.combination": "combination",
@@ -69,6 +69,7 @@
69
69
  "text.data_restore_successfully": "[ko]data restore successfully",
70
70
  "text.invalid_bundle_qty_for_item_number": "[ko]invalid bundle qty for item number",
71
71
  "text.invalid_qty_for_item_number_x": "[ko]invalid qty for item #{state.x}",
72
+ "text.saved": "[ko]saved",
72
73
  "text.there_is_nothing_to_restore": "[ko]there is nothing to restore",
73
74
  "title.combination_sets": "[ko]combination sets",
74
75
  "title.combination": "[ko]combination",
@@ -69,6 +69,7 @@
69
69
  "text.data_restore_successfully": "[ms]data restore successfully",
70
70
  "text.invalid_bundle_qty_for_item_number": "[ms] invalid bundle qty for item number",
71
71
  "text.invalid_qty_for_item_number_x": "[ms] invalid qty for item #{state.x}",
72
+ "text.saved": "[ms]saved",
72
73
  "text.there_is_nothing_to_restore": "[ms]there is nothing to restore",
73
74
  "title.combination_sets": "[ms] combination sets",
74
75
  "title.combination": "[ms] combination",
@@ -61,14 +61,15 @@
61
61
  "field.weight_unit": "[zh]weight unit",
62
62
  "field.weight": "[zh]weight",
63
63
  "field.width": "[zh]width",
64
- "label.fefo": "[ms]FEFO",
65
- "label.fmfo": "[ms]FMFO",
66
- "label.fifo": "[ms]FIFO",
67
- "label.lifo": "[ms]LIFO",
64
+ "label.fefo": "[zh]FEFO",
65
+ "label.fmfo": "[zh]FMFO",
66
+ "label.fifo": "[zh]FIFO",
67
+ "label.lifo": "[zh]LIFO",
68
68
  "label.location": "[ms]location",
69
69
  "text.data_restore_successfully": "[zh]data restore successfully",
70
70
  "text.invalid_bundle_qty_for_item_number": "[zh] invalid bundle qty for item number",
71
71
  "text.invalid_qty_for_item_number_x": "[zh] invalid qty for item #{state.x}",
72
+ "text.saved": "[zh]saved",
72
73
  "text.there_is_nothing_to_restore": "[zh]there is nothing to restore",
73
74
  "title.combination_sets": "[zh] combination sets",
74
75
  "title.combination": "[zh] combination",