ru.coon 2.7.0 → 2.7.2
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.
- package/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/common/component/editor/CharacteristicLoaderPlugin.js +12 -2
- package/src/report/component/reportpanel/ReportGrid.scss +3 -0
- package/src/report/plugin/grid/AddFilterConditionPlugin.js +18 -7
- package/src/report/plugin/grid/GridContextMenu.js +3 -3
- package/src/uielement/component/formchips/FilterConditionToolbarController.js +0 -22
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
# Version 2.7.2, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3b94df2c23f76552c5c626a4bfda4a317e33abff)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: HT-8199: trim string values in request</span> ([cfc709], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cfc709daacaad1522f4dff858e04966a758bcb6a))
|
|
4
|
+
|
|
5
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/common/component/editor/CharacteristicLoaderPlugin.js929fc3b32d028554706e1d64c6ca40fedc615f39))
|
|
6
|
+
* update: CHANGELOG.md ([44e78b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44e78b830a9a374db90e2fc1554188c9154ce462))
|
|
7
|
+
|
|
8
|
+
# Version 2.7.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9028ecb552a8341a78e6a7e0d2f9eee91554c2d0)
|
|
9
|
+
* upd ([901f4c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/901f4c345d1025ef8861b1b649d84590c6a6a7ec))
|
|
10
|
+
* update: CHANGELOG.md ([1a5ea6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1a5ea663b234831a73ec046c23b951b71797481a))
|
|
11
|
+
|
|
1
12
|
# Version 2.7.0, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c03c093df3594cbec9b0b6a2e3e4ca8d24b07e76)
|
|
2
13
|
* ## Features
|
|
3
14
|
* <span style='color:green'>feat: HT-7850 Включение FilterConditionToolbar в ReportPanel</span> ([02015f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/02015fd6518dec2fbbf4a16e8e29ff958fe4f1b3))
|
package/package.json
CHANGED
|
@@ -84,7 +84,17 @@ Ext.define('Coon.common.component.editor.CharacteristicLoaderPlugin', {
|
|
|
84
84
|
clearCache: function() {
|
|
85
85
|
this.cache = {};
|
|
86
86
|
},
|
|
87
|
-
|
|
87
|
+
prepareData(data) {
|
|
88
|
+
if (!Ext.isArray(data)) {
|
|
89
|
+
return data;
|
|
90
|
+
}
|
|
91
|
+
return data.map((el) => {
|
|
92
|
+
if (typeof el.value === 'string') {
|
|
93
|
+
el.value = el.value.trim()
|
|
94
|
+
}
|
|
95
|
+
return el
|
|
96
|
+
})
|
|
97
|
+
},
|
|
88
98
|
load: function() {
|
|
89
99
|
if (this.caching) {
|
|
90
100
|
const key = this.getCacheKey();
|
|
@@ -109,7 +119,7 @@ Ext.define('Coon.common.component.editor.CharacteristicLoaderPlugin', {
|
|
|
109
119
|
}
|
|
110
120
|
|
|
111
121
|
this.clear();
|
|
112
|
-
this.loadFromData(answer['characteristics'], answer['characteristicTypes'], answer['isEffective']);
|
|
122
|
+
this.loadFromData(this.prepareData(answer['characteristics']), answer['characteristicTypes'], answer['isEffective']);
|
|
113
123
|
this.model.subentityId = answer.subentityId || null;
|
|
114
124
|
}.bind(this),
|
|
115
125
|
params: this.model,
|
|
@@ -20,7 +20,7 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
|
|
|
20
20
|
handler: this.addFilter.bind(this),
|
|
21
21
|
}));
|
|
22
22
|
contextMenu.add(new Ext.menu.Item({
|
|
23
|
-
|
|
23
|
+
originalText: 'Отменить фильтр',
|
|
24
24
|
hidden: true,
|
|
25
25
|
itemId: 'cancelCurrentColumnFilter',
|
|
26
26
|
handler: this.clearCurrentColumnFilter.bind(this),
|
|
@@ -98,11 +98,6 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
|
|
|
98
98
|
return this.filters.has(this.getColumnKey());
|
|
99
99
|
},
|
|
100
100
|
|
|
101
|
-
showCancelMenuItems: function() {
|
|
102
|
-
const cancelCurrentItem = this.findMenuItem('cancelCurrentColumnFilter');
|
|
103
|
-
cancelCurrentItem && cancelCurrentItem.setHidden(!this.isColumnFiltered());
|
|
104
|
-
},
|
|
105
|
-
|
|
106
101
|
findMenuItem: function(findBy) {
|
|
107
102
|
const contextMenu = this.grid.contextMenu;
|
|
108
103
|
return contextMenu.down(`#${findBy}`);
|
|
@@ -144,6 +139,18 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
|
|
|
144
139
|
return true;
|
|
145
140
|
},
|
|
146
141
|
|
|
142
|
+
getValueText() {
|
|
143
|
+
if (typeof this.columnValue !== true && this.columnValue) {
|
|
144
|
+
return this.columnValue;
|
|
145
|
+
}
|
|
146
|
+
if (typeof this.columnValue === 'boolean') {
|
|
147
|
+
return this.columnValue ? 'истинно' : 'ложно';
|
|
148
|
+
}
|
|
149
|
+
if (this.columnValue === null || this.columnValue === undefined || this.columnValue === '') {
|
|
150
|
+
return 'пустое значение';
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
|
|
147
154
|
setMenuText(record, cellIndex) {
|
|
148
155
|
const contextMenu = this.grid.contextMenu;
|
|
149
156
|
const columns = this.grid.getColumns();
|
|
@@ -154,11 +161,15 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
|
|
|
154
161
|
this.column = column;
|
|
155
162
|
this.columnValue = record.get(column.dataIndex);
|
|
156
163
|
|
|
157
|
-
this.
|
|
164
|
+
const cancelCurrentItem = this.findMenuItem('cancelCurrentColumnFilter');
|
|
165
|
+
cancelCurrentItem.hide();
|
|
166
|
+
|
|
158
167
|
const foundMenuItem = contextMenu.down('#filterByCellValue');
|
|
159
168
|
foundMenuItem.show();
|
|
160
169
|
if (this.filters.size && this.filters.get(this.getColumnKey()) === this.columnValue) {
|
|
161
170
|
foundMenuItem.hide();
|
|
171
|
+
cancelCurrentItem.setText(`${cancelCurrentItem.originalText} по значению: ${this.getValueText()}`);
|
|
172
|
+
cancelCurrentItem.show();
|
|
162
173
|
}
|
|
163
174
|
|
|
164
175
|
if (this.isFilterable()) {
|
|
@@ -52,10 +52,10 @@ Ext.define('Coon.report.plugin.grid.GridContextMenu', {
|
|
|
52
52
|
this.qtipSpan = cell.querySelector('[data-qtip]');
|
|
53
53
|
this.qtipSpan && this.qtipSpan.removeAttribute('data-qtip');
|
|
54
54
|
|
|
55
|
-
contextMenu.alignTo(cell, 'tl-bl');
|
|
55
|
+
// contextMenu.alignTo(cell, 'tl-bl');
|
|
56
56
|
|
|
57
|
-
const y = contextMenu.getY();
|
|
58
|
-
contextMenu.setY(y - 7);
|
|
57
|
+
// const y = contextMenu.getY();
|
|
58
|
+
// contextMenu.setY(y - 7);
|
|
59
59
|
},
|
|
60
60
|
|
|
61
61
|
restoreCellQtip: function() {
|
|
@@ -37,7 +37,6 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
|
|
|
37
37
|
}
|
|
38
38
|
}, this);
|
|
39
39
|
|
|
40
|
-
reportPanel.on('filterchange', this.setReportGridFilters, this);
|
|
41
40
|
reportPanel.on('clearFilter', this.onReportFilterClear, this);
|
|
42
41
|
} else { // Реализация в кастомной панели
|
|
43
42
|
const mainPanel = this.getView().up();
|
|
@@ -151,7 +150,6 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
|
|
|
151
150
|
*/
|
|
152
151
|
fillChipsHandler: function() {
|
|
153
152
|
this.fillRemoteChips();
|
|
154
|
-
this.fillLocalChips();
|
|
155
153
|
this.fillIfNoChips();
|
|
156
154
|
this.addButtons();
|
|
157
155
|
},
|
|
@@ -182,18 +180,6 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
|
|
|
182
180
|
}
|
|
183
181
|
},
|
|
184
182
|
|
|
185
|
-
fillLocalChips: function() {
|
|
186
|
-
const cont = this.lookup('chipsContainer');
|
|
187
|
-
const filters = this.filters || [];
|
|
188
|
-
this.countLocalChips = 0;
|
|
189
|
-
filters.forEach(function(chipConfig) {
|
|
190
|
-
const cmp = new Coon.uielement.component.formchips.Chip(chipConfig);
|
|
191
|
-
cmp.on('needReloadChips', this.onReloadChipsHandler, this);
|
|
192
|
-
cont.add(cmp);
|
|
193
|
-
this.countLocalChips++;
|
|
194
|
-
}, this);
|
|
195
|
-
},
|
|
196
|
-
|
|
197
183
|
fillIfNoChips: function() {
|
|
198
184
|
if (!this.countRemoteChips && !this.countLocalChips) {
|
|
199
185
|
const cmp = new Coon.uielement.component.formchips.Chip({
|
|
@@ -244,14 +230,6 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
|
|
|
244
230
|
return ret;
|
|
245
231
|
},
|
|
246
232
|
|
|
247
|
-
/**
|
|
248
|
-
* Установить данные для чипов из фильтров
|
|
249
|
-
* @param {Array<Object>} filters
|
|
250
|
-
*/
|
|
251
|
-
setReportGridFilters(filters) {
|
|
252
|
-
this.filters = filters || [];
|
|
253
|
-
},
|
|
254
|
-
|
|
255
233
|
onReportFilterClear() {
|
|
256
234
|
this.setLastSearchFields([]);
|
|
257
235
|
this.onReloadChipsHandler();
|
package/src/version.js
CHANGED