@things-factory/operato-wms 4.3.414 → 4.3.416

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,17 +3,31 @@ import '@things-factory/grist-ui'
3
3
  import './dispatcher-verification-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 { GhostPrint } from '@operato/ghost-print'
9
12
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
10
- import { i18next, localize } from '@things-factory/i18n-base'
13
+ import {
14
+ i18next,
15
+ localize
16
+ } from '@things-factory/i18n-base'
11
17
  import { openPopup } from '@things-factory/layout-base'
12
- import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
18
+ import {
19
+ client,
20
+ CustomAlert,
21
+ navigate,
22
+ PageView
23
+ } from '@things-factory/shell'
13
24
  import { CommonButtonStyles } from '@things-factory/styles'
14
25
  import { isMobileDevice } from '@things-factory/utils'
15
26
 
16
- import { MANIFEST_STATUS, ORDER_STATUS } from '../constants'
27
+ import {
28
+ MANIFEST_STATUS,
29
+ ORDER_STATUS
30
+ } from '../constants'
17
31
 
18
32
  class LoadingManifestDetail extends localize(i18next)(PageView) {
19
33
  static get styles() {
@@ -25,6 +39,7 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
25
39
  flex-direction: column;
26
40
  overflow-x: auto;
27
41
  }
42
+
28
43
  .container {
29
44
  flex: 1;
30
45
  display: flex;
@@ -42,6 +57,7 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
42
57
  overflow-y: hidden;
43
58
  flex: 1;
44
59
  }
60
+
45
61
  h2 {
46
62
  padding: var(--subtitle-padding);
47
63
  font: var(--subtitle-font);
@@ -62,6 +78,10 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
62
78
  color: var(--grist-title-icon-color);
63
79
  }
64
80
 
81
+ search-form {
82
+ bottom: 10px;
83
+ }
84
+
65
85
  h2 + data-grist {
66
86
  padding-top: var(--grist-title-with-grid-padding);
67
87
  }
@@ -86,13 +106,15 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
86
106
 
87
107
  static get properties() {
88
108
  return {
109
+ _searchFields: Array,
89
110
  shippingData: Object,
90
111
  shippingGristConfig: Object,
91
112
  _manifestNo: String,
92
113
  _status: String,
93
114
  _removePackages: Array,
94
115
  _selectedStatus: String,
95
- _addExpanded: Boolean
116
+ _addExpanded: Boolean,
117
+ _companyList: Array
96
118
  }
97
119
  }
98
120
 
@@ -100,6 +122,22 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
100
122
  return this.shadowRoot.querySelector('barcode-scanable-input[name=trackingNo]')?.shadowRoot.querySelector('input')
101
123
  }
102
124
 
125
+ get dataGrist() {
126
+ return this.shadowRoot.querySelector('data-grist')
127
+ }
128
+
129
+ get manifestForm() {
130
+ return this.shadowRoot.querySelector('form[name=manifest]')
131
+ }
132
+
133
+ get companyList() {
134
+ return this.searchForm.shadowRoot.querySelector('select[name=companyList]')
135
+ }
136
+
137
+ get searchForm() {
138
+ return this.shadowRoot.querySelector('search-form')
139
+ }
140
+
103
141
  _focusOnTrackingNoInput() {
104
142
  setTimeout(() => this.trackingNoInput.focus(), 50)
105
143
  }
@@ -139,14 +177,6 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
139
177
  }
140
178
  }
141
179
 
