@things-factory/product-ui 4.1.37 → 4.2.0

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.
@@ -0,0 +1,24 @@
1
+ import { i18next } from '@things-factory/i18n-base'
2
+
3
+ export const PICKING_STRATEGIES = [
4
+ {
5
+ name: i18next.t('label.fifo'),
6
+ value: 'FIFO'
7
+ },
8
+ {
9
+ name: i18next.t('label.fefo'),
10
+ value: 'FEFO'
11
+ },
12
+ {
13
+ name: i18next.t('label.fmfo'),
14
+ value: 'FMFO'
15
+ },
16
+ {
17
+ name: i18next.t('label.lifo'),
18
+ value: 'LIFO'
19
+ },
20
+ {
21
+ name: i18next.t('label.location'),
22
+ value: 'LOCATION'
23
+ }
24
+ ]
@@ -3,16 +3,32 @@ import '@things-factory/grist-ui'
3
3
  import './product-details-popup'
4
4
 
5
5
  import gql from 'graphql-tag'
6
- import { css, html } from 'lit-element'
6
+ import {
7
+ css,
8
+ html
9
+ } from 'lit-element'
7
10
 
8
11
  import { getCodeByName } from '@things-factory/code-base'
9
- import { i18next, localize } from '@things-factory/i18n-base'
12
+ import {
13
+ i18next,
14
+ localize
15
+ } from '@things-factory/i18n-base'
10
16
  import { openImportPopUp } from '@things-factory/import-ui'
11
17
  import { openPopup } from '@things-factory/layout-base'
12
- import { client, CustomAlert, gqlContext, PageView } from '@things-factory/shell'
13
- import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
18
+ import {
19
+ client,
20
+ CustomAlert,
21
+ gqlContext,
22
+ PageView
23
+ } from '@things-factory/shell'
24
+ import {
25
+ CommonButtonStyles,
26
+ ScrollbarStyles
27
+ } from '@things-factory/styles'
14
28
  import { isMobileDevice } from '@things-factory/utils'
15
29
 
