@things-factory/product-ui 4.3.607 → 4.3.637
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 +40 -60
- package/package.json +5 -5
- package/translations/en.json +1 -0
|
@@ -3,29 +3,15 @@ import '@things-factory/grist-ui'
|
|
|
3
3
|
import './product-details-popup'
|
|
4
4
|
|
|
5
5
|
import gql from 'graphql-tag'
|
|
6
|
-
import {
|
|
7
|
-
css,
|
|
8
|
-
html
|
|
9
|
-
} from 'lit'
|
|
6
|
+
import { css, html } from 'lit'
|
|
10
7
|
import _ from 'lodash'
|
|
11
8
|
|
|
12
9
|
import { getCodeByName } from '@things-factory/code-base'
|
|
13
|
-
import {
|
|
14
|
-
i18next,
|
|
15
|
-
localize
|
|
16
|
-
} from '@things-factory/i18n-base'
|
|
10
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
17
11
|
import { openImportPopUp } from '@things-factory/import-ui'
|
|
18
12
|
import { openPopup } from '@things-factory/layout-base'
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
CustomAlert,
|
|
22
|
-
gqlContext,
|
|
23
|
-
PageView
|
|
24
|
-
} from '@things-factory/shell'
|
|
25
|
-
import {
|
|
26
|
-
CommonButtonStyles,
|
|
27
|
-
ScrollbarStyles
|
|
28
|
-
} from '@things-factory/styles'
|
|
13
|
+
import { client, CustomAlert, gqlContext, PageView } from '@things-factory/shell'
|
|
14
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
29
15
|
import { isMobileDevice } from '@things-factory/utils'
|
|
30
16
|
|
|
31
17
|
import { PICKING_STRATEGIES } from './constants/picking-strategy'
|
|
@@ -493,6 +479,20 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
493
479
|
sortable: true,
|
|
494
480
|
width: 120
|
|
495
481
|
},
|
|
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,6 +867,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
867
867
|
isRequireSerialNumberScanning
|
|
868
868
|
isRequireSerialNumberScanningInbound
|
|
869
869
|
isRequireSerialNumberScanningOutbound
|
|
870
|
+
isInventoryDecimal
|
|
870
871
|
weightUnit
|
|
871
872
|
nettWeight
|
|
872
873
|
grossWeight
|
|
@@ -1012,48 +1013,21 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1012
1013
|
: undefined,
|
|
1013
1014
|
productRef: patch.productRef?.id ? { id: patch.productRef?.id } : undefined,
|
|
1014
1015
|
parentProductRef: patch.parentProductRef?.id ? { id: patch.parentProductRef?.id } : undefined,
|
|
1015
|
-
costPrice:
|
|
1016
|
-
patch?.costPrice || patch?.costPrice == 0
|
|
1017
|
-
? parseFloat(patch.costPrice)
|
|
1018
|
-
: undefined,
|
|
1016
|
+
costPrice: patch?.costPrice || patch?.costPrice == 0 ? parseFloat(patch.costPrice) : undefined,
|
|
1019
1017
|
uomValue: patch?.uomValue ? parseFloat(patch.uomValue) : undefined,
|
|
1020
|
-
bufferQty:
|
|
1021
|
-
|
|
1022
|
-
|
|
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,
|
|
1018
|
+
bufferQty: patch?.bufferQty || patch?.bufferQty == 0 ? parseInt(patch.bufferQty) : undefined,
|
|
1019
|
+
minQty: patch?.minQty || patch?.minQty == 0 ? parseInt(patch.minQty) : undefined,
|
|
1020
|
+
maxQty: patch?.maxQty || patch?.maxQty == 0 ? parseInt(patch.maxQty) : undefined,
|
|
1032
1021
|
packingSize: patch?.packingSize ? parseInt(patch.packingSize) : undefined,
|
|
1033
|
-
outboundAlert:
|
|
1034
|
-
|
|
1035
|
-
? parseInt(patch.
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
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
|
|
1022
|
+
outboundAlert: patch?.outboundAlert || patch?.outboundAlert == 0 ? parseInt(patch.outboundAlert) : undefined,
|
|
1023
|
+
productShelfLife:
|
|
1024
|
+
patch?.productShelfLife || patch?.productShelfLife == 0 ? parseInt(patch.productShelfLife) : undefined,
|
|
1025
|
+
commissionFee:
|
|
1026
|
+
patch?.commissionFee || patch?.commissionFee == 0 ? parseFloat(patch.commissionFee) : undefined,
|
|
1027
|
+
platformFee: patch?.platformFee || patch?.platformFee == 0 ? parseFloat(patch.platformFee) : undefined,
|
|
1028
|
+
serviceFee: patch?.serviceFee || patch?.serviceFee == 0 ? parseFloat(patch.serviceFee) : undefined,
|
|
1029
|
+
transactionFee:
|
|
1030
|
+
patch?.transactionFee || patch?.transactionFee == 0 ? parseFloat(patch.transactionFee) : undefined
|
|
1057
1031
|
}
|
|
1058
1032
|
})
|
|
1059
1033
|
|
|
@@ -1095,6 +1069,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1095
1069
|
patch.isRequireSerialNumberScanningInbound?.toString().toLowerCase() === 'true'
|
|
1096
1070
|
patch.isRequireSerialNumberScanningOutbound =
|
|
1097
1071
|
patch.isRequireSerialNumberScanningOutbound?.toString().toLowerCase() === 'true'
|
|
1072
|
+
patch.isInventoryDecimal = patch.isInventoryDecimal?.toString().toLowerCase() === 'true'
|
|
1098
1073
|
|
|
1099
1074
|
return {
|
|
1100
1075
|
...patch,
|
|
@@ -1121,7 +1096,8 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1121
1096
|
volume: patch?.volume ? parseFloat(patch.volume) : undefined,
|
|
1122
1097
|
isRequiredCheckExpiry: patch?.isRequiredCheckExpiry || false,
|
|
1123
1098
|
isRequireSerialNumberScanningInbound: patch?.isRequireSerialNumberScanningInbound || false,
|
|
1124
|
-
isRequireSerialNumberScanningOutbound: patch?.isRequireSerialNumberScanningOutbound || false
|
|
1099
|
+
isRequireSerialNumberScanningOutbound: patch?.isRequireSerialNumberScanningOutbound || false,
|
|
1100
|
+
isInventoryDecimal: patch?.isInventoryDecimal || false
|
|
1125
1101
|
}
|
|
1126
1102
|
})
|
|
1127
1103
|
|
|
@@ -1358,6 +1334,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1358
1334
|
name
|
|
1359
1335
|
type
|
|
1360
1336
|
packingType
|
|
1337
|
+
packingSize
|
|
1361
1338
|
uom
|
|
1362
1339
|
uomValue
|
|
1363
1340
|
productBarcodes {
|
|
@@ -1378,6 +1355,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1378
1355
|
isRequireSerialNumberScanning
|
|
1379
1356
|
isRequireSerialNumberScanningInbound
|
|
1380
1357
|
isRequireSerialNumberScanningOutbound
|
|
1358
|
+
isInventoryDecimal
|
|
1381
1359
|
weightUnit
|
|
1382
1360
|
nettWeight
|
|
1383
1361
|
grossWeight
|
|
@@ -1460,9 +1438,10 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1460
1438
|
return {
|
|
1461
1439
|
...product,
|
|
1462
1440
|
packingType: pd.packingType,
|
|
1441
|
+
packingSize: pd.packingSize,
|
|
1463
1442
|
uom: pd.uom,
|
|
1464
1443
|
uomValue: pd.uomValue,
|
|
1465
|
-
gtin: gtin
|
|
1444
|
+
gtin: gtin,
|
|
1466
1445
|
}
|
|
1467
1446
|
})
|
|
1468
1447
|
flattenedList.push(...pds)
|
|
@@ -1475,6 +1454,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1475
1454
|
platformFee: item.platformFee,
|
|
1476
1455
|
serviceFee: item.serviceFee,
|
|
1477
1456
|
transactionFee: item.transactionFee,
|
|
1457
|
+
packingSize: item.packingSize,
|
|
1478
1458
|
gtin: item.gtin,
|
|
1479
1459
|
...this.productGristConfig.columns
|
|
1480
1460
|
.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.637",
|
|
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.637",
|
|
28
28
|
"@things-factory/i18n-base": "^4.3.591",
|
|
29
|
-
"@things-factory/import-ui": "^4.3.
|
|
29
|
+
"@things-factory/import-ui": "^4.3.637",
|
|
30
30
|
"@things-factory/layout-base": "^4.3.591",
|
|
31
|
-
"@things-factory/product-base": "^4.3.
|
|
31
|
+
"@things-factory/product-base": "^4.3.637",
|
|
32
32
|
"@things-factory/shell": "^4.3.591"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "67af35bd054b84ae5e72c48b1f61917be5d8debb"
|
|
35
35
|
}
|
package/translations/en.json
CHANGED
|
@@ -57,6 +57,7 @@
|
|
|
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",
|
|
60
61
|
"field.required_checking_expiry": "required checking expiry",
|
|
61
62
|
"field.service_fee": "service fee",
|
|
62
63
|
"field.shelf_life": "shelf life",
|