142
- get dataGrist() {
143
- return this.shadowRoot.querySelector('data-grist')
144
- }
145
-
146
- get manifestForm() {
147
- return this.shadowRoot.querySelector('form[name=manifest]')
148
- }
149
-
150
180
  render() {
151
181
  return html`
152
182
  <div class="form-container">
@@ -189,10 +219,22 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
189
219
  }
190
220
  })}
191
221
  </select>
222
+
223
+
192
224
  </fieldset>
225
+ <fieldset>
226
+ <legend>${i18next.t('title.information filter')}</legend>
227
+ </fieldset>
228
+
193
229
  </form>
194
230
  </div>
195
231
 
232
+ <search-form
233
+ id="search-form"
234
+ .fields=${this._searchFields}
235
+ @submit=${e => this.dataGrist.fetch()}
236
+ ></search-form
237
+
196
238
  <div class="container">
197
239
  <div class="grist">
198
240
  <h2>
@@ -207,40 +249,42 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
207
249
  .fetchHandler=${this._fetchManifestDetail.bind(this)}
208
250
  ></data-grist>
209
251
 
210
- ${this._status !== MANIFEST_STATUS.CLOSED.value
211
- ? html`
212
- <h2
213
- @click="${e => {
214
- this._addExpanded = !this._addExpanded
215
- this._focusOnTrackingNoInput()
216
- }}"
217
- >
218
- <mwc-icon>list_alt</mwc-icon>${i18next.t('title.add_tracking_no')}<mwc-icon
219
- >${this._addExpanded ? 'expand_less' : 'expand_more'}</mwc-icon
252
+ ${
253
+ this._status !== MANIFEST_STATUS.CLOSED.value
254
+ ? html`
255
+ <h2
256
+ @click="${e => {
257
+ this._addExpanded = !this._addExpanded
258
+ this._focusOnTrackingNoInput()
259
+ }}"
220
260
  >
221
- </h2>
222
-
223
- <div class="add" collapsable ?collapsed=${!this._addExpanded}>
224
- <form name="addTrackingNo" class="multi-column-form">
225
- <fieldset>
226
- <label>${i18next.t('label.scan_tracking_no')}</label>
227
- <barcode-scanable-input
228
- name="trackingNo"
229
- custom-input
230
- @keypress="${e => {
231
- if (e.keyCode === 13) {
232
- e.preventDefault()
233
- if (this.trackingNoInput.value) {
234
- this._addTrackingNo(this.trackingNoInput.value)
261
+ <mwc-icon>list_alt</mwc-icon>${i18next.t('title.add_tracking_no')}<mwc-icon
262
+ >${this._addExpanded ? 'expand_less' : 'expand_more'}</mwc-icon
263
+ >
264
+ </h2>
265
+
266
+ <div class="add" collapsable ?collapsed=${!this._addExpanded}>
267
+ <form name="addTrackingNo" class="multi-column-form">
268
+ <fieldset>
269
+ <label>${i18next.t('label.scan_tracking_no')}</label>
270
+ <barcode-scanable-input
271
+ name="trackingNo"
272
+ custom-input
273
+ @keypress="${e => {
274
+ if (e.keyCode === 13) {
275
+ e.preventDefault()
276
+ if (this.trackingNoInput.value) {
277
+ this._addTrackingNo(this.trackingNoInput.value)
278
+ }
235
279
  }
236
- }
237
- }}"
238
- ></barcode-scanable-input>
239
- </fieldset>
240
- </form>
241
- </div>
242
- `
243
- : ''}
280
+ }}"
281
+ ></barcode-scanable-input>
282
+ </fieldset>
283
+ </form>
284
+ </div>
285
+ `
286
+ : ''
287
+ }
244
288
  </div>
245
289
  </div>
246
290
  `
@@ -250,9 +294,27 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
250
294
  super()
251
295
  this._removePackages = []
252
296
  this._addExpanded = false
297
+ this._companyList = []
253
298
  }
254
299
 
255
300
  pageInitialized() {
301
+ this._searchFields = [
302
+ {
303
+ label: i18next.t('field.company'),
304
+ name: 'companyList',
305
+ type: 'select',
306
+ options: [
307
+ { value: '' },
308
+ ...this._companyList.map(sp => {
309
+ return {
310
+ name: sp,
311
+ value: sp
312
+ }
313
+ })
314
+ ],
315
+ props: { searchOper: 'eq' }
316
+ }
317
+ ]
256
318
  this.shippingGristConfig = {
257
319
  list: { fields: ['refNo', 'trackingNo', 'dispatchmentStatus'] },
258
320
  pagination: { infinite: true },
@@ -277,6 +339,14 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
277
339
  }
278
340
  },
279
341
  { type: 'gutter', gutterName: 'sequence' },
