ru.coon 2.5.22 → 2.5.23
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 +20 -0
- package/package.json +1 -1
- package/src/report/command/BaseReportDataCommand.js +7 -5
- package/src/report/component/LocalPagingComboPicker.js +16 -37
- package/src/report/component/ReportLookupCombo.js +4 -5
- package/src/report/component/ReportPanel.js +6 -3
- package/src/report/component/ReportPickerLookupCombo.js +16 -1
- package/src/report/component/ReportTagLookup.js +17 -0
- package/src/report/component/reportpanel/NorthPanel.js +51 -1
- package/src/report/component/settings/property/ReportPropertiesPanelController.js +2 -1
- package/src/report/plugin/configPanel/ExportReportDataToFilePluginConfigPanel.js +31 -1
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.js +45 -7
- package/src/security/GenerateTokenPanel.js +13 -7
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# Version 2.5.23, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2bd9602f16f9aec3aedc7bff149d7c7357afb558)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: Добавить возможность выполнять репорт без кеша. Closes BFL-8384.</span> ([0ef6d5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0ef6d559e8fca3f626747a8d60a21a0c1c6cc076))
|
|
4
|
+
|
|
5
|
+
* ## Fixes
|
|
6
|
+
* <span style='color:red'>fix ReportLookupCombo
|
|
7
|
+
|
|
8
|
+
init cachedValue during component creation process</span> ([311477], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/31147772ab1e6011d06fab1d63e585fc042de38e))
|
|
9
|
+
* <span style='color:red'>Fix:TR-67289 Исправления для компилятора</span> ([8126f0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8126f0f78008b2bd13f2a48b89225b4a98540b83))
|
|
10
|
+
* <span style='color:red'> HT-6580 исправление пагинации. Переменные из миксина перемещены в компоненты.</span> ([232379], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/23237953da5405829b420cc7326a09ee43f19123))
|
|
11
|
+
* <span style='color:red'>fix parameter names clash</span> ([513c20], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/513c206cca2acb55ab912e22a66a21f470068b87))
|
|
12
|
+
|
|
13
|
+
* upd ([630b4c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/630b4c388bae0b7b07fa4721833fac339c8b4adf))
|
|
14
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update if conditiona5ed6047f450cdfa8f105b0f7c02ae68f3b7d483))
|
|
15
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update btn text90de08f9dd7293b7c3287ff8f43a5ff47a9f92f8))
|
|
16
|
+
* update: CHANGELOG.md ([9cd192], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9cd1920b986e816b98adfde212256e032d55134e))
|
|
17
|
+
|
|
1
18
|
# Version 2.5.22, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a5adcd5f65e1a51dab152558c6fb72efe4b97893)
|
|
2
19
|
* ## Fixes
|
|
3
20
|
* <span style='color:red'>fix ReportLookupCompo.loadReportData
|
|
@@ -43,6 +60,7 @@ fix ReportPropertiesPanelController</span> ([e2b928], [link](http://gitlab-dbr.s
|
|
|
43
60
|
|
|
44
61
|
# Version 2.5.16, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9519fa8b00a799beb8b65a98dfd63414f2870633)
|
|
45
62
|
* ## Features
|
|
63
|
+
* <span style='color:green'>feat: Добавлена возможность использовать параметры с filterPanel. Closes BFL-8098.</span> ([5b1fd5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5b1fd503a24a3ff6c18f0fadffc1f6e3fd360ddc))
|
|
46
64
|
* <span style='color:green'>feat: Добавлена возможнось автоматически изменять размеры окна в зависимости от размеров открываемой панели. Related to BFL-7771.</span> ([5d7560], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5d756008132baf464fc924a8c0bb58ef0c3ed27d))
|
|
47
65
|
* <span style='color:green'>feat: CRM-7705 add tooltip to checkboxes on DynamicCheckboxGroup</span> ([dddc4d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dddc4d3f8d8e4f6ca7d5e9c892431b1c6fba6ae5))
|
|
48
66
|
* <span style='color:green'>Feat:TR-67289 Включил возможность авторизации по гит токену</span> ([b9505b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b9505baa99ee5f5785e6da287063774918f0d698))
|
|
@@ -53,11 +71,13 @@ fix ReportPropertiesPanelController</span> ([e2b928], [link](http://gitlab-dbr.s
|
|
|
53
71
|
|
|
54
72
|
ReportPropertiesPanelController.buildPropertiesTreeData was losing property "key"</span> ([d1e579], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d1e579bc3d8d073c240661b2a1c152a5b78404b2))
|
|
55
73
|
* <span style='color:red'>Fix:BFL-8107 Исправление бага с датами версий панелей</span> ([1e933f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1e933f8a6e9a6d3122cbab3359d6f68ef0dd3d3b))
|
|
74
|
+
* <span style='color:red'> Добавлены элементы управления на панель конфигурации ExportReportDataToFilePlugin. Closes BFL-8098.</span> ([2dc9da], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2dc9da640b3c25285e7c51ae7c92c86ad92067f4))
|
|
56
75
|
* <span style='color:red'>Fix:TR-67289 Исправление логики закрытия окна авторизации</span> ([52fa43], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/52fa4306789d5ed5d9af1eee2a95a33edd484e0e))
|
|
57
76
|
* <span style='color:red'>Fix:TR-67289 Обработка случая с закрытием окна GenerateTokenPanel</span> ([6867be], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6867be66efc9926054e4b03dd1b8f6865671ff0f))
|
|
58
77
|
* <span style='color:red'>Fix:TR-67289 Изменение параметров функции в событии makeLoad</span> ([6fb3f6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6fb3f6bdf89381285019e7768d1cc491b9d8dd5f))
|
|
59
78
|
* <span style='color:red'>Fix: Добавил лог в catch</span> ([151437], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1514370322aeb70ed0044db0af20ea283a0bf6f7))
|
|
60
79
|
|
|
80
|
+
* update ([5a6bc0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5a6bc007bd46447ba43dae46a9252028b78cacc2))
|
|
61
81
|
* Revert "Merge branch 'revert-7b9c4220' into 'develop'"
|
|
62
82
|
([This r], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/This reverts merge request !3799c9a77d580255dbadb3a4354fb43a6c4a7cc140a))
|
|
63
83
|
* Revert "Merge branch 'CRM-7635' into develop"
|
package/package.json
CHANGED
|
@@ -2,10 +2,12 @@ Ext.define('Coon.report.command.BaseReportDataCommand', {
|
|
|
2
2
|
extend: 'Coon.command.ASyncBaseCommand',
|
|
3
3
|
alias: 'command.BaseReportDataCommand',
|
|
4
4
|
|
|
5
|
+
useRawFilterParams: false,
|
|
6
|
+
|
|
5
7
|
prepareParams: function() {
|
|
6
8
|
const report = this.grid || this.config.activeComponent.ownerCt.ownerCt;
|
|
7
9
|
const reportId = report.reportId;
|
|
8
|
-
const currentParamList = report.currentParamList;
|
|
10
|
+
const currentParamList = this.useRawFilterParams ? report.northPanel.collectParams() : report.currentParamList;
|
|
9
11
|
const parameterList = [];
|
|
10
12
|
for (const key in currentParamList) {
|
|
11
13
|
if (currentParamList.hasOwnProperty(key)) {
|
|
@@ -14,11 +16,10 @@ Ext.define('Coon.report.command.BaseReportDataCommand', {
|
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
return {
|
|
18
20
|
reportId: reportId,
|
|
19
21
|
parameterList: Ext.encode(parameterList),
|
|
20
22
|
};
|
|
21
|
-
return params;
|
|
22
23
|
},
|
|
23
24
|
|
|
24
25
|
execute: function(grid, config) {
|
|
@@ -58,10 +59,11 @@ Ext.define('Coon.report.command.BaseReportDataCommand', {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
form.action = this.url;
|
|
61
|
-
|
|
62
|
+
const params = this.prepareParams();
|
|
63
|
+
form.querySelector('input#toReportFormDataReportId').value = params.reportId;
|
|
62
64
|
form.querySelector('input#toReportFormDataFileName').value = filename;
|
|
63
65
|
form.querySelector('input#toReportFormDataAppendTimestamp').value = appendDateToFileName;
|
|
64
|
-
form.querySelector('input#toReportFormDataParameterList').value =
|
|
66
|
+
form.querySelector('input#toReportFormDataParameterList').value = params.parameterList;
|
|
65
67
|
form.submit();
|
|
66
68
|
},
|
|
67
69
|
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
2
2
|
extend: 'Ext.Mixin',
|
|
3
|
-
|
|
4
|
-
// Текущая страница
|
|
5
|
-
currentPage: 1,
|
|
6
|
-
// Количество записей на страницу
|
|
7
|
-
pageSize: 500,
|
|
8
|
-
// Количество страниц
|
|
9
|
-
count: 0,
|
|
10
|
-
},
|
|
11
|
-
// Отфильтрованные из initialData данные. Если unpagedData больше размера одной страницы, то включается пагинация.
|
|
12
|
-
// С включенной пагинацией в boundList показывается тулбар для перемещения по страницам, а в
|
|
13
|
-
// store загружается только одна страница.
|
|
14
|
-
// Пагинация не зависит от autoLoadData.
|
|
15
|
-
unpagedData: undefined,
|
|
16
|
-
isLoaded: false,
|
|
3
|
+
|
|
17
4
|
mixinConfig: {
|
|
18
5
|
before: {
|
|
19
6
|
initComponent: 'init',
|
|
@@ -21,12 +8,16 @@ Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
|
21
8
|
},
|
|
22
9
|
|
|
23
10
|
init() {
|
|
24
|
-
if (this.toolbarPageSize && this.toolbarPageSize>0) {
|
|
25
|
-
this.pageControl.pageSize = this.toolbarPageSize;
|
|
26
|
-
}
|
|
27
11
|
this.createPicker = this.createLocalPicker;
|
|
28
12
|
this.beforeQuery = this.beforeLocalQuery;
|
|
29
13
|
this.loadPage = this.loadLocalPage;
|
|
14
|
+
this.initPageControl();
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
initPageControl() {
|
|
18
|
+
if (this.toolbarPageSize && this.toolbarPageSize>0) {
|
|
19
|
+
this.pageControl.pageSize = this.toolbarPageSize;
|
|
20
|
+
}
|
|
30
21
|
},
|
|
31
22
|
/**
|
|
32
23
|
* Переопределение метода, чтобы подключить свой bound list.
|
|
@@ -178,26 +169,24 @@ Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
|
178
169
|
* требуется искать в репорте по valueField), от значения, которые набрал пользователь на клавиатуре (когда требуется искать по searchField)
|
|
179
170
|
* @type {boolean}
|
|
180
171
|
*/
|
|
181
|
-
this.searchString = plan.query
|
|
172
|
+
this.searchString = !!plan.query;
|
|
182
173
|
Coon.log.debug('beforeQuery', plan);
|
|
183
174
|
if (this.autoLoadData) {
|
|
184
175
|
if (this.initialData && Array.isArray(this.initialData)) {
|
|
176
|
+
const queryString = this.ignoreCase ? plan.query.toLocaleLowerCase(): plan.query;
|
|
185
177
|
const filtered = this.initialData.filter((r) => {
|
|
186
178
|
// Не фильтруем, если не определено поле для поиска
|
|
187
179
|
if (!r[this.searchField]) {
|
|
188
180
|
return true;
|
|
189
181
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
} else {
|
|
193
|
-
return r[this.searchField].startsWith(plan.query);
|
|
194
|
-
}
|
|
182
|
+
const compareReady = this.ignoreCase ? r[this.searchField].toLocaleLowerCase(): r[this.searchField];
|
|
183
|
+
return this.searchBySubstring ? compareReady.includes(queryString): compareReady.startsWith(queryString);
|
|
195
184
|
});
|
|
196
185
|
|
|
197
186
|
this.unpagedData = filtered;
|
|
198
187
|
this.configurePagination();
|
|
199
188
|
const value = this.getValue();
|
|
200
|
-
if (this.xtype==='ReportTagLookup') {
|
|
189
|
+
if (this.xtype === 'ReportTagLookup') {
|
|
201
190
|
this.loadLocalPage(1);
|
|
202
191
|
} else {
|
|
203
192
|
if (value) {
|
|
@@ -207,21 +196,10 @@ Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
|
207
196
|
}
|
|
208
197
|
}
|
|
209
198
|
}
|
|
210
|
-
|
|
211
|
-
if (this.searchBySubstring) {
|
|
212
|
-
plan.forceAll = false;
|
|
213
|
-
const len = plan.query.length;
|
|
214
|
-
plan.query = new RegExp('.*' + Ext.String.escapeRegex(plan.query) + '.*', 'i');
|
|
215
|
-
plan.query.length = len;
|
|
216
|
-
}
|
|
217
|
-
} else {
|
|
218
|
-
// Отключаем локальную фильтрацию
|
|
219
|
-
plan.forceAll = false;
|
|
220
|
-
const len = plan.query.length;
|
|
221
|
-
plan.query = new RegExp('.*', 'i');
|
|
222
|
-
plan.query.length = len;
|
|
223
199
|
}
|
|
224
200
|
|
|
201
|
+
// Отключаем локальную фильтрацию
|
|
202
|
+
plan.query = new RegExp('.*', 'i');
|
|
225
203
|
return plan;
|
|
226
204
|
},
|
|
227
205
|
/**
|
|
@@ -267,6 +245,7 @@ Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
|
267
245
|
configurePagination() {
|
|
268
246
|
Coon.log.debug('configurePagination');
|
|
269
247
|
const pageControl = this.pageControl;
|
|
248
|
+
Coon.log.debug('pageSize', this.pageControl.pageSize);
|
|
270
249
|
this.isPagingEnabled = (this.unpagedData && this.unpagedData.length > pageControl.pageSize);
|
|
271
250
|
pageControl.currentPage = 1;
|
|
272
251
|
const tmp = this.unpagedData.length / pageControl.pageSize;
|
|
@@ -67,9 +67,8 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
|
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
|
|
70
|
-
locals: {},
|
|
71
|
-
|
|
72
70
|
initComponent() {
|
|
71
|
+
this._cachedValue = Boolean(false);
|
|
73
72
|
if (!this.getDisplayField()) {
|
|
74
73
|
Coon.log.error('displayField is empty!');
|
|
75
74
|
}
|
|
@@ -171,7 +170,7 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
|
|
|
171
170
|
* @param {string} value
|
|
172
171
|
*/
|
|
173
172
|
loadReportData(value) {
|
|
174
|
-
if (value && this.
|
|
173
|
+
if (value && this._cachedValue === value) {
|
|
175
174
|
this.selectRecordByValue(value);
|
|
176
175
|
return;
|
|
177
176
|
}
|
|
@@ -194,10 +193,10 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
|
|
|
194
193
|
if (result && Array.isArray(result.list)) {
|
|
195
194
|
this.getStore().loadData(result.list);
|
|
196
195
|
if (result.list[0]) {
|
|
197
|
-
|
|
196
|
+
me._cachedValue = value;
|
|
198
197
|
me.selectRecordByValue(value);
|
|
199
198
|
} else {
|
|
200
|
-
|
|
199
|
+
me._cachedValue = false;
|
|
201
200
|
me.clearComboValue();
|
|
202
201
|
}
|
|
203
202
|
me.enable();
|
|
@@ -355,6 +355,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
355
355
|
}
|
|
356
356
|
}, 500);
|
|
357
357
|
}, this);
|
|
358
|
+
this.on('invalidateCache', this.filterHandler.bind(this, true));
|
|
358
359
|
},
|
|
359
360
|
|
|
360
361
|
onDestroy: function() {
|
|
@@ -859,12 +860,12 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
859
860
|
this.filterHandler();
|
|
860
861
|
},
|
|
861
862
|
|
|
862
|
-
filterHandler: function() {
|
|
863
|
+
filterHandler: function(invalidateCache = false) {
|
|
863
864
|
if (this.northPanel.isValid()) {
|
|
864
865
|
this.grid.clear();
|
|
865
866
|
this.currentParamList = this.northPanel.collectParams();
|
|
866
867
|
this.beforeCommandExecuter(this.beforeApplyFilterCommand(this), [this.currentParamList], function() {
|
|
867
|
-
this.loadData(this.currentParamList);
|
|
868
|
+
this.loadData(this.currentParamList, typeof invalidateCache === 'boolean' && invalidateCache);
|
|
868
869
|
});
|
|
869
870
|
}
|
|
870
871
|
},
|
|
@@ -875,7 +876,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
875
876
|
}
|
|
876
877
|
},
|
|
877
878
|
|
|
878
|
-
loadData: function(parameters) {
|
|
879
|
+
loadData: function(parameters, invalidateCache = false) {
|
|
879
880
|
const parameterList = [];
|
|
880
881
|
for (const key in parameters) {
|
|
881
882
|
if (parameters.hasOwnProperty(key)) {
|
|
@@ -905,6 +906,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
905
906
|
this.executeStoreDataCommand(command, {
|
|
906
907
|
reportID: this.reportID,
|
|
907
908
|
parameters: parameterList,
|
|
909
|
+
invalidateCache,
|
|
908
910
|
});
|
|
909
911
|
} else {
|
|
910
912
|
if (this.grid.getStore() != null) {
|
|
@@ -912,6 +914,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
912
914
|
params: {
|
|
913
915
|
parameterList: Ext.encode(parameterList),
|
|
914
916
|
reportId: this.reportId,
|
|
917
|
+
invalidateCache,
|
|
915
918
|
},
|
|
916
919
|
});
|
|
917
920
|
}
|
|
@@ -57,10 +57,15 @@ Ext.define('Coon.report.component.ReportPickerLookupCombo', {
|
|
|
57
57
|
|
|
58
58
|
xtype: 'ReportPickerLookupCombo',
|
|
59
59
|
|
|
60
|
+
// Отфильтрованные из initialData данные. Если unpagedData больше размера одной страницы, то включается пагинация.
|
|
61
|
+
// С включенной пагинацией в boundList показывается тулбар для перемещения по страницам, а в
|
|
62
|
+
// store загружается только одна страница.
|
|
63
|
+
unpagedData: undefined,
|
|
64
|
+
isLoaded: false,
|
|
60
65
|
config: {
|
|
61
66
|
selectIfSingle: false, // для корректного поведения resettable
|
|
62
67
|
resettable: false,
|
|
63
|
-
autoLoadData: true,
|
|
68
|
+
autoLoadData: true, // todo: Убрать с autoLoadData логику управления фильтрацией в пользу другой переменной
|
|
64
69
|
searchField: undefined,
|
|
65
70
|
bufferTime: 2000,
|
|
66
71
|
minSearchLength: 2,
|
|
@@ -68,8 +73,18 @@ Ext.define('Coon.report.component.ReportPickerLookupCombo', {
|
|
|
68
73
|
// Поиск по подстроке (true равносильно "встречается внутри searchField", false - "значение начинается С")
|
|
69
74
|
// Работает только в режиме autoLoadData=true (локальная фильтрация результатов запроса)
|
|
70
75
|
searchBySubstring: true,
|
|
76
|
+
// Включен ли регистронезависимый поиск
|
|
77
|
+
ignoreCase: true,
|
|
71
78
|
reportConfig: undefined,
|
|
72
79
|
toolbarPageSize: undefined,
|
|
80
|
+
pageControl: {
|
|
81
|
+
// Текущая страница
|
|
82
|
+
currentPage: 1,
|
|
83
|
+
// Количество записей на страницу
|
|
84
|
+
pageSize: 500,
|
|
85
|
+
// Количество страниц
|
|
86
|
+
count: 0,
|
|
87
|
+
},
|
|
73
88
|
},
|
|
74
89
|
triggers: {
|
|
75
90
|
open: {
|
|
@@ -11,7 +11,14 @@ Ext.define('Coon.report.component.ReportTagLookup', {
|
|
|
11
11
|
extend: 'Coon.report.component.SimpleReportTag',
|
|
12
12
|
alias: 'widget.ReportTagLookup',
|
|
13
13
|
mixins: ['Coon.report.component.LocalPagingComboPicker'],
|
|
14
|
+
|
|
14
15
|
isPagingEnabled: false,
|
|
16
|
+
|
|
17
|
+
// Отфильтрованные из initialData данные. Если unpagedData больше размера одной страницы, то включается пагинация.
|
|
18
|
+
// С включенной пагинацией в boundList показывается тулбар для перемещения по страницам, а в
|
|
19
|
+
// store загружается только одна страница.
|
|
20
|
+
unpagedData: undefined,
|
|
21
|
+
isLoaded: false,
|
|
15
22
|
config: {
|
|
16
23
|
triggers: {
|
|
17
24
|
open: {
|
|
@@ -26,6 +33,16 @@ Ext.define('Coon.report.component.ReportTagLookup', {
|
|
|
26
33
|
cutDangerousAmount: true,
|
|
27
34
|
resettable: false,
|
|
28
35
|
toolbarPageSize: undefined,
|
|
36
|
+
// Включен ли регистронезависимый поиск
|
|
37
|
+
ignoreCase: true,
|
|
38
|
+
pageControl: {
|
|
39
|
+
// Текущая страница
|
|
40
|
+
currentPage: 1,
|
|
41
|
+
// Количество записей на страницу
|
|
42
|
+
pageSize: 500,
|
|
43
|
+
// Количество страниц
|
|
44
|
+
count: 0,
|
|
45
|
+
},
|
|
29
46
|
},
|
|
30
47
|
|
|
31
48
|
initComponent: function() {
|
|
@@ -32,7 +32,6 @@ Ext.define('Coon.report.component.report.NorthPanel', {
|
|
|
32
32
|
}, this.clearButtonConfig || {}));
|
|
33
33
|
|
|
34
34
|
this.buttonsContainer = Ext.widget('container', Ext.apply({
|
|
35
|
-
width: 200,
|
|
36
35
|
margin: '10 0',
|
|
37
36
|
autoHeight: true,
|
|
38
37
|
layout: {
|
|
@@ -117,6 +116,15 @@ Ext.define('Coon.report.component.report.NorthPanel', {
|
|
|
117
116
|
if (this.hideFilterButtons) {
|
|
118
117
|
this.buttonsContainer.hide();
|
|
119
118
|
}
|
|
119
|
+
if (reportFormBean.cached === true) {
|
|
120
|
+
this.addToSearchButtonMenu({
|
|
121
|
+
text: 'Поиск по БД',
|
|
122
|
+
handler: (function() {
|
|
123
|
+
this.reportPanel.fireEvent('invalidateCache');
|
|
124
|
+
// eslint-disable-next-line no-extra-bind
|
|
125
|
+
}).bind(this),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
120
128
|
},
|
|
121
129
|
|
|
122
130
|
/**
|
|
@@ -174,4 +182,46 @@ Ext.define('Coon.report.component.report.NorthPanel', {
|
|
|
174
182
|
tool.setTooltip(tool.tooltipTexts.hide);
|
|
175
183
|
}
|
|
176
184
|
},
|
|
185
|
+
|
|
186
|
+
addToSearchButtonMenu(menuItems = []) {
|
|
187
|
+
if (!menuItems) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (typeof menuItems === 'object' && !Array.isArray(menuItems)) {
|
|
191
|
+
menuItems = [menuItems];
|
|
192
|
+
}
|
|
193
|
+
if (!menuItems.length) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (this.splitSearchButton) {
|
|
197
|
+
menuItems.forEach((c) => {
|
|
198
|
+
this.splitSearchButton.menu.insert(0,
|
|
199
|
+
c.$className && c.isMenuItem ?
|
|
200
|
+
c :
|
|
201
|
+
Ext.create(Object.assign(c, {xtype: 'menuitem'}))
|
|
202
|
+
);
|
|
203
|
+
});
|
|
204
|
+
} else {
|
|
205
|
+
const btn = this.searchButton;
|
|
206
|
+
if (btn) {
|
|
207
|
+
this.splitSearchButton = Ext.create(
|
|
208
|
+
Object.assign(
|
|
209
|
+
{
|
|
210
|
+
xtype: 'splitbutton',
|
|
211
|
+
handler: btn.handler.bind(btn),
|
|
212
|
+
menu: menuItems,
|
|
213
|
+
},
|
|
214
|
+
btn.initialConfig || {},
|
|
215
|
+
{margin: btn.margin}
|
|
216
|
+
)
|
|
217
|
+
);
|
|
218
|
+
btn.hide();
|
|
219
|
+
btn.ownerCt.items.items.splice(
|
|
220
|
+
btn.ownerCt.items.items.indexOf(btn),
|
|
221
|
+
0,
|
|
222
|
+
this.splitSearchButton
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
177
227
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelController', {
|
|
2
2
|
extend: 'Ext.app.ViewController',
|
|
3
|
+
requires: ['Coon.report.component.settings.property.ReportPropertyDictionary'],
|
|
3
4
|
alias: 'controller.ReportPropertiesPanelController',
|
|
4
5
|
reportContextProperty: 'filterItemsOnRow',
|
|
5
6
|
|
|
@@ -163,7 +164,7 @@ Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelControl
|
|
|
163
164
|
record.set('value', value);
|
|
164
165
|
},
|
|
165
166
|
|
|
166
|
-
onShowContextMenu: function(_, record,
|
|
167
|
+
onShowContextMenu: function(_, record, __, ___, e) {
|
|
167
168
|
const contextMenu = new Ext.menu.Menu({
|
|
168
169
|
plain: true,
|
|
169
170
|
});
|
|
@@ -24,7 +24,15 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
24
24
|
title: false,
|
|
25
25
|
columns: {
|
|
26
26
|
items: [
|
|
27
|
-
{
|
|
27
|
+
{
|
|
28
|
+
header: 'v',
|
|
29
|
+
dataIndex: 'checkbox',
|
|
30
|
+
xtype: 'checkcolumn',
|
|
31
|
+
hidden: false,
|
|
32
|
+
allowSelect: true,
|
|
33
|
+
headerCheckbox: true,
|
|
34
|
+
width: 75,
|
|
35
|
+
},
|
|
28
36
|
{header: 'Поле', dataIndex: 'reportField', xtype: 'hintColumn', flex: 1},
|
|
29
37
|
{header: 'Описание', dataIndex: 'description', xtype: 'hintColumn', flex: 3, headerCheckbox: true}
|
|
30
38
|
],
|
|
@@ -44,6 +52,28 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
44
52
|
items: [
|
|
45
53
|
this.createSelectExtensionToSave(),
|
|
46
54
|
this.createReportFileNameField(),
|
|
55
|
+
{
|
|
56
|
+
xtype: 'checkbox',
|
|
57
|
+
boxLabel: 'Добавить в меню кнопки "Поиск" (параметры фильтра будут применятся сразу)',
|
|
58
|
+
name: 'addToSearchButton',
|
|
59
|
+
listeners: {
|
|
60
|
+
change(cb, checked) {
|
|
61
|
+
const addButtonCheckbox = cb.ownerCt.query('[name=addButtonOnToolbar]').shift();
|
|
62
|
+
const addButtonFieldset = cb.ownerCt.query('[name=buttonConfig]').shift();
|
|
63
|
+
if (addButtonCheckbox) {
|
|
64
|
+
addButtonCheckbox.setValue(addButtonCheckbox.getValue() && !checked);
|
|
65
|
+
addButtonCheckbox.setDisabled(checked);
|
|
66
|
+
}
|
|
67
|
+
if (addButtonFieldset) {
|
|
68
|
+
if (checked) {
|
|
69
|
+
addButtonFieldset.enable();
|
|
70
|
+
} else {
|
|
71
|
+
addButtonFieldset.setDisabled(!addButtonCheckbox.getValue());
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
47
77
|
this.createAddButtonPanel(),
|
|
48
78
|
this.createCustomColumnsFieldset()
|
|
49
79
|
],
|
|
@@ -10,18 +10,36 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
10
10
|
appendDateToFileName: true,
|
|
11
11
|
exportFileFormat: undefined,
|
|
12
12
|
allowUserSelectColumnsToUpload: undefined,
|
|
13
|
+
addToSearchButton: false,
|
|
13
14
|
},
|
|
14
15
|
|
|
16
|
+
constructor(config) {
|
|
17
|
+
config.invisibleByDefault = config.addToSearchButton === true;
|
|
18
|
+
this.callParent(arguments);
|
|
19
|
+
},
|
|
15
20
|
init(grid) {
|
|
16
21
|
this.callParent([grid]);
|
|
17
|
-
|
|
22
|
+
const format = this.config.exportFileFormat;
|
|
23
|
+
this.buttonText = this.buttonText || (format && 'Экспорт в ' + format);
|
|
18
24
|
grid.on('render', function() {
|
|
19
25
|
this.report = grid.findParentByType('ReportPanel');
|
|
26
|
+
if (this.getConfig('addToSearchButton') === true) {
|
|
27
|
+
this.report.northPanel.addToSearchButtonMenu({
|
|
28
|
+
text: this.buttonText,
|
|
29
|
+
iconCls: this.buttonIconCls,
|
|
30
|
+
handler: Ext.bind(this.handler, this),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
20
33
|
this.grid = grid;
|
|
21
34
|
}, this);
|
|
22
|
-
this.getDataCommand =
|
|
23
|
-
|
|
24
|
-
|
|
35
|
+
this.getDataCommand = Ext.create(
|
|
36
|
+
`command.${
|
|
37
|
+
format === 'pdf' ?
|
|
38
|
+
'GetPdfReportDataCommand' :
|
|
39
|
+
'GetExcelFromRowsOrReportData'
|
|
40
|
+
}`,
|
|
41
|
+
{useRawFilterParams: this.getConfig('addToSearchButton')}
|
|
42
|
+
);
|
|
25
43
|
},
|
|
26
44
|
|
|
27
45
|
handler: function() {
|
|
@@ -41,9 +59,29 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
41
59
|
title: false,
|
|
42
60
|
columns: {
|
|
43
61
|
items: [
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
{
|
|
63
|
+
header: 'v',
|
|
64
|
+
dataIndex: 'checkbox',
|
|
65
|
+
xtype: 'checkcolumn',
|
|
66
|
+
hidden: false,
|
|
67
|
+
allowSelect: true,
|
|
68
|
+
headerCheckbox: true,
|
|
69
|
+
width: 75,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
header: 'Поле',
|
|
73
|
+
dataIndex: 'reportField',
|
|
74
|
+
xtype: 'hintColumn',
|
|
75
|
+
flex: 1,
|
|
76
|
+
hidden: true,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
header: 'Описание',
|
|
80
|
+
dataIndex: 'description',
|
|
81
|
+
xtype: 'hintColumn',
|
|
82
|
+
flex: 3,
|
|
83
|
+
headerCheckbox: true,
|
|
84
|
+
}
|
|
47
85
|
],
|
|
48
86
|
},
|
|
49
87
|
});
|
|
@@ -93,6 +93,7 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
93
93
|
|
|
94
94
|
controller: {
|
|
95
95
|
handler() {
|
|
96
|
+
const me = this;
|
|
96
97
|
this.vm.set('pending', true);
|
|
97
98
|
const form = this.getView().getComponent('form');
|
|
98
99
|
if (form) {
|
|
@@ -101,13 +102,18 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
101
102
|
values.emailPrefix.replace(this.vm.get('defaultDomain'), '') +
|
|
102
103
|
this.vm.get('defaultDomain');
|
|
103
104
|
this.auth.generateToken(email, values.gitToken)
|
|
104
|
-
.then((
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
.then(function(properties) {
|
|
106
|
+
if (!Ext.isObject(properties)) {
|
|
107
|
+
throw new Error('Не удалось сохранить токен');
|
|
108
|
+
}
|
|
109
|
+
const isVerified = properties.isVerified || false;
|
|
110
|
+
me.vm.set('pending', false);
|
|
111
|
+
const message = isVerified ? 'Токен успешно сохранен' : 'Не удалось сохранить токен';
|
|
112
|
+
const title = isVerified ? 'Информация' : 'Ошибка';
|
|
113
|
+
Ext.Msg.alert(title, message);
|
|
114
|
+
if (isVerified) {
|
|
115
|
+
me.fireViewEvent('complete');
|
|
116
|
+
}
|
|
111
117
|
})
|
|
112
118
|
.catch((e) => {
|
|
113
119
|
Coon.log.error(e.message);
|
package/src/version.js
CHANGED