@things-factory/product-ui 4.3.598 → 4.3.631
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 +62 -17
- package/package.json +2 -2
|
@@ -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'
|
|
@@ -998,20 +1012,48 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
998
1012
|
: undefined,
|
|
999
1013
|
productRef: patch.productRef?.id ? { id: patch.productRef?.id } : undefined,
|
|
1000
1014
|
parentProductRef: patch.parentProductRef?.id ? { id: patch.parentProductRef?.id } : undefined,
|
|
1001
|
-
costPrice:
|
|
1015
|
+
costPrice:
|
|
1016
|
+
patch?.costPrice || patch?.costPrice == 0
|
|
1017
|
+
? parseFloat(patch.costPrice)
|
|
1018
|
+
: undefined,
|
|
1002
1019
|
uomValue: patch?.uomValue ? parseFloat(patch.uomValue) : undefined,
|
|
1003
|
-
bufferQty:
|
|
1004
|
-
|
|
1005
|
-
|
|
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,
|
|
1006
1032
|
packingSize: patch?.packingSize ? parseInt(patch.packingSize) : undefined,
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
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
|
|
1015
1057
|
}
|
|
1016
1058
|
})
|
|
1017
1059
|
|
|
@@ -1316,6 +1358,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1316
1358
|
name
|
|
1317
1359
|
type
|
|
1318
1360
|
packingType
|
|
1361
|
+
packingSize
|
|
1319
1362
|
uom
|
|
1320
1363
|
uomValue
|
|
1321
1364
|
productBarcodes {
|
|
@@ -1418,9 +1461,10 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1418
1461
|
return {
|
|
1419
1462
|
...product,
|
|
1420
1463
|
packingType: pd.packingType,
|
|
1464
|
+
packingSize: pd.packingSize,
|
|
1421
1465
|
uom: pd.uom,
|
|
1422
1466
|
uomValue: pd.uomValue,
|
|
1423
|
-
gtin: gtin
|
|
1467
|
+
gtin: gtin,
|
|
1424
1468
|
}
|
|
1425
1469
|
})
|
|
1426
1470
|
flattenedList.push(...pds)
|
|
@@ -1433,6 +1477,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1433
1477
|
platformFee: item.platformFee,
|
|
1434
1478
|
serviceFee: item.serviceFee,
|
|
1435
1479
|
transactionFee: item.transactionFee,
|
|
1480
|
+
packingSize: item.packingSize,
|
|
1436
1481
|
gtin: item.gtin,
|
|
1437
1482
|
...this.productGristConfig.columns
|
|
1438
1483
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
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.631",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"@things-factory/product-base": "^4.3.595",
|
|
32
32
|
"@things-factory/shell": "^4.3.591"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "c6f91170d443086dcd3bfd691113fcf08a2f1b89"
|
|
35
35
|
}
|