@things-factory/product-ui 4.3.638 → 4.3.651

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.
@@ -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
- client,
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
- 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,
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
- 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
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
 
@@ -1379,6 +1355,7 @@ class ProductList extends localize(i18next)(PageView) {
1379
1355
  isRequireSerialNumberScanning
1380
1356
  isRequireSerialNumberScanningInbound
1381
1357
  isRequireSerialNumberScanningOutbound
1358
+ isInventoryDecimal
1382
1359
  weightUnit
1383
1360
  nettWeight
1384
1361
  grossWeight
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/product-ui",
3
- "version": "4.3.638",
3
+ "version": "4.3.651",
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.638",
27
+ "@things-factory/grist-ui": "^4.3.642",
28
28
  "@things-factory/i18n-base": "^4.3.591",
29
- "@things-factory/import-ui": "^4.3.638",
29
+ "@things-factory/import-ui": "^4.3.642",
30
30
  "@things-factory/layout-base": "^4.3.591",
31
- "@things-factory/product-base": "^4.3.638",
31
+ "@things-factory/product-base": "^4.3.651",
32
32
  "@things-factory/shell": "^4.3.591"
33
33
  },
34
- "gitHead": "d87c82028467f0feb5ece6f09783350baaebfe8a"
34
+ "gitHead": "5b41864ea318a1881f63938a95ab82636bdcd336"
35
35
  }
@@ -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",
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":""}