342
+ {
343
+ type: 'string',
344
+ name: 'bizplaceName',
345
+ label: true,
346
+ header: i18next.t('field.company'),
347
+ sortable: true,
348
+ width: 200
349
+ },
280
350
  {
281
351
  type: 'string',
282
352
  name: 'trackingNo',
@@ -358,8 +428,8 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
358
428
 
359
429
  const response = await client.query({
360
430
  query: gql`
361
- query manifest($name: String!, $sortings: [Sorting!]) {
362
- manifest(name: $name, sortings: $sortings) {
431
+ query manifest($filters: [Filter!], $name: String!, $sortings: [Sorting!]) {
432
+ manifest(filters: $filters, name: $name, sortings: $sortings) {
363
433
  id
364
434
  name
365
435
  dispatchedAt
@@ -380,15 +450,19 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
380
450
  orderStatus
381
451
  orderRemark
382
452
  manifestedAt
453
+ bizplaceId
454
+ bizplaceName
383
455
  }
384
456
  }
385
457
  }
386
458
  `,
387
- variables: { name: this._manifestNo, sortings: sorters }
459
+ variables: { name: this._manifestNo, sortings: sorters, filters: this.searchForm.queryFilters }
388
460
  })
389
461
 
462
+ const manifest = response.data.manifest
463
+
390
464
  if (!response.errors) {
391
- const manifest = response.data.manifest
465
+ let uniqueBizplaceNames = Array.from(new Set(manifest.trackingNos.map(item => item.bizplaceName)))
392
466
 
393
467
  this._status = manifest.status
394
468
  this._fillupForm(this.manifestForm, { ...manifest, totalTrackingNo: manifest.trackingNos?.length })
@@ -399,6 +473,20 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
399
473
  }
400
474
  this._removePackages = []
401
475
  this._showReset = false
476
+ let companyList = uniqueBizplaceNames
477
+ if (this._companyList.length < companyList.length) {
478
+ this._companyList = companyList
479
+ this._searchFields.filter(x => x.name == 'companyList')[0].options = [
480
+ { value: '' },
481
+ ...this._companyList.map(sp => {
482
+ return {
483
+ name: sp,
484
+ value: sp
485
+ }
486
+ })
487
+ ]
488
+ this._searchFields = [...this._searchFields]
489
+ }
402
490
  this.updateContext()
403
491
  }
404
492
  }
@@ -586,8 +674,11 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
586
674
  }
587
675
 
