@things-factory/operato-wms 4.3.346 → 4.3.347

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,20 +1,19 @@
1
1
  import '@things-factory/form-ui'
2
2
  import '@things-factory/grist-ui'
3
3
  import './route-label-popup'
4
+ import './select-operator-popup'
4
5
 
5
6
  import gql from 'graphql-tag'
6
7
  import { css, html } from 'lit-element'
7
8
 
8
- import './select-operator-popup'
9
9
  import { getCodeByName } from '@things-factory/code-base'
10
10
  import { i18next, localize } from '@things-factory/i18n-base'
11
- import { client, navigate, PageView } from '@things-factory/shell'
12
- import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
13
- import { isMobileDevice } from '@things-factory/utils'
14
11
  import { openPopup } from '@things-factory/layout-base'
12
+ import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
13
+ import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
14
+ import { isMobileDevice } from '@things-factory/utils'
15
15
 
16
16
  import { fetchSettingRule } from '../../fetch-setting-value'
17
-
18
17
  import { WORKSHEET_STATUS, WORKSHEET_TYPE } from '../constants'
19
18
 
20
19
  class SingleOutboundWorksheet extends localize(i18next)(PageView) {
@@ -82,6 +81,12 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
82
81
  ...CommonButtonStyles.activate
83
82
  })
84
83
 
84
+ actions.push({
85
+ title: i18next.t('button.activate'),
86
+ action: this._activateBulkWorksheet.bind(this),
87
+ ...CommonButtonStyles.activate
88
+ })
89
+
85
90
  return {
86
91
  title: i18next.t('title.outbound_worksheet'),
87
92
  actions,
@@ -289,7 +294,12 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
289
294
  type: 'boolean',
290
295
  name: 'releaseGoodPriorityDelivery',
291
296
  header: i18next.t('field.priority_delivery'),
292
- imex: { header: i18next.t('field.priority_delivery'), key: 'releaseGoodPriorityDelivery', width: 20, type: 'string' },
297
+ imex: {
298
+ header: i18next.t('field.priority_delivery'),
299
+ key: 'releaseGoodPriorityDelivery',
300
+ width: 20,
301
+ type: 'string'
302
+ },
293
303
  width: 120
294
304
  },
295
305
  {
@@ -460,7 +470,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
460
470
  releaseGoodCrossDocking: item.releaseGood.crossDocking,
461
471
  releaseGoodCourierOption: item.releaseGood.courierOption,
462
472
  releaseGoodPackingOption: item.releaseGood.packingOption,
463
- releaseGoodPriorityDelivery: item.releaseGood.priorityDelivery
473
+ releaseGoodPriorityDelivery: item.releaseGood.priorityDelivery
464
474
  }
465
475
  }) || {}
466
476
  }
@@ -500,10 +510,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
500
510
 
501
511
  _assignPicker() {
502
512
  try {
503
- let selectedData = this.dataGrist.selected.filter(item => {
504
- return item.status == 'DEACTIVATED'
505
- })
506
-
513
+ let selectedData = this.dataGrist.selected
507
514
  if (selectedData.length <= 0) throw new Error(i18next.t('text.no_available_worksheet_selected'))
508
515
 
509
516
  openPopup(
@@ -545,6 +552,58 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
545
552
  }
546
553
  }
547
554
 
555
+ async _activateBulkWorksheet() {
556
+ try {
557
+ let selectedData = this.dataGrist.selected.filter(item => {
558
+ if (item.status !== 'DEACTIVATED') {
559
+ throw new Error(i18next.t('text.please_select_order_with_status_deactivated_only'))
560
+ }
561
+ return item.status == 'DEACTIVATED'
562
+ })
563
+
564
+ if (selectedData.length <= 0)
565
+ throw new Error(i18next.t('text.please_select_at_least_one_order_with_status_deactivated_to_proceed'))
566
+
567
+ if (selectedData.length > 50)
568
+ throw new Error(i18next.t('text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed'))
569
+
570
+ const result = await CustomAlert({
571
+ title: i18next.t('title.are_you_sure'),
572
+ text: i18next.t('text.activate_picking_worksheet'),
573
+ confirmButton: { text: i18next.t('button.confirm') },
574
+ cancelButton: { text: i18next.t('button.cancel') }
575
+ })
576
+
577
+ if (!result.value) {
578
+ return
579
+ }
580
+
581
+ const response = await client.mutate({
582
+ mutation: gql`
583
+ mutation activateBulkPicking($worksheetNo: [String!]!) {
584
+ activateBulkPicking(worksheetNo: $worksheetNo) {
585
+ id
586
+ name
587
+ }
588
+ }
589
+ `,
590
+ variables: {
591
+ worksheetNo: selectedData.map(item => {
592
+ return item.name
593
+ })
594
+ }
595
+ })
596
+
597
+ if (!response.errors) {
598
+ this._showToast({ message: i18next.t('text.worksheet_activated') })
599
+ }
600
+ } catch (e) {
601
+ this._showToast(e)
602
+ } finally {
603
+ this.dataGrist.fetch()
604
+ }
605
+ }
606
+
548
607
  _modifyDateRange(e) {
549
608
  const fromDate = e.currentTarget.value
550
609
 
@@ -151,6 +151,11 @@ class WorksheetPicking extends localize(i18next)(PageView) {
151
151
  title: i18next.t('button.back'),
152
152
  action: () => history.back(),
153
153
  ...CommonButtonStyles.back
154
+ },
155
+ {
156
+ title: i18next.t('button.select_operator'),
157
+ action: this._selectOperator.bind(this),
158
+ ...CommonButtonStyles.add
154
159
  }
155
160
  ]
156
161
  if (this.crossDocking) {
@@ -165,14 +170,6 @@ class WorksheetPicking extends localize(i18next)(PageView) {
165
170
  })
166
171
  }
