@things-factory/warehouse-ui 4.0.11 → 4.0.16

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.
@@ -1,14 +1,41 @@
1
+ export const LOCATION_STATUS = {
2
+ EMPTY: {
3
+ name: 'EMPTY',
4
+ value: 'EMPTY'
5
+ },
6
+ OCCUPIED: {
7
+ name: 'OCCUPIED',
8
+ value: 'OCCUPIED'
9
+ },
10
+ FULL: {
11
+ name: 'FULL',
12
+ value: 'FULL'
13
+ }
14
+ }
15
+
1
16
  export const LOCATION_TYPE = {
17
+ BIN: {
18
+ name: 'BIN',
19
+ value: 'BIN'
20
+ },
2
21
  BUFFER: {
3
- name: 'buffer_location',
22
+ name: 'BUFFER',
4
23
  value: 'BUFFER'
5
24
  },
6
- SHELF: {
7
- name: 'shelf_location',
8
- value: 'SHELF'
9
- },
10
25
  FLOOR: {
11
- name: 'floor_location',
26
+ name: 'FLOOR',
12
27
  value: 'FLOOR'
28
+ },
29
+ QUARANTINE: {
30
+ name: 'QUARANTINE',
31
+ value: 'QUARANTINE'
32
+ },
33
+ RESERVE: {
34
+ name: 'RESERVE',
35
+ value: 'RESERVE'
36
+ },
37
+ SHELF: {
38
+ name: 'SHELF',
39
+ value: 'SHELF'
13
40
  }
14
41
  }
@@ -1,17 +1,21 @@
1
- import { DirectPrinter } from '@things-factory/barcode-base'
2
1
  import '@things-factory/form-ui'
3
2
  import '@things-factory/grist-ui'
3
+ import './generate-location-list'
4
+
5
+ import gql from 'graphql-tag'
6
+ import { css, html } from 'lit-element'
7
+ import { connect } from 'pwa-helpers/connect-mixin'
8
+
9
+ import { DirectPrinter } from '@things-factory/barcode-base'
4
10
  import { i18next, localize } from '@things-factory/i18n-base'
5
11
  import { openImportPopUp } from '@things-factory/import-ui'
6
12
  import { openPopup } from '@things-factory/layout-base'
7
13
  import { client, CustomAlert, PageView, store } from '@things-factory/shell'
14
+ import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
8
15
  import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
9
- import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
10
- import gql from 'graphql-tag'
11
- import { css, html } from 'lit-element'
12
- import { connect } from 'pwa-helpers/connect-mixin'
16
+
17
+ import { LOCATION_STATUS, LOCATION_TYPE } from '../constants'
13
18
  import { LOCATION_LABEL_SETTING_KEY } from './constants'
14
- import './generate-location-list'
15
19
 
16
20
  class LocationList extends connect(store)(localize(i18next)(PageView)) {
17
21
  static get styles() {
@@ -129,8 +133,19 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
129
133
  {
130
134
  label: i18next.t('field.type'),
131
135
  name: 'type',
132
- type: 'text',
133
- props: { searchOper: 'i_like' }
136
+ type: 'select',
137
+ options: [
138
+ { value: '' },
139
+ ...Object.values(LOCATION_TYPE)
140
+ .map(type => {
141
+ return {
142
+ name: type.name,
143
+ value: type.value
144
+ }
145
+ })
146
+ .sort((a, b) => (a.name > b.name ? 1 : -1))
147
+ ],
148
+ props: { searchOper: 'eq' }
134
149
  },
135
150
  {
136
151
  label: i18next.t('field.zone'),
@@ -159,8 +174,19 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
159
174
  {
160
175
  label: i18next.t('field.status'),
161
176
  name: 'status',
162
- type: 'text',
163
- props: { searchOper: 'i_like' }
177
+ type: 'select',
178
+ options: [
179
+ { value: '' },
180
+ ...Object.values(LOCATION_STATUS)
181
+ .map(status => {
182
+ return {
183
+ name: status.name,
184
+ value: status.value
185
+ }
186
+ })
187
+ .sort((a, b) => (a.name > b.name ? 1 : -1))
188
+ ],
189
+ props: { searchOper: 'eq' }
164
190
  }
165
191
  ]
166
192
 
@@ -181,10 +207,18 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
181
207
  width: 150
182
208
  },
183
209
  {
184
- type: 'string',
210
+ type: 'select',
185
211
  name: 'type',
186
212
  header: i18next.t('field.type'),
187
- record: { editable: true, align: 'center' },
213
+ record: {
214
+ editable: true,
215
+ options: [
216
+ '',
217
+ ...Object.values(LOCATION_TYPE)
218
+ .map(type => type.value)
219
+ .sort()
220
+ ]
221
+ },
188
222
  imex: { header: i18next.t('field.type'), key: 'type', width: 50, type: 'string' },
189
223
  sortable: true,
190
224
  width: 150
@@ -226,10 +260,18 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
226
260
  width: 80
227
261
  },
228
262
  {
229
- type: 'string',
263
+ type: 'select',
230
264
  name: 'status',
231
265
  header: i18next.t('field.status'),
232
- record: { editable: true, align: 'center' },
266
+ record: {
267
+ editable: true,
268
+ options: [
269
+ '',
270
+ ...Object.values(LOCATION_STATUS)
271
+ .map(status => status.value)
272
+ .sort()
273
+ ]
274
+ },
233
275
  imex: { header: i18next.t('field.status'), key: 'status', width: 50, type: 'string' },
234
276
  sortable: true,
235
277
  width: 80
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/warehouse-ui",
3
- "version": "4.0.11",
3
+ "version": "4.0.16",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,15 +24,15 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/barcode-base": "^4.0.11",
28
- "@things-factory/code-base": "^4.0.11",
29
- "@things-factory/form-ui": "^4.0.11",
30
- "@things-factory/grist-ui": "^4.0.11",
31
- "@things-factory/i18n-base": "^4.0.11",
32
- "@things-factory/import-ui": "^4.0.11",
33
- "@things-factory/layout-base": "^4.0.11",
34
- "@things-factory/shell": "^4.0.11",
35
- "@things-factory/warehouse-base": "^4.0.11"
27
+ "@things-factory/barcode-base": "^4.0.16",
28
+ "@things-factory/code-base": "^4.0.16",
29
+ "@things-factory/form-ui": "^4.0.16",
30
+ "@things-factory/grist-ui": "^4.0.16",
31
+ "@things-factory/i18n-base": "^4.0.16",
32
+ "@things-factory/import-ui": "^4.0.16",
33
+ "@things-factory/layout-base": "^4.0.16",
34
+ "@things-factory/shell": "^4.0.16",
35
+ "@things-factory/warehouse-base": "^4.0.16"
36
36
  },
37
- "gitHead": "47745d8cdbe99f11d8d69bbcab3901c9771525a0"
37
+ "gitHead": "5a56e53e09d5b0a47b7446dbb2fa696232ad5414"
38
38
  }