588
676
  _printManifest() {
677
+ const filterValue = this.searchForm?.queryFilters?.[0]?.value || null
678
+ const encodedFilterValue = encodeURIComponent(filterValue)
679
+
589
680
  GhostPrint.print({
590
- src: `/view_manifest/${this._manifestNo}`,
681
+ src: `/view_manifest/${this._manifestNo}?biz=${encodedFilterValue}`,
591
682
  pending: 1000,
592
683
  onfinish: () => {
593
684
  this._showToast({ message: i18next.t('text.document_has_been_generated') })
@@ -2,11 +2,21 @@ import '@things-factory/form-ui'
2
2
  import '@things-factory/grist-ui'
3
3
 
4
4
  import gql from 'graphql-tag'
5
- import { css, html } from 'lit-element'
5
+ import {
6
+ css,
7
+ html
8
+ } from 'lit-element'
6
9
 
7
10
  import { getCodeByName } from '@things-factory/code-base'
8
- import { i18next, localize } from '@things-factory/i18n-base'
9
- import { client, navigate, PageView } from '@things-factory/shell'
11
+ import {
12
+ i18next,
13
+ localize
14
+ } from '@things-factory/i18n-base'
15
+ import {
16
+ client,
17
+ navigate,
18
+ PageView
19
+ } from '@things-factory/shell'
10
20
  import { ScrollbarStyles } from '@things-factory/styles'
11
21
  import { isMobileDevice } from '@things-factory/utils'
12
22
 
@@ -0,0 +1,157 @@
1
+ import '@things-factory/grist-ui'
2
+
3
+ import {
4
+ css,
5
+ html,
6
+ LitElement
7
+ } from 'lit-element'
8
+
9
+ import {
10
+ i18next,
11
+ localize
12
+ } from '@things-factory/i18n-base'
13
+ import { navigate } from '@things-factory/shell'
14
+ import { ScrollbarStyles } from '@things-factory/styles'
15
+
16
+ class SelectManifestPopup extends localize(i18next)(LitElement) {
17
+ static get styles() {
18
+ return [
19
+ ScrollbarStyles,
20
+ css`
21
+ :host {
22
+ display: flex;
23
+ flex-direction: column;
24
+ overflow: hidden;
25
+ background-color: white;
26
+ width: 300px;
27
+ height: 200px;
28
+ }
29
+
30
+ #courier {
31
+ width: 155px;
32
+ height: 35px;
33
+ }
34
+
35
+ .container {
36
+ display: flex;
37
+ justify-content: center;
38
+ }
39
+
40
+ .select-courier {
41
+ display: flex;
42
+ flex-flow: column wrap;
43
+ transform: translateX(55%);
44
+ align-items: center;
45
+ gap: 10px;
46
+ }
47
+
48
+ .button-container {
49
+ transform: translateX(-45%);
50
+ display: flex;
51
+ margin-top: 130px;
52
+ }
53
+
54
+ .button-container input {
55
+ margin: 0 5px;
56
+ }
57
+
58
+ .button-container input[class='cancel'] {
59
+ background-color: white;
60
+ color: red;
61
+ padding: 10px 20px;
62
+ border: 2px solid red;
63
+ border-radius: 5px;
64
+ font-weight: bold;
65
+ padding: 8px 22px;
66
+ margin-right: 10px;
67
+ }
68
+
69
+ .button-container input[class='confirm'] {
70
+ background-color: #117e7f;
71
+ color: white;
72
+ padding: 10px 20px;
73
+ border: 1px solid white;
74
+ border-radius: 5px;
75
+ font-weight: bold;
76
+ }
77
+
78
+ .courierName h2 {
79
+ font: 12px;
80
+ color: rgb(58, 88, 119);
81
+ }
82
+
83
+ label[for='courier-name'] {
84
+ white-space: nowrap;
85
+ }
86
+
87
+ .courierName h5 {
88
+ white-space: nowrap;
89
+ }
90
+
91
+ h5 {
92
+ margin: 2px;
93
+ }
94
+
95
+ .wide-dropdown {
96
+ width: 200px;
97
+ }
98
+ `
99
+ ]
100
+ }
101
+
102
+ static get properties() {
103
+ return {
104
+ shippingCourier: String
105
+ }
106
+ }
107
+
108
+ render() {
109
+ return html` <div class="container">
110
+ <div class="select-courier">
111
+ <label for="courier-name">New Courier Scanned:</label>
112
+ <div class="courierName">
113
+ <h5>${this.shippingCourier}</h5>
114
+ </div>
115
+ <select id="courier" class="wide-dropdown">
116
+ <option value="newManifest">Create New Manifest</option>
117
+ <option value="existingManifest">Existing Manifest</option>
118
+ </select>
119
+ </div>
120
+ <div class="button-container">
121
+ <input type="button" value="Confirm" class="confirm" @click=${() => this._createLoadingManifest()} />
122
+ <input type="button" value="Cancel" class="cancel" @click=${this.closePopup} />
123
+ </div>
124
+ </div>`
125
+ }
126
+
127
+ closePopup() {
128
+ history.back()
129
+ }
130
+
131
+ async _createLoadingManifest() {
132
+ try {
133
+ const selectedOption = this.shadowRoot.getElementById('courier').value
134
+
135
+ if (selectedOption === 'newManifest') {
136
+ this.dispatchEvent(new CustomEvent('manifestSelected', { detail: true, bubbles: true, composed: true }))
137
+ } else {
138
+ navigate('existing_manifest_list')
139
+ }
140
+ } catch (e) {
141
+ this._showToast(e)
142
+ }
143
+ }
144
+
145
+ _showToast({ type, message }) {
146
+ document.dispatchEvent(
147
+ new CustomEvent('notify', {
148
+ detail: {
149
+ type,
150
+ message
151
+ }
152
+ })
153
+ )
154
+ }
155
+ }
156
+
157
+ window.customElements.define('select-manifest-popup', SelectManifestPopup)
@@ -2,9 +2,16 @@ import '@things-factory/grist-ui'
2
2
  import '@things-factory/biz-ui'
3
3
 
4
4
  import gql from 'graphql-tag'
5
- import { css, html, LitElement } from 'lit-element'
5
+ import {
6
+ css,
7
+ html,
8
+ LitElement
9
+ } from 'lit-element'
6
10
 
7
- import { i18next, localize } from '@things-factory/i18n-base'
11
+ import {
12
+ i18next,
13
+ localize
14
+ } from '@things-factory/i18n-base'
8
15
  import { client } from '@things-factory/shell'
9
16
 
10
17
  class TrackingInformationPopup extends localize(i18next)(LitElement) {
@@ -39,7 +46,7 @@ class TrackingInformationPopup extends localize(i18next)(LitElement) {
39
46
  async firstUpdated() {
40
47
  this.config = {
41
48
  rows: {
42
- selectable: false,
49
+ selectable: true,
43
50
  groups: [{ column: 'trackingNo' }, { column: 'sku' }]
44
51
  },
45
52
  columns: [
package/client/route.js CHANGED
@@ -219,6 +219,9 @@ export default function route(page) {
219
219
  import('./pages/manifest/loading-manifest-detail')
220
220
  return page
221
221
 
222
+ case 'existing_manifest_list':
223
+ import('./pages/manifest/existing-manifest-list')
224
+ return page
222
225
  /**
223
226
  * GRN Menus Section
224
227
  */
@@ -2,29 +2,21 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- ## 29 September Update
5
+ ## 19 February Update
6
6
 
7
- #### V4.3.327 Release Note
7
+ #### V4.3.415 Release Note
8
8
 
9
9
  #### Greetings to all,
10
10
 
11
- #### Celebrating the end of September with our latest updates for past two months.
11
+ #### We are happy to introduce our latest update which is enhanced manifest feature.
12
12
 
13
13
  <div style="text-align: left; display: inline-block;">
14
14
 
15
- - Warehouse Picking/Packing Rate
16
- - Option to Print Packing Type for Route Label
17
- - Inventory by Product
18
- - Assign Inventory during Worksheet Activation
19
- - Update Tracking Number
20
- - Shortage Report
21
- - Export Outbound Order Report with Picking Bin column
22
-
23
15
  </div>
24
16
 
25
17
  <br>
26
18
  For additional information about the aspects of the release, see the following link
27
- <a href="https://bit.ly/20230929_Hatio_ReleaseNote">V4.3.327 Release Note</a>
19
+ <a href="https://bitly.ws/3dxhw">V4.3.415 Release Note</a>
28
20
  <br>
29
21
 
30
22
  Should you have any inquiries, feel free to contact <a href="mailto: support@hatio.asia">support@hatio.asia</a>! Stay safe and positively negative!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.414",
3
+ "version": "4.3.416",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -91,7 +91,7 @@
91
91
  "@things-factory/print-ui": "^4.3.381",
92
92
  "@things-factory/product-base": "^4.3.398",
93
93
  "@things-factory/resource-ui": "^4.3.381",
94
- "@things-factory/sales-ui": "^4.3.414",
94
+ "@things-factory/sales-ui": "^4.3.416",
95
95
  "@things-factory/scene-data-transform": "^4.3.381",
96
96
  "@things-factory/scene-excel": "^4.3.381",
97
97
  "@things-factory/scene-firebase": "^4.3.381",
@@ -107,8 +107,8 @@
107
107
  "@things-factory/system-ui": "^4.3.381",
108
108
  "@things-factory/transport-base": "^4.3.381",
109
109
  "@things-factory/tutorial-ui": "^4.3.381",
110
- "@things-factory/warehouse-base": "^4.3.414",
111
- "@things-factory/worksheet-base": "^4.3.414"
110
+ "@things-factory/warehouse-base": "^4.3.416",
111
+ "@things-factory/worksheet-base": "^4.3.416"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.381",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "3badbd3b0ba661e42abed08751fd1ff68d0bddfb"
120
+ "gitHead": "992ba7b9c4fcc48cef99f05811ef1b756392c161"
121
121
  }
@@ -220,6 +220,10 @@ export default {
220
220
  tagname: 'loading-manifest-detail',
221
221
  page: 'loading_manifest_detail'
222
222
  },
223
+ {
224
+ tagname: 'existing-manifest-list',
225
+ page: 'existing_manifest_list'
226
+ },
223
227
  /**
224
228
  * Billing Menus Section
225
229
  */