167
172
 
168
- if (this.activatable || this.assignable) {
169
- actions.push({
170
- title: i18next.t('button.select_operator'),
171
- action: this._selectOperator.bind(this),
172
- ...CommonButtonStyles.add
173
- })
174
- }
175
-
176
173
  if (this.activatable) {
177
174
  if (this.isAssignedInventory) {
178
175
  actions.push({
@@ -4,13 +4,12 @@ module.exports = {
4
4
  useVirtualHostBasedDomain: false,
5
5
  fallbackRoute: '/',
6
6
  subdomainOffset: 2,
7
- port: 4000,
8
- inspect: '9330',
9
- // cycle count db
7
+ port: 1100,
8
+ inspect: '9430',
10
9
  ormconfig: {
11
10
  name: 'default',
12
11
  type: 'postgres',
13
- database: 'postgres',
12
+ database: 'dev',
14
13
  username: 'postgres',
15
14
  password: 'hatio',
16
15
  host: '192.168.0.161',
@@ -18,44 +17,21 @@ module.exports = {
18
17
  synchronize: false,
19
18
  logging: true
20
19
  },
21
-
22
- // ormconfig: {
23
- // name: 'default',
24
- // type: 'postgres',
25
- // database: '06072023',
26
- // username: 'postgres',
27
- // password: 'hatio',
28
- // host: '192.168.0.153',
29
- // port: 15432,
30
- // synchronize: false,
31
- // logging: true
32
- // },
33
20
  // ormconfig: {
34
21
  // name: 'default',
35
22
  // type: 'postgres',
36
- // host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
37
- // port: 55432,
38
23
  // database: 'postgres',
39
24
  // username: 'postgres',
25
+
40
26
  // password: 'abcd1234',
27
+ // host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
28
+ // port: 55432,
41
29
  // synchronize: false,
42
- // logging: true,
43
- // connectTimeoutMS: 30000,
44
- // extra: { poolSize: 30 }
30
+ // logging: true
45
31
  // },
46
- //ormconfig: {
47
- // name: 'default',
48
- // type: 'postgres',
49
- // database: 'dev2',
50
- // username: 'postgres',
51
- // password: 'hatio',
52
- // host: 'localhost',
53
- // port: 15432,
54
- // synchronize: false,
55
- // logging: true,
56
- // connectTimeoutMS: 30000,
57
- // extra: { poolSize: 30 }
58
- //},
32
+ sellercraftIntegrationConfig: {
33
+ apiKey: 'Et0KqtLvA6e92bDvOywy9eCCud4hpAal8akpqI90'
34
+ },
59
35
  SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dfC95',
60
36
  password: {
61
37
  lowerCase: true,
@@ -69,6 +45,13 @@ module.exports = {
69
45
  looseCharacterLength: 4,
70
46
  history: 2
71
47
  },
48
+ // storage: {
49
+ // type: 's3',
50
+ // accessKeyId: 'AKIAUQEOPWEJCDH6AR5H',
51
+ // secretAccessKey: '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',
52
+ // bucketName: 'opa-one',
53
+ // region: 'ap-southeast-1'
54
+ // },
72
55
  uploads: 'uploads',
73
56
  attachmentsPath: 'attachments',
74
57
  logger: {
@@ -118,14 +101,6 @@ module.exports = {
118
101
  // privateKey: '4pmlt3Wk019u7nqU3Q_oGZE6LbUDjjf8DpmAcn9-iss'
119
102
  // }
120
103
  },
121
- reportApiUrl: 'http://localhost:8888/rest/report/show_html',
122
- // reportApiUrl: 'http://192.168.0.153:8888/rest/report/show_html'
123
- // reportApiUrl: 'http://10.100.109.66:8090/rest/report/show_html',
124
- awbFileStorage: {
125
- type: 's3',
126
- accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
127
- secretAccessKey: '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',
128
- bucketName: 'operato-awb',
129
- region: 'ap-southeast-1'
130
- }
104
+ // reportApiUrl: 'localhost:8888/rest/report/show_html'
105
+ reportApiUrl: 'http://192.168.0.153:8888/rest/report/show_html'
131
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.346",
3
+ "version": "4.3.347",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -108,7 +108,7 @@
108
108
  "@things-factory/transport-base": "^4.3.344",
109
109
  "@things-factory/tutorial-ui": "^4.3.281",
110
110
  "@things-factory/warehouse-base": "^4.3.346",
111
- "@things-factory/worksheet-base": "^4.3.346"
111
+ "@things-factory/worksheet-base": "^4.3.347"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.281",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "687dc4ef7c0622b42ccb920afa354c79c0fe694b"
120
+ "gitHead": "904685cece59b6764b617ff8547d7d5efe1f666c"
121
121
  }
@@ -1915,6 +1915,9 @@
1915
1915
  "title.picking": "picking",
1916
1916
  "title.pickup_logistics": "pickup logistics",
1917
1917
  "title.please_select_generate_type": "please select generate type:",
1918
+ "text.please_select_order_with_status_deactivated_only": "please select order with status deactivated only",
1919
+ "text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "please select at least one order with status deactivated to proceed",
1920
+ "text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "please select maximum 50 worksheets with status deactivated to proceed",
1918
1921
  "title.preunload": "preunload",
1919
1922
  "title.preview": "preview",
1920
1923
  "title.print_location_label": "print location label",
@@ -1514,6 +1514,9 @@
1514
1514
  "text.please_select_transport_type": "차량유형을 선택해 주세요",
1515
1515
  "text.please_wait": "잠시만 기다려주세요",
1516
1516
  "text.please_write_down_full_name_clearly": "please write down full name clearly",
1517
+ "text.please_select_order_with_status_deactivated_only": " [ko] please select order with status deactivated only",
1518
+ "text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "[ko] please select at least one order with status deactivated to proceed",
1519
+ "text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "[ko] please select maximum 50 worksheets with status deactivated to proceed",
1517
1520
  "text.preunload_has_completed": "임시하차가 완료 되었습니다",
1518
1521
  "text.previous_picking_is_still_executing_please_wait": "[ko]Previous picking is still executing. Please wait",
1519
1522
  "text.previous_scan_is_executing": "[ko] previous scan is executing",
@@ -1459,6 +1459,9 @@
1459
1459
  "text.please_select_the_product": "[ms]please select the product",
1460
1460
  "text.please_select_transport_type": "sila pilih jenis kenderaan",
1461
1461
  "text.please_wait": "sila tunggu",
1462
+ "text.please_select_order_with_status_deactivated_only": " [ms] please select order with status deactivated only",
1463
+ "text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "[ms] please select at least one order with status deactivated to proceed",
1464
+ "text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "[ms] please select maximum 50 worksheets with status deactivated to proceed",
1462
1465
  "text.please_write_down_full_name_clearly": "sila pastikan nama anda tulis dengan jelas",
1463
1466
  "text.preunload_has_completed": "preunload has been completed",
1464
1467
  "text.previous_picking_is_still_executing_please_wait": "[ms] Previous picking is still executing. Please wait",
@@ -1427,6 +1427,9 @@
1427
1427
  "text.please_select_the_product": "[zh]please select the product",
1428
1428
  "text.please_select_transport_type": "please select transport type",
1429
1429
  "text.please_wait": "please wait",
1430
+ "text.please_select_order_with_status_deactivated_only": " [zh] please select order with status deactivated only",
1431
+ "text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "[zh] please select at least one order with status deactivated to proceed",
1432
+ "text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "[zh] please select maximum 50 worksheets with status deactivated to proceed",
1430
1433
  "text.preunload_has_completed": "preunload has been completed",
1431
1434
  "text.previous_picking_is_still_executing_please_wait": "[zh]Previous picking is still executing. Please wait",
1432
1435
  "text.previous_scan_is_executing": "[zh] previous scan is executing",