@things-factory/product-ui 4.3.637 → 4.3.638
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.
- package/client/pages/product-list.js +59 -36
- package/package.json +5 -5
- package/translations/en.json +0 -1
|
@@ -3,15 +3,29 @@ import '@things-factory/grist-ui'
|
|
|
3
3
|
import './product-details-popup'
|
|
4
4
|
|
|
5
5
|
import gql from 'graphql-tag'
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
css,
|
|
8
|
+
html
|
|
9
|
+
} from 'lit'
|
|
7
10
|
import _ from 'lodash'
|
|
8
11
|
|
|
9
12
|
import { getCodeByName } from '@things-factory/code-base'
|
|
10
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
i18next,
|
|
15
|
+
localize
|
|
16
|
+
} from '@things-factory/i18n-base'
|
|
11
17
|
import { openImportPopUp } from '@things-factory/import-ui'
|
|
12
18
|
import { openPopup } from '@things-factory/layout-base'
|
|
13
|
-
import {
|
|
14
|
-
|
|
19
|
+
import {
|
|
20
|
+
client,
|
|
21
|
+
CustomAlert,
|
|
22
|
+
gqlContext,
|
|
23
|
+
PageView
|
|
24
|
+
} from '@things-factory/shell'
|
|
25
|
+
import {
|
|
26
|
+
CommonButtonStyles,
|
|
27
|
+
ScrollbarStyles
|
|
28
|
+
} from '@things-factory/styles'
|
|
15
29
|
import { isMobileDevice } from '@things-factory/utils'
|
|
16
30
|
|
|
17
31
|
import { PICKING_STRATEGIES } from './constants/picking-strategy'
|
|
@@ -479,20 +493,6 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
479
493
|
sortable: true,
|
|
480
494
|
width: 120
|
|
481
495
|
},
|
|
482
|
-
{
|
|
483
|
-
type: 'boolean',
|
|
484
|
-
name: 'isInventoryDecimal',
|
|
485
|
-
header: i18next.t('field.inventory_decimal'),
|
|
486
|
-
record: { editable: true, align: 'center' },
|
|
487
|
-
imex: {
|
|
488
|
-
header: i18next.t('field.inventory_decimal'),
|
|
489
|
-
key: 'isInventoryDecimal',
|
|
490
|
-
width: 30,
|
|
491
|
-
type: 'string'
|
|
492
|
-
},
|
|
493
|
-
sortable: true,
|
|
494
|
-
width: 120
|
|
495
|
-
},
|
|
496
496
|
{
|
|
497
497
|
type: 'object',
|
|
498
498
|
name: 'productRef',
|
|
@@ -867,7 +867,6 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
867
867
|
isRequireSerialNumberScanning
|
|
868
868
|
isRequireSerialNumberScanningInbound
|
|
869
869
|
isRequireSerialNumberScanningOutbound
|
|
870
|
-
isInventoryDecimal
|
|
871
870
|
weightUnit
|
|
872
871
|
nettWeight
|
|
873
872
|
grossWeight
|
|
@@ -1013,21 +1012,48 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1013
1012
|
: undefined,
|
|
1014
1013
|
productRef: patch.productRef?.id ? { id: patch.productRef?.id } : undefined,
|
|
1015
1014
|
parentProductRef: patch.parentProductRef?.id ? { id: patch.parentProductRef?.id } : undefined,
|
|
1016
|
-
costPrice:
|
|
1015
|
+
costPrice:
|
|
1016
|
+
patch?.costPrice || patch?.costPrice == 0
|
|
1017
|
+
? parseFloat(patch.costPrice)
|
|
1018
|
+
: undefined,
|
|
1017
1019
|
uomValue: patch?.uomValue ? parseFloat(patch.uomValue) : undefined,
|
|
1018
|
-
bufferQty:
|
|
1019
|
-
|
|
1020
|
-
|
|
1020
|
+
bufferQty:
|
|
1021
|
+
patch?.bufferQty || patch?.bufferQty == 0
|
|
1022
|
+
? parseInt(patch.bufferQty)
|
|
1023
|
+
: undefined,
|
|
1024
|
+
minQty:
|
|
1025
|
+
patch?.minQty || patch?.minQty == 0
|
|
1026
|
+
? parseInt(patch.minQty)
|
|
1027
|
+
: undefined,
|
|
1028
|
+
maxQty:
|
|
1029
|
+
patch?.maxQty || patch?.maxQty == 0
|
|
1030
|
+
? parseInt(patch.maxQty)
|
|
1031
|
+
: undefined,
|
|
1021
1032
|
packingSize: patch?.packingSize ? parseInt(patch.packingSize) : undefined,
|
|
1022
|
-
outboundAlert:
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1033
|
+
outboundAlert:
|
|
1034
|
+
patch?.outboundAlert || patch?.outboundAlert == 0
|
|
1035
|
+
? parseInt(patch.outboundAlert)
|
|
1036
|
+
: undefined,
|
|
1037
|
+
productShelfLife:
|
|
1038
|
+
patch?.productShelfLife || patch?.productShelfLife == 0
|
|
1039
|
+
? parseInt(patch.productShelfLife)
|
|
1040
|
+
: undefined,
|
|
1041
|
+
commissionFee:
|
|
1042
|
+
patch?.commissionFee || patch?.commissionFee == 0
|
|
1043
|
+
? parseFloat(patch.commissionFee)
|
|
1044
|
+
: undefined,
|
|
1045
|
+
platformFee:
|
|
1046
|
+
patch?.platformFee || patch?.platformFee == 0
|
|
1047
|
+
? parseFloat(patch.platformFee)
|
|
1048
|
+
: undefined,
|
|
1049
|
+
serviceFee:
|
|
1050
|
+
patch?.serviceFee || patch?.serviceFee == 0
|
|
1051
|
+
? parseFloat(patch.serviceFee)
|
|
1052
|
+
: undefined,
|
|
1053
|
+
transactionFee:
|
|
1054
|
+
patch?.transactionFee || patch?.transactionFee == 0
|
|
1055
|
+
? parseFloat(patch.transactionFee)
|
|
1056
|
+
: undefined
|
|
1031
1057
|
}
|
|
1032
1058
|
})
|
|
1033
1059
|
|
|
@@ -1069,7 +1095,6 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1069
1095
|
patch.isRequireSerialNumberScanningInbound?.toString().toLowerCase() === 'true'
|
|
1070
1096
|
patch.isRequireSerialNumberScanningOutbound =
|
|
1071
1097
|
patch.isRequireSerialNumberScanningOutbound?.toString().toLowerCase() === 'true'
|
|
1072
|
-
patch.isInventoryDecimal = patch.isInventoryDecimal?.toString().toLowerCase() === 'true'
|
|
1073
1098
|
|
|
1074
1099
|
return {
|
|
1075
1100
|
...patch,
|
|
@@ -1096,8 +1121,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1096
1121
|
volume: patch?.volume ? parseFloat(patch.volume) : undefined,
|
|
1097
1122
|
isRequiredCheckExpiry: patch?.isRequiredCheckExpiry || false,
|
|
1098
1123
|
isRequireSerialNumberScanningInbound: patch?.isRequireSerialNumberScanningInbound || false,
|
|
1099
|
-
isRequireSerialNumberScanningOutbound: patch?.isRequireSerialNumberScanningOutbound || false
|
|
1100
|
-
isInventoryDecimal: patch?.isInventoryDecimal || false
|
|
1124
|
+
isRequireSerialNumberScanningOutbound: patch?.isRequireSerialNumberScanningOutbound || false
|
|
1101
1125
|
}
|
|
1102
1126
|
})
|
|
1103
1127
|
|
|
@@ -1355,7 +1379,6 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1355
1379
|
isRequireSerialNumberScanning
|
|
1356
1380
|
isRequireSerialNumberScanningInbound
|
|
1357
1381
|
isRequireSerialNumberScanningOutbound
|
|
1358
|
-
isInventoryDecimal
|
|
1359
1382
|
weightUnit
|
|
1360
1383
|
nettWeight
|
|
1361
1384
|
grossWeight
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/product-ui",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.638",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@things-factory/form-ui": "^4.3.591",
|
|
27
|
-
"@things-factory/grist-ui": "^4.3.
|
|
27
|
+
"@things-factory/grist-ui": "^4.3.638",
|
|
28
28
|
"@things-factory/i18n-base": "^4.3.591",
|
|
29
|
-
"@things-factory/import-ui": "^4.3.
|
|
29
|
+
"@things-factory/import-ui": "^4.3.638",
|
|
30
30
|
"@things-factory/layout-base": "^4.3.591",
|
|
31
|
-
"@things-factory/product-base": "^4.3.
|
|
31
|
+
"@things-factory/product-base": "^4.3.638",
|
|
32
32
|
"@things-factory/shell": "^4.3.591"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "d87c82028467f0feb5ece6f09783350baaebfe8a"
|
|
35
35
|
}
|
package/translations/en.json
CHANGED
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"field.require_serial_number_scanning_inbound": "require serial number scanning inbound",
|
|
58
58
|
"field.require_serial_number_scanning_outbound": "require serial number scanning outbound",
|
|
59
59
|
"field.require_serial_number_scanning": "require serial number scanning",
|
|
60
|
-
"field.inventory_decimal": "inventory decimal",
|
|
61
60
|
"field.required_checking_expiry": "required checking expiry",
|
|
62
61
|
"field.service_fee": "service fee",
|
|
63
62
|
"field.shelf_life": "shelf life",
|