@things-factory/operato-wms 4.3.678 → 4.3.679

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.
@@ -130,7 +130,8 @@ class InventoryReport extends connect(store)(localize(i18next)(PageView)) {
130
130
  })(),
131
131
  max: new Date().toISOString().split('T')[0]
132
132
  },
133
- value: new Date().toISOString().split('T')[0]
133
+ value: new Date().toISOString().split('T')[0],
134
+ handlers: { change: this._modifyDateRange.bind(this) }
134
135
  },
135
136
  {
136
137
  label: i18next.t('field.product_info'),
@@ -344,12 +345,7 @@ class InventoryReport extends connect(store)(localize(i18next)(PageView)) {
344
345
  let date = new Date(parseInt(item.createdAt))
345
346
  return flattenObject({
346
347
  ...item,
347
- productName:
348
- item.product.name +
349
- ' ( ' +
350
- item.product.description +
351
- ' ) ' +
352
- item.product.auxValue1,
348
+ productName: item.product.name + ' ( ' + item.product.description + ' ) ' + item.product.auxValue1,
353
349
  createdAt:
354
350
  date.getDate().toString() + '/' + (date.getMonth() + 1).toString() + '/' + date.getFullYear().toString()
355
351
  })
@@ -390,17 +386,31 @@ class InventoryReport extends connect(store)(localize(i18next)(PageView)) {
390
386
  }
391
387
 
392
388
  _modifyDateRange(e) {
393
- const fromDate = e.currentTarget.value
389
+ if (e.currentTarget.name == 'fromDate') {
390
+ const fromDate = e.currentTarget.value
391
+
392
+ let maxToDate = new Date(fromDate)
393
+ maxToDate.setDate(maxToDate.getDate() + 31)
394
+ maxToDate = maxToDate.toISOString().split('T')[0]
395
+ if (this._toDateInput.value > maxToDate) this._toDateInput.value = maxToDate
396
+ if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
394
397
 
395
- if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
398
+ let min = new Date(fromDate)
399
+ let today = new Date()
400
+ today.setHours(0, 0, 0, 0)
396
401
 
397
- let min = new Date(fromDate)
398
- let today = new Date()
399
- today.setHours(0, 0, 0, 0)
402
+ min = min.toISOString().split('T')[0]
400
403
 
401
- min = min.toISOString().split('T')[0]
404
+ this._toDateInput.min = min
405
+ }
406
+ if (e.currentTarget.name == 'toDate') {
407
+ const toDate = e.currentTarget.value
408
+ let maxFromDate = new Date(toDate)
409
+ maxFromDate.setDate(maxFromDate.getDate() - 31)
410
+ maxFromDate = maxFromDate.toISOString().split('T')[0]
402
411
 
403
- this._toDateInput.min = min
412
+ if (this._fromDateInput.value < maxFromDate) this._fromDateInput.value = maxFromDate
413
+ }
404
414
  }
405
415
 
406
416
  _compareValues(key, order = 'asc') {
@@ -465,7 +475,7 @@ class InventoryReport extends connect(store)(localize(i18next)(PageView)) {
465
475
  var headerSetting = [
466
476
  { header: i18next.t('field.sku'), key: 'product|sku', width: 75, type: 'string' },
467
477
  { header: i18next.t('field.product'), key: 'product|name', width: 75, type: 'string' },
468
- { header: i18next.t('field.product_description'), key: 'product|description', width: 75, type:'string' },
478
+ { header: i18next.t('field.product_description'), key: 'product|description', width: 75, type: 'string' },
469
479
  { header: i18next.t('field.product_type'), key: 'product|type', width: 25, type: 'string' },
470
480
  { header: i18next.t('field.packing_type'), key: 'packingType', width: 25, type: 'string' },
471
481
  { header: i18next.t('field.batch_id'), key: 'batchId', width: 25, type: 'string' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.678",
3
+ "version": "4.3.679",
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.675",
92
92
  "@things-factory/product-base": "^4.3.677",
93
93
  "@things-factory/resource-ui": "^4.3.677",
94
- "@things-factory/sales-ui": "^4.3.678",
94
+ "@things-factory/sales-ui": "^4.3.679",
95
95
  "@things-factory/scene-data-transform": "^4.3.591",
96
96
  "@things-factory/scene-excel": "^4.3.591",
97
97
  "@things-factory/scene-firebase": "^4.3.591",
@@ -107,8 +107,8 @@
107
107
  "@things-factory/system-ui": "^4.3.675",
108
108
  "@things-factory/transport-base": "^4.3.677",
109
109
  "@things-factory/tutorial-ui": "^4.3.677",
110
- "@things-factory/warehouse-base": "^4.3.678",
111
- "@things-factory/worksheet-base": "^4.3.678"
110
+ "@things-factory/warehouse-base": "^4.3.679",
111
+ "@things-factory/worksheet-base": "^4.3.679"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.591",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "b3d9928b406cee3e23e096cb00cf89ece8231870"
120
+ "gitHead": "dbd3c422ea6f5239def218b70aac8302eac238f5"
121
121
  }