@things-factory/operato-wms 4.2.3 → 4.2.6

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.
@@ -103,7 +103,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
103
103
  <data-grist
104
104
  .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
105
105
  .config=${this.config}
106
- .data=${this._data}
107
106
  .fetchHandler="${this.fetchHandler.bind(this)}"
108
107
  @record-change="${this.customerChange.bind(this)}"
109
108
  @field-change="${this.fieldChange.bind(this)}"
@@ -379,7 +378,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
379
378
  sortable: false,
380
379
  handlers: {
381
380
  click: (columns, data, column, record, rowIndex) => {
382
- if (record.qty > 0) this._openSerialNumberPopup(record, rowIndex)
381
+ if (record.qty > 0) this._openSerialNumberPopup(record, rowIndex, data.records)
383
382
  }
384
383
  },
385
384
  width: 80
@@ -600,7 +599,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
600
599
  }
601
600
  })
602
601
 
603
- this._data = {
602
+ return {
604
603
  total: response.data.inventories.total || 0,
605
604
  records: response.data.inventories.items || []
606
605
  }
@@ -1129,7 +1128,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1129
1128
  )
1130
1129
  }
1131
1130
 
1132
- _openSerialNumberPopup(inventory, rowIndex) {
1131
+ _openSerialNumberPopup(inventory, rowIndex, records) {
1133
1132
  const removable =
1134
1133
  inventory?.product?.isRequireSerialNumberScanningOutbound &&
1135
1134
  inventory?.product?.isRequireSerialNumberScanningInbound
@@ -1141,6 +1140,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1141
1140
  inventory?.product?.isRequireSerialNumberScanningInbound
1142
1141
  ? true
1143
1142
  : false
1143
+
1144
1144
  openPopup(
1145
1145
  html`
1146
1146
  <serial-number-list-popup
@@ -1162,7 +1162,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1162
1162
  }
1163
1163
 
1164
1164
  let inventoryItemChangesJson = JSON.stringify(newRecords)
1165
- let currentInventoryItemCount = this._data.records[rowIndex]?.inventoryItemCount || 0
1165
+ let currentInventoryItemCount = records[rowIndex]?.inventoryItemCount || 0
1166
1166
 
1167
1167
  this.dataGrist.dirtyData.records[rowIndex].inventoryItemChanges = inventoryItemChangesJson
1168
1168
  this.dataGrist.dirtyData.records[rowIndex].inventoryItemCount =
@@ -1182,9 +1182,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1182
1182
  }
1183
1183
  this.dataGrist.dirtyData.records[rowIndex].__dirty__ = 'M'
1184
1184
 
1185
- if (this._data.records[rowIndex]) {
1186
- this._data.records[rowIndex].inventoryItemChanges = inventoryItemChangesJson
1187
- this._data.records[rowIndex].inventoryItemCount = currentInventoryItemCount + totalSerialNumber
1185
+ if (records[rowIndex]) {
1186
+ records[rowIndex].inventoryItemChanges = inventoryItemChangesJson
1187
+ records[rowIndex].inventoryItemCount = currentInventoryItemCount + totalSerialNumber
1188
1188
  }
1189
1189
  }}"
1190
1190
  ></serial-number-list-popup>
@@ -110,7 +110,7 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
110
110
  async pageInitialized() {
111
111
  const _worksheetStatus = await getCodeByName('WORKSHEET_STATUS')
112
112
  const partners = [...(await this._fetchPartners())]
113
-
113
+
114
114
  this._searchFields = [
115
115
  {
116
116
  name: 'name',
@@ -153,6 +153,12 @@ class MergedOutboundWorksheet extends localize(i18next)(PageView) {
153
153
  ],
154
154
  props: { searchOper: 'eq' }
155
155
  },
156
+ {
157
+ name: 'assignee',
158
+ label: i18next.t('field.picker'),
159
+ type: 'text',
160
+ props: { searchOper: 'i_like' }
161
+ },
156
162
  {
157
163
  label: i18next.t('field.from_date'),
158
164
  name: 'fromDate',
@@ -97,7 +97,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
97
97
 
98
98
  get context() {
99
99
  var actions = []
100
- if (this._hasBinPicking && this.refPickingType === PICKING_TYPES.PICKING.value) {
100
+ if (this._hasBinPicking && this.refPickingType === PICKING_TYPES.PICKING.value || PICKING_TYPES.BATCH_PICKING.value) {
101
101
  actions.push({
102
102
  title: i18next.t('button.get_task'),
103
103
  action: this.getTask.bind(this),
@@ -1,5 +1,5 @@
1
1
  import { i18next, localize } from '@things-factory/i18n-base'
2
- import { client } from '@things-factory/shell'
2
+ import { client,gqlContext } from '@things-factory/shell'
3
3
  import { isMobileDevice } from '@things-factory/utils'
4
4
  import gql from 'graphql-tag'
5
5
  import { css, html, LitElement } from 'lit-element'
@@ -61,7 +61,10 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
61
61
  return this.renderRoot.querySelector('data-grist')
62
62
  }
63
63
 
64
- firstUpdated() {
64
+ async firstUpdated() {
65
+
66
+ const roles = [...(await this.fetchRoles())]
67
+
65
68
  this.searchFields = [
66
69
  {
67
70
  name: 'name',
@@ -74,6 +77,23 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
74
77
  label: i18next.t('field.email'),
75
78
  type: 'text',
76
79
  props: { searchOper: 'i_like' }
80
+ },
81
+ {
82
+ label: i18next.t('field.role'),
83
+ name: 'roles',
84
+ type: 'select',
85
+ options: [
86
+ { value: '' },
87
+ ...roles
88
+ .map(roles => {
89
+ return {
90
+ name: `${roles.name}`,
91
+ value: roles.name
92
+ }
93
+ })
94
+ .sort(this._compareValues('name', 'asc'))
95
+ ],
96
+ props: { searchOper: 'eq' }
77
97
  }
78
98
  ]
79
99
 
@@ -91,24 +111,34 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
91
111
  type: 'string',
92
112
  name: 'name',
93
113
  header: i18next.t('field.name'),
114
+ sortable: true,
115
+ width: 150
116
+ },
117
+ {
118
+ type: 'string',
119
+ name: 'roles',
120
+ header: i18next.t('field.role'),
94
121
  width: 150
95
122
  },
96
123
  {
97
124
  type: 'string',
98
125
  name: 'email',
99
126
  header: i18next.t('field.email'),
127
+ sortable: true,
100
128
  width: 200
101
129
  },
102
130
  {
103
131
  type: 'string',
104
132
  name: 'pending',
105
133
  header: i18next.t('label.pending'),
134
+ sortable: true,
106
135
  width: 100
107
136
  },
108
137
  {
109
138
  type: 'string',
110
139
  name: 'picking',
111
140
  header: i18next.t('label.picking'),
141
+ sortable: true,
112
142
  width: 100
113
143
  }
114
144
  ]
@@ -116,27 +146,26 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
116
146
  }
117
147
 
118
148
  async fetchHandler({ page, limit, sorters }) {
119
- const { name, email } = this.searchForm?.serialize()
149
+ const filters = await this.searchForm.getQueryFilters()
150
+ const pagination = { }
151
+ const sortings = sorters || []
120
152
 
121
153
  const response = await client.query({
122
154
  query: gql`
123
- query pickingAssignmentStatusByUsers($name: String, $email: String) {
124
- pickingAssignmentStatusByUsers(name: $name, email: $email) {
155
+ query pickingAssignmentStatusByUsers($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
156
+ pickingAssignmentStatusByUsers(filters: $filters, pagination: $pagination, sortings: $sortings) {
125
157
  user {
126
158
  id
127
159
  name
128
160
  email
161
+ description
129
162
  }
130
- pending {
131
- id
132
- }
133
- picking {
134
- id
135
- }
163
+ pending
164
+ picking
136
165
  }
137
166
  }
138
167
  `,
139
- variables: { name, email }
168
+ variables: { filters, pagination, sortings}
140
169
  })
141
170
 
142
171
  if (!response.errors) {
@@ -147,14 +176,57 @@ class SelectOperatorPopup extends localize(i18next)(LitElement) {
147
176
  ...item,
148
177
  name: item.user.name,
149
178
  email: item.user.email,
150
- pending: item.pending?.length || 0,
151
- picking: item.picking?.length || 0
179
+ roles: item.user.description
152
180
  }
153
181
  })
154
182
  }
155
183
  }
156
184
  }
157
185
 
186
+ async fetchRoles() {
187
+ const response = await client.query({
188
+ query: gql`
189
+ query roles($sortings: [Sorting!]) {
190
+ roles(sortings: $sortings) {
191
+ items {
192
+ id
193
+ name
194
+ description
195
+ privileges {
196
+ id
197
+ name
198
+ }
199
+ }
200
+ total
201
+ }
202
+ }
203
+ `,
204
+ variables: { sortings: [{ name: 'name' }] },
205
+ context: gqlContext()
206
+ })
207
+
208
+ return response.data.roles.items
209
+ }
210
+
211
+ _compareValues(key, order = 'asc') {
212
+ return function innerSort(a, b) {
213
+ if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
214
+ return 0
215
+ }
216
+
217
+ const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
218
+ const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
219
+
220
+ let comparison = 0
221
+ if (varA > varB) {
222
+ comparison = 1
223
+ } else if (varA < varB) {
224
+ comparison = -1
225
+ }
226
+ return order === 'desc' ? comparison * -1 : comparison
227
+ }
228
+ }
229
+
158
230
  selectOperator() {
159
231
  const selectedOperator = this.dataGrist.selected[0]
160
232
  if (selectedOperator?.name) {
@@ -156,6 +156,12 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
156
156
  ],
157
157
  props: { searchOper: 'eq' }
158
158
  },
159
+ {
160
+ name: 'assignee',
161
+ label: i18next.t('field.picker'),
162
+ type: 'text',
163
+ props: { searchOper: 'i_like' }
164
+ },
159
165
  {
160
166
  label: i18next.t('field.from_date'),
161
167
  name: 'fromDate',
@@ -186,7 +192,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
186
192
  },
187
193
  {
188
194
  label: i18next.t('field.cross_docking'),
189
- name: 'crossDocking',
195
+ name: 'crossDocking',
190
196
  type: 'checkbox',
191
197
  props: { searchOper: 'eq' },
192
198
  attrs: ['indeterminate']
@@ -174,7 +174,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
174
174
  <label>${i18next.t('label.company')}</label>
175
175
  <input name="bizplace" readonly />
176
176
 
177
- <label>${i18next.t('label.assignee')}</label>
177
+ <label>${i18next.t('label.picker')}</label>
178
178
  <input name="assignee" readonly />
179
179
 
180
180
  <label>${i18next.t('label.status')}</label>
@@ -241,7 +241,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
241
241
  disabled
242
242
  />
243
243
 
244
- <label>${i18next.t('label.assignee')}</label>
244
+ <label>${i18next.t('label.picker')}</label>
245
245
  <input name="assignee" readonly />
246
246
  </fieldset>
247
247
  </form>
@@ -2,31 +2,34 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- ## 23rd March Updates
5
+ ## 5 April Update
6
6
 
7
- Hope you are all doing well and are positively negative.
7
+ #### Get a head start in April 2022 with our new features and fixes in the past month!
8
8
 
9
- We are launching a new feature on **31 March 2022** (Thursday).
9
+ #### This time, we bring to you
10
10
 
11
+ <div>
12
+ 1. Product Level Picking Strategy
13
+ </div>
14
+ <div>
15
+ 2. Serial Number Scanning for Inbound and Outbound
16
+ </div>
17
+ <div>
18
+ 3. Bin Application in Batch Picking
19
+ </div>
20
+ <div>
21
+ 4. Bulk Assign Pickers
22
+ </div>
23
+ <div>
24
+ 5. Bug fixes and API updates!
25
+ </div>
11
26
  <br>
12
-
13
- ## Product Level Picking Strategy
14
-
15
- This feature will help you to
16
-
17
- **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
18
- **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
19
- **One-time setting to relieve your load from selecting inventory during worksheet processing.**
20
-
27
+ https://bit.ly/220407_Hatio_Release
21
28
  <br>
22
29
 
23
- You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
24
-
25
- Otherwise, the default picking strategy (FIFO) will be set to all products.
26
-
27
- For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
28
-
29
- Please get in touch with support@hatio.asia if you need assistance.
30
+ Should you have any inquiry, feel free to contact support@hatio.asia!
31
+ <br>
32
+ Stay safe and positively negative!
30
33
 
31
34
  <br>
32
35
 
@@ -2,31 +2,34 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- ## 23rd March Updates
5
+ ## 5 April Update
6
6
 
7
- Hope you are all doing well and are positively negative.
7
+ #### Get a head start in April 2022 with our new features and fixes in the past month!
8
8
 
9
- We are launching a new feature on **31 March 2022** (Thursday).
9
+ #### This time, we bring to you
10
10
 
11
+ <div>
12
+ 1. Product Level Picking Strategy
13
+ </div>
14
+ <div>
15
+ 2. Serial Number Scanning for Inbound and Outbound
16
+ </div>
17
+ <div>
18
+ 3. Bin Application in Batch Picking
19
+ </div>
20
+ <div>
21
+ 4. Bulk Assign Pickers
22
+ </div>
23
+ <div>
24
+ 5. Bug fixes and API updates!
25
+ </div>
11
26
  <br>
12
-
13
- ## Product Level Picking Strategy
14
-
15
- This feature will help you to
16
-
17
- **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
18
- **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
19
- **One-time setting to relieve your load from selecting inventory during worksheet processing.**
20
-
27
+ https://bit.ly/220407_Hatio_Release
21
28
  <br>
22
29
 
23
- You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
24
-
25
- Otherwise, the default picking strategy (FIFO) will be set to all products.
26
-
27
- For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
28
-
29
- Please get in touch with support@hatio.asia if you need assistance.
30
+ Should you have any inquiry, feel free to contact support@hatio.asia!
31
+ <br>
32
+ Stay safe and positively negative!
30
33
 
31
34
  <br>
32
35
 
@@ -2,31 +2,34 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- ## 23rd March Updates
5
+ ## 5 April Update
6
6
 
7
- Hope you are all doing well and are positively negative.
7
+ #### Get a head start in April 2022 with our new features and fixes in the past month!
8
8
 
9
- We are launching a new feature on **31 March 2022** (Thursday).
9
+ #### This time, we bring to you
10
10
 
11
+ <div>
12
+ 1. Product Level Picking Strategy
13
+ </div>
14
+ <div>
15
+ 2. Serial Number Scanning for Inbound and Outbound
16
+ </div>
17
+ <div>
18
+ 3. Bin Application in Batch Picking
19
+ </div>
20
+ <div>
21
+ 4. Bulk Assign Pickers
22
+ </div>
23
+ <div>
24
+ 5. Bug fixes and API updates!
25
+ </div>
11
26
  <br>
12
-
13
- ## Product Level Picking Strategy
14
-
15
- This feature will help you to
16
-
17
- **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
18
- **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
19
- **One-time setting to relieve your load from selecting inventory during worksheet processing.**
20
-
27
+ https://bit.ly/220407_Hatio_Release
21
28
  <br>
22
29
 
23
- You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
24
-
25
- Otherwise, the default picking strategy (FIFO) will be set to all products.
26
-
27
- For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
28
-
29
- Please get in touch with support@hatio.asia if you need assistance.
30
+ Should you have any inquiry, feel free to contact support@hatio.asia!
31
+ <br>
32
+ Stay safe and positively negative!
30
33
 
31
34
  <br>
32
35
 
@@ -2,31 +2,34 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- ## 23rd March Updates
5
+ ## 5 April Update
6
6
 
7
- Hope you are all doing well and are positively negative.
7
+ #### Get a head start in April 2022 with our new features and fixes in the past month!
8
8
 
9
- We are launching a new feature on **31 March 2022** (Thursday).
9
+ #### This time, we bring to you
10
10
 
11
+ <div>
12
+ 1. Product Level Picking Strategy
13
+ </div>
14
+ <div>
15
+ 2. Serial Number Scanning for Inbound and Outbound
16
+ </div>
17
+ <div>
18
+ 3. Bin Application in Batch Picking
19
+ </div>
20
+ <div>
21
+ 4. Bulk Assign Pickers
22
+ </div>
23
+ <div>
24
+ 5. Bug fixes and API updates!
25
+ </div>
11
26
  <br>
12
-
13
- ## Product Level Picking Strategy
14
-
15
- This feature will help you to
16
-
17
- **Set picking strategy (FIFO, FEFO, FMFO, LIFO, Location) per product;** <br>
18
- **Automate the inventory assignment - no more hassle in assigning the inventory during the release of inventories;**<br>
19
- **One-time setting to relieve your load from selecting inventory during worksheet processing.**
20
-
27
+ https://bit.ly/220407_Hatio_Release
21
28
  <br>
22
29
 
23
- You are encouraged to update Product Master in https://operatohub.com/ **from 24 to 30 March 2022.**
24
-
25
- Otherwise, the default picking strategy (FIFO) will be set to all products.
26
-
27
- For more details on the update, please refer to this release document (https://bit.ly/220323_Hatio_Release).
28
-
29
- Please get in touch with support@hatio.asia if you need assistance.
30
+ Should you have any inquiry, feel free to contact support@hatio.asia!
31
+ <br>
32
+ Stay safe and positively negative!
30
33
 
31
34
  <br>
32
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.2.3",
3
+ "version": "4.2.6",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -92,7 +92,7 @@
92
92
  "@things-factory/print-ui": "^4.1.40",
93
93
  "@things-factory/product-base": "^4.2.3",
94
94
  "@things-factory/resource-ui": "^4.1.40",
95
- "@things-factory/sales-ui": "^4.2.3",
95
+ "@things-factory/sales-ui": "^4.2.6",
96
96
  "@things-factory/scene-data-transform": "^4.1.40",
97
97
  "@things-factory/scene-excel": "^4.1.40",
98
98
  "@things-factory/scene-firebase": "^4.1.40",
@@ -108,8 +108,8 @@
108
108
  "@things-factory/system-ui": "^4.1.40",
109
109
  "@things-factory/transport-base": "^4.2.0",
110
110
  "@things-factory/tutorial-ui": "^4.1.40",
111
- "@things-factory/warehouse-base": "^4.2.3",
112
- "@things-factory/worksheet-base": "^4.2.3"
111
+ "@things-factory/warehouse-base": "^4.2.6",
112
+ "@things-factory/worksheet-base": "^4.2.6"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@things-factory/builder": "^4.1.40",
@@ -118,5 +118,5 @@
118
118
  "cypress-localstorage-commands": "^1.6.1",
119
119
  "eslint-plugin-cypress": "^2.12.1"
120
120
  },
121
- "gitHead": "38faf657cf86a08d942c4ada9b36b2f62fb94cce"
121
+ "gitHead": "a6ae8ce83ac935693632447e58012bd2d5aee512"
122
122
  }
@@ -9,8 +9,8 @@
9
9
  "button.approve_cancellation": "approve cancellation",
10
10
  "button.approve": "approve",
11
11
  "button.arrived": "arrived",
12
- "button.assign_warehouse": "assign warehouse",
13
12
  "button.assign_picker": "assign picker",
13
+ "button.assign_warehouse": "assign warehouse",
14
14
  "button.assign": "assign",
15
15
  "button.auto_assign": "auto assign",
16
16
  "button.auto_select": "auto select",
@@ -132,10 +132,10 @@
132
132
  "field.arrival_notice": "arrival notice",
133
133
  "field.assigned_load": "assigned load",
134
134
  "field.assigned_pack_qty": "assigned pack qty",
135
+ "field.assigned_picker":"assigned picker",
135
136
  "field.assigned_qty": "assigned qty",
136
137
  "field.assigned_uom_value": "assigned uom value",
137
138
  "field.assigned": "assigned",
138
- "field.assigned_picker": "assigned picker",
139
139
  "field.attention_to": "attention to",
140
140
  "field.aux_unit_2": "aux unit 2",
141
141
  "field.aux_unit": "aux unit",
@@ -369,6 +369,7 @@
369
369
  "field.picked_at": "picked at",
370
370
  "field.picked_by": "picked by",
371
371
  "field.picked_qty": "picked qty",
372
+ "field.picker":"picker",
372
373
  "field.picking_complete": "picking complete",
373
374
  "field.picking_start": "picking start",
374
375
  "field.pickup_time_id": "pickup time id",
@@ -437,6 +438,7 @@
437
438
  "field.ro_no": "RO no.",
438
439
  "field.ro_type": "RO type",
439
440
  "field.ro": "RO",
441
+ "filed.role":"role",
440
442
  "field.rounded_uom_value": "rounded uom value",
441
443
  "field.route": "route",
442
444
  "field.route_label": "route label",
@@ -800,6 +802,7 @@
800
802
  "label.picking_type": "picking type",
801
803
  "label.picking": "picking",
802
804
  "label.pickup_date": "pickup date",
805
+ "label.picker":"picker",
803
806
  "label.please_select_a_container_size": "please select a container size",
804
807
  "label.please_select_an_item": "please select an item",
805
808
  "label.please_select_template_type": "please select template type",