30
+ import { PICKING_STRATEGIES } from './constants/picking-strategy'
31
+
16
32
  class ProductList extends localize(i18next)(PageView) {
17
33
  static get properties() {
18
34
  return {
@@ -646,6 +662,22 @@ class ProductList extends localize(i18next)(PageView) {
646
662
  header: `${i18next.t('field.aux_value')} 5`,
647
663
  width: 100
648
664
  },
665
+ {
666
+ type: 'select',
667
+ name: 'pickingStrategy',
668
+ record: {
669
+ editable: true,
670
+ options: PICKING_STRATEGIES.map(strategy => strategy.value)
671
+ },
672
+ imex: {
673
+ header: `${i18next.t('field.picking_strategy')}`,
674
+ key: 'pickingStrategy',
675
+ width: 20,
676
+ type: 'string'
677
+ },
678
+ header: `${i18next.t('field.picking_strategy')}`,
679
+ width: 100
680
+ },
649
681
  {
650
682
  type: 'object',
651
683
  name: 'updater',
@@ -739,6 +771,7 @@ class ProductList extends localize(i18next)(PageView) {
739
771
  brand
740
772
  subBrand
741
773
  gtin
774
+ pickingStrategy
742
775
  updater {
743
776
  name
744
777
  description
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/product-ui",
3
- "version": "4.1.37",
3
+ "version": "4.2.0",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,13 +24,13 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/form-ui": "^4.1.28",
28
- "@things-factory/grist-ui": "^4.1.28",
29
- "@things-factory/i18n-base": "^4.1.28",
30
- "@things-factory/import-ui": "^4.1.28",
31
- "@things-factory/layout-base": "^4.1.28",
32
- "@things-factory/product-base": "^4.1.37",
33
- "@things-factory/shell": "^4.1.28"
27
+ "@things-factory/form-ui": "^4.1.40",
28
+ "@things-factory/grist-ui": "^4.1.40",
29
+ "@things-factory/i18n-base": "^4.1.40",
30
+ "@things-factory/import-ui": "^4.1.40",
31
+ "@things-factory/layout-base": "^4.1.40",
32
+ "@things-factory/product-base": "^4.2.0",
33
+ "@things-factory/shell": "^4.1.40"
34
34
  },
35
- "gitHead": "cc34a73ab56ed192e1f2babe6954a817c473a46c"
35
+ "gitHead": "ea20ff47ca0caa48313ae9d7c527e866f7eb1571"
36
36
  }
@@ -2,6 +2,7 @@
2
2
  "button.add_new_product": "add new product",
3
3
  "button.back": "back",
4
4
  "button.cancel": "cancel",
5
+ "button.check_missing_x": "check missing {state.x}",
5
6
  "button.delete": "delete",
6
7
  "button.link_product": "link product",
7
8
  "button.restore": "restore",
@@ -40,13 +41,14 @@
40
41
  "field.nett_weight": "nett weight",
41
42
  "field.packing_size": "packing size",
42
43
  "field.packing_type": "packing type",
44
+ "field.picking_strategy": "picking strategy",
43
45
  "field.product_info": "product info",
44
46
  "field.product_ref": "product ref",
45
47
  "field.product_set_info": "product set info",
46
48
  "field.ref_code": "ref code",
47
- "field.require_serial_number_scanning": "require serial number scanning",
48
49
  "field.require_serial_number_scanning_inbound": "require serial number scanning inbound",
49
50
  "field.require_serial_number_scanning_outbound": "require serial number scanning outbound",
51
+ "field.require_serial_number_scanning": "require serial number scanning",
50
52
  "field.required_checking_expiry": "required checking expiry",
51
53
  "field.sku": "SKU",
52
54
  "field.sub_brand": "sub brand",
@@ -60,10 +62,14 @@
60
62
  "field.weight_unit": "weight unit",
61
63
  "field.weight": "weight",
62
64
  "field.width": "width",
65
+ "label.fefo": "FEFO",
66
+ "label.fmfo": "FMFO",
67
+ "label.fifo": "FIFO",
68
+ "label.lifo": "LIFO",
69
+ "label.location": "location",
63
70
  "text.data_import_successfully": "data import successfully",
64
71
  "text.data_restore_successfully": "data restore successfully",
65
72
  "text.invalid_bundle_qty_for_item_number": "invalid bundle qty for item number",
66
- "button.check_missing_x": "check missing {state.x}",
67
73
  "text.invalid_qty_for_item_number_x": "invalid qty for item #{state.x}",
68
74
  "text.there_is_nothing_to_restore": "there is nothing to restore",
69
75
  "title.combination_sets": "combination sets",
@@ -1,17 +1,11 @@
1
1
  {
2
- "field.require_serial_number_scanning": "[ko]require serial number scanning",
3
- "field.packing_size": "[ko]packing size",
4
- "field.deleted": "[ko]deleted",
5
- "button.restore": "[ko]restore",
6
- "text.there_is_nothing_to_restore": "[ko]there is nothing to restore",
7
- "text.data_restore_successfully": "[ko]data restore successfully",
8
- "text.invalid_bundle_qty_for_item_number": "[ko] invalid bundle qty for item number",
9
- "text.invalid_qty_for_item_number_x": "[ko] invalid qty for item #{state.x}",
2
+ "field.picking_strategy": "[ko]picking strategy",
10
3
  "button.add_new_product": "[ko]add new product",
11
4
  "button.back": "[ko]back",
12
5
  "button.cancel": "[ko]cancel",
13
6
  "button.delete": "[ko]delete",
14
7
  "button.link_product": "[ko]link product",
8
+ "button.restore": "[ko]restore",
15
9
  "button.save": "[ko]save",
16
10
  "button.sync_data": "[ko]sync data",
17
11
  "field.aux_unit": "[ko]aux unit",
@@ -19,7 +13,7 @@
19
13
  "field.brand_sku": "[ko]brand sku",
20
14
  "field.buffer_qty": "[ko]buffer qty",
21
15
  "field.case_depth": "[ko]case depth",
22
- "field.case_gross_weight": "c[ko]ase gross weight",
16
+ "field.case_gross_weight": "[ko]case gross weight",
23
17
  "field.case_gtin": "[ko]case GTIN",
24
18
  "field.case_height": "[ko]case height",
25
19
  "field.case_volume": "[ko]case volume",
@@ -29,13 +23,13 @@
29
23
  "field.child_product_ref": "[ko]child product ref",
30
24
  "field.child_qty": "[ko]child qty",
31
25
  "field.cogs_account_code": "[ko]COGS account code",
32
- "field.combination": "[ko] combination",
26
+ "field.combination": "[ko]combination",
27
+ "field.deleted": "[ko]deleted",
33
28
  "field.density": "[ko]density",
34
29
  "field.depth": "[ko]depth",
35
30
  "field.description": "[ko]description",
36
31
  "field.expiration_period": "[ko]expiration Period",
37
32
  "field.gross_weight": "g[ko]ross weight",
38
- "field.nett_weight": "n[ko]ett weight",
39
33
  "field.gtin": "[ko]GTIN",
40
34
  "field.height": "[ko]height",
41
35
  "field.inventory_account_code": "[ko]inventory account code",
@@ -44,11 +38,14 @@
44
38
  "field.min_qty": "[ko]min qty",
45
39
  "field.movement": "[ko]movement",
46
40
  "field.name": "[ko]name",
41
+ "field.nett_weight": "n[ko]ett weight",
42
+ "field.packing_size": "[ko]packing size",
47
43
  "field.packing_type": "[ko]packing type",
48
44
  "field.product_info": "[ko]product info",
49
45
  "field.product_ref": "[ko]product ref",
50
46
  "field.product_set_info": "[ko]product set info",
51
- "field.ref_code": "[ko] ref code",
47
+ "field.ref_code": "[ko]ref code",
48
+ "field.require_serial_number_scanning": "[ko]require serial number scanning",
52
49
  "field.required_checking_expiry": "[ko]required checking expiry",
53
50
  "field.require_serial_number_scanning_inbound": "[ko] require serial number scanning inbound",
54
51
  "field.require_serial_number_scanning_outbound": "[ko] require serial number scanning outbound",
@@ -64,11 +61,20 @@
64
61
  "field.weight_unit": "[ko]weight unit",
65
62
  "field.weight": "[ko]weight",
66
63
  "field.width": "[ko]width",
67
- "title.linked_products": "[ko] linked products",
64
+ "label.fefo": "[ko]FEFO",
65
+ "label.fmfo": "[ko]FMFO",
66
+ "label.fifo": "[ko]FIFO",
67
+ "label.lifo": "[ko]LIFO",
68
+ "label.location": "[ko]location",
69
+ "text.data_restore_successfully": "[ko]data restore successfully",
70
+ "text.invalid_bundle_qty_for_item_number": "[ko]invalid bundle qty for item number",
71
+ "text.invalid_qty_for_item_number_x": "[ko]invalid qty for item #{state.x}",
72
+ "text.there_is_nothing_to_restore": "[ko]there is nothing to restore",
73
+ "title.combination_sets": "[ko]combination sets",
74
+ "title.combination": "[ko]combination",
75
+ "title.linked_products": "[ko]linked products",
68
76
  "title.product_bundle_setting": "[ko]product bundle setting",
69
77
  "title.product_bundle": "[ko]product bundle",
70
78
  "title.product_set": "[ko]product set",
71
- "title.product": "[ko]product",
72
- "title.combination": "[ko] combination",
73
- "title.combination_sets": "[ko] combination sets"
79
+ "title.product": "[ko]product"
74
80
  }
@@ -1,17 +1,11 @@
1
1
  {
2
- "field.require_serial_number_scanning": "[ms]require serial number scanning",
3
- "field.packing_size": "[ms]packing size",
4
- "field.deleted": "[ms]deleted",
5
- "button.restore": "[ms]restore",
6
- "text.there_is_nothing_to_restore": "[ms]there is nothing to restore",
7
- "text.data_restore_successfully": "[ms]data restore successfully",
8
- "text.invalid_bundle_qty_for_item_number": "[ms] invalid bundle qty for item number",
9
- "text.invalid_qty_for_item_number_x": "[ms] invalid qty for item #{state.x}",
2
+ "field.picking_strategy": "[ms]picking strategy",
10
3
  "button.add_new_product": "[ms]add new product",
11
4
  "button.back": "[ms]back",
12
5
  "button.cancel": "[ms]cancel",
13
6
  "button.delete": "[ms]delete",
14
7
  "button.link_product": "[ms]link product",
8
+ "button.restore": "[ms]restore",
15
9
  "button.save": "[ms]save",
16
10
  "button.sync_data": "[ms]sync data",
17
11
  "field.aux_unit": "[ms]aux unit",
@@ -30,12 +24,12 @@
30
24
  "field.child_qty": "[ms]child qty",
31
25
  "field.cogs_account_code": "[ms]COGS account code",
32
26
  "field.combination": "[ms] combination",
27
+ "field.deleted": "[ms]deleted",
33
28
  "field.density": "[ms]density",
34
29
  "field.depth": "[ms]depth",
35
30
  "field.description": "[ms]description",
36
31
  "field.expiration_period": "[ms]expiration Period",
37
32
  "field.gross_weight": "g[ms]ross weight",
38
- "field.nett_weight": "n[ms]ett weight",
39
33
  "field.gtin": "[ms]GTIN",
40
34
  "field.height": "[ms]height",
41
35
  "field.inventory_account_code": "[ms]inventory account code",
@@ -44,11 +38,14 @@
44
38
  "field.min_qty": "[ms]min qty",
45
39
  "field.movement": "[ms]movement",
46
40
  "field.name": "[ms]name",
41
+ "field.nett_weight": "n[ms]ett weight",
42
+ "field.packing_size": "[ms]packing size",
47
43
  "field.packing_type": "[ms]packing type",
48
44
  "field.product_info": "[ms]product info",
49
45
  "field.product_ref": "[ms]product ref",
50
46
  "field.product_set_info": "[ms]product set info",
51
47
  "field.ref_code": "[ms]ref code",
48
+ "field.require_serial_number_scanning": "[ms]require serial number scanning",
52
49
  "field.required_checking_expiry": "[ms]required checking expiry",
53
50
  "field.require_serial_number_scanning_inbound": "[ms]require serial number scanning inbound",
54
51
  "field.require_serial_number_scanning_outbound": "[ms]require serial number scanning outbound",
@@ -64,11 +61,20 @@
64
61
  "field.weight_unit": "[ms]weight unit",
65
62
  "field.weight": "[ms]weight",
66
63
  "field.width": "[ms]width",
64
+ "label.fefo": "[ms]FEFO",
65
+ "label.fmfo": "[ms]FMFO",
66
+ "label.fifo": "[ms]FIFO",
67
+ "label.lifo": "[ms]LIFO",
68
+ "label.location": "[ms]location",
69
+ "text.data_restore_successfully": "[ms]data restore successfully",
70
+ "text.invalid_bundle_qty_for_item_number": "[ms] invalid bundle qty for item number",
71
+ "text.invalid_qty_for_item_number_x": "[ms] invalid qty for item #{state.x}",
72
+ "text.there_is_nothing_to_restore": "[ms]there is nothing to restore",
73
+ "title.combination_sets": "[ms] combination sets",
74
+ "title.combination": "[ms] combination",
67
75
  "title.linked_products": "[ms] linked products",
68
76
  "title.product_bundle_setting": "[ms]product bundle setting",
69
77
  "title.product_bundle": "[ms]product bundle",
70
78
  "title.product_set": "[ms]product set",
71
- "title.product": "[ms]product",
72
- "title.combination": "[ms] combination",
73
- "title.combination_sets": "[ms] combination sets"
79
+ "title.product": "[ms]product"
74
80
  }
@@ -1,21 +1,13 @@
1
1
  {
2
- "field.require_serial_number_scanning": "[zh]require serial number scanning",
3
- "button.restore": "[zh]restore",
4
- "text.there_is_nothing_to_restore": "[zh]there is nothing to restore",
5
- "text.data_restore_successfully": "[zh]data restore successfully",
6
- "text.invalid_bundle_qty_for_item_number": "[zh] invalid bundle qty for item number",
7
- "text.invalid_qty_for_item_number_x": "[zh] invalid qty for item #{state.x}",
8
-
2
+ "field.picking_strategy": "[zh]picking strategy",
9
3
  "button.add_new_product": "[zh]add new product",
10
4
  "button.back": "[zh]back",
11
5
  "button.cancel": "[zh]cancel",
12
6
  "button.delete": "[zh]delete",
13
7
  "button.link_product": "[zh]link product",
8
+ "button.restore": "[zh]restore",
14
9
  "button.save": "[zh]save",
15
10
  "button.sync_data": "[zh]sync data",
16
-
17
- "field.packing_size": "[zh]packing size",
18
- "field.deleted": "[zh]deleted",
19
11
  "field.aux_unit": "[zh]aux unit",
20
12
  "field.aux_value": "[zh]aux value",
21
13
  "field.brand_sku": "[zh]brand sku",
@@ -32,12 +24,12 @@
32
24
  "field.child_qty": "[zh]child qty",
33
25
  "field.cogs_account_code": "[zh]COGS account code",
34
26
  "field.combination": "[zh] combination",
27
+ "field.deleted": "[zh]deleted",
35
28
  "field.density": "[zh]density",
36
29
  "field.depth": "[zh]depth",
37
30
  "field.description": "[zh]description",
38
31
  "field.expiration_period": "[zh]expiration Period",
39
32
  "field.gross_weight": "[zh]gross weight",
40
- "field.nett_weight": "[zh]nett weight",
41
33
  "field.gtin": "[zh]GTIN",
42
34
  "field.height": "[zh]height",
43
35
  "field.inventory_account_code": "[zh]inventory account code",
@@ -46,11 +38,14 @@
46
38
  "field.min_qty": "[zh]min qty",
47
39
  "field.movement": "[zh]movement",
48
40
  "field.name": "[zh]name",
41
+ "field.nett_weight": "[zh]nett weight",
42
+ "field.packing_size": "[zh]packing size",
49
43
  "field.packing_type": "[zh]packing type",
50
44
  "field.product_info": "[zh]product info",
51
45
  "field.product_ref": "[zh]product ref",
52
46
  "field.product_set_info": "[zh]product set info",
53
47
  "field.ref_code": "[zh]ref code",
48
+ "field.require_serial_number_scanning": "[zh]require serial number scanning",
54
49
  "field.required_checking_expiry": "[zh]required checking expiry",
55
50
  "field.require_serial_number_scanning_inbound": "[zh]require serial number scanning inbound",
56
51
  "field.require_serial_number_scanning_outbound": "[zh]require serial number scanning outbound",
@@ -66,11 +61,20 @@
66
61
  "field.weight_unit": "[zh]weight unit",
67
62
  "field.weight": "[zh]weight",
68
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",
68
+ "label.location": "[ms]location",
69
+ "text.data_restore_successfully": "[zh]data restore successfully",
70
+ "text.invalid_bundle_qty_for_item_number": "[zh] invalid bundle qty for item number",
71
+ "text.invalid_qty_for_item_number_x": "[zh] invalid qty for item #{state.x}",
72
+ "text.there_is_nothing_to_restore": "[zh]there is nothing to restore",
73
+ "title.combination_sets": "[zh] combination sets",
74
+ "title.combination": "[zh] combination",
69
75
  "title.linked_products": "[zh] linked products",
70
76
  "title.product_bundle_setting": "[zh]product bundle setting",
71
77
  "title.product_bundle": "[zh]product bundle",
72
78
  "title.product_set": "[zh]product set",
73
- "title.product": "[zh]product",
74
- "title.combination": "[zh] combination",
75
- "title.combination_sets": "[zh] combination sets"
79
+ "title.product": "[zh]product"
76
80
  }