ru.coon 3.0.72 → 3.0.73
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/.husky/pre-commit +0 -0
- package/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/common/component/CheckErrorsComponent.js +111 -0
- package/src/common/field/FieldsHelper.js +0 -0
- package/src/common/panel/WindowWrap.js +0 -0
- package/src/report/plugin/grid/AddFilterConditionPlugin.js +2 -2
- package/src/report/plugin/grid/CustomButtonPlugin.js +10 -1
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterFieldFactory.js +5 -5
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterItem.js +10 -1
- package/src/version.js +1 -1
package/.husky/pre-commit
CHANGED
|
File without changes
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# Version 3.0.73, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d77f15a5f3bbd05c134e65d32edab3f7cbb2b80f)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: HT-12053: Добавил возможность изменить xtype кнопки, что позволит использовать split, segmented и кастомные кнопки</span> ([b0f2e7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b0f2e72e4115266d83b9a39028159169355d2e73))
|
|
4
|
+
* <span style='color:green'> HT-14762 upd</span> ([f1b5a0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f1b5a0f60dac47792011678fe46997acf8bbe28a))
|
|
5
|
+
* <span style='color:green'> HT-14762 checkErrorsComponent</span> ([099a88], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/099a889718fcf4638409802f99fce07e6f307958))
|
|
6
|
+
|
|
7
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update file CustomButtonPlugin.jse007992a055e82a1ad3bfcb7b4bfb2f643af375a))
|
|
8
|
+
* upd ([16e891], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/16e891ac6eb9cd8713787a571571c12ef8aee409))
|
|
9
|
+
* update: CHANGELOG.md ([f5084b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f5084bd2f86cfee8d31b470b2e9859905e08de21))
|
|
10
|
+
|
|
1
11
|
# Version 3.0.72, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c2f5896748cca4a1467fa9dedd00ed69b950c033)
|
|
2
12
|
* ## Fixes
|
|
3
13
|
* <span style='color:red'> исправление отображения кнопок репорта</span> ([45f49f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/45f49ff03cfd18a299ba92a73f415fc86f9c6bbf))
|
|
@@ -259,6 +269,7 @@
|
|
|
259
269
|
* ## Fixes
|
|
260
270
|
* <span style='color:red'>NEVA-947 fix UiCustomPanel reloadFrame</span> ([fa11cb], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fa11cb33bf25866bf8a49035dd0121830cd9f5e3))
|
|
261
271
|
|
|
272
|
+
* HT-9130 fix: change minWidth ([832f4a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/832f4ac2af931449cdf1bcb3ee6528ef2d560f97))
|
|
262
273
|
* update: CHANGELOG.md ([0b19f1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0b19f173f5285306bd642141ea01e5472782e44f))
|
|
263
274
|
|
|
264
275
|
# Version 3.0.32, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/54a1adc38f21829b195830d3eced818bf79b9ae8)
|
package/package.json
CHANGED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Ext.define('Coon.common.component.CheckErrorsComponent', {
|
|
2
|
+
extend: 'Ext.panel.Panel',
|
|
3
|
+
xtype: 'CheckErrorsComponent',
|
|
4
|
+
|
|
5
|
+
config: {
|
|
6
|
+
period: '',
|
|
7
|
+
maskComponent: '',
|
|
8
|
+
checks: [],
|
|
9
|
+
},
|
|
10
|
+
layout: 'fit',
|
|
11
|
+
|
|
12
|
+
async checkHandler() {
|
|
13
|
+
this.afterCheck = false;
|
|
14
|
+
const period = this.getPeriod();
|
|
15
|
+
|
|
16
|
+
this.maskTab(true);
|
|
17
|
+
|
|
18
|
+
const store = this.checksGrid.getStore();
|
|
19
|
+
store.each((record) => record.set('state', '?'));
|
|
20
|
+
|
|
21
|
+
for (const reportId of this.checksReports) {
|
|
22
|
+
try {
|
|
23
|
+
const record = store.getData().getRange().find((rec) => rec.get('reportId') === reportId);
|
|
24
|
+
if (record.get('state') === 'Успешно' && reportId === '') {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
record.set('state', 'Проверка');
|
|
28
|
+
let data;
|
|
29
|
+
if (reportId === '') {
|
|
30
|
+
data = await Coon.util.promisifyCmd('SigmaUtilities.view.calendar.opa.getClosedStateCalendarPeriodCommand',
|
|
31
|
+
'UBUT_PD',
|
|
32
|
+
period
|
|
33
|
+
);
|
|
34
|
+
} else {
|
|
35
|
+
data = await Coon.util.promisifyCmd('command.GetDynamicReportDataCommand',
|
|
36
|
+
reportId,
|
|
37
|
+
[{'type': 'PERIOD_ID', 'value': period}]
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
if (data === true || !data.list.length) {
|
|
41
|
+
record.set('state', 'Успешно');
|
|
42
|
+
} else if (data.list.length) {
|
|
43
|
+
record.set('state', 'Ошибка');
|
|
44
|
+
}
|
|
45
|
+
this.afterCheck = true;
|
|
46
|
+
} catch (e) {
|
|
47
|
+
Coon.log.error('Невозможно выполнить все проверки </br>', e);
|
|
48
|
+
Ext.Msg.alert('Сообщение системы', 'Невозможно выполнить все проверки');
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
this.maskTab(false);
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
getMaskComponent: function() {
|
|
56
|
+
return this.up(this.maskComponent);
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
maskTab: function(state) {
|
|
60
|
+
this.getMaskComponent()[state ? 'mask' : 'unmask']();
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
initComponent: function() {
|
|
64
|
+
this.items = [
|
|
65
|
+
{
|
|
66
|
+
xtype: 'grid',
|
|
67
|
+
reference: 'checksGrid',
|
|
68
|
+
columns: [
|
|
69
|
+
{
|
|
70
|
+
text: 'Тип',
|
|
71
|
+
dataIndex: 'checkName',
|
|
72
|
+
width: 360,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
text: 'Статус</br> проверки',
|
|
76
|
+
dataIndex: 'state',
|
|
77
|
+
width: 100,
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
listeners: {
|
|
81
|
+
itemclick: function(_, rec) {
|
|
82
|
+
if (this.afterCheck) {
|
|
83
|
+
this.fireEvent('checkitemclick', _, rec);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
scope: this,
|
|
87
|
+
},
|
|
88
|
+
store: {
|
|
89
|
+
type: 'json',
|
|
90
|
+
data: [],
|
|
91
|
+
},
|
|
92
|
+
tbar: {
|
|
93
|
+
items: [
|
|
94
|
+
{
|
|
95
|
+
text: 'Запустить',
|
|
96
|
+
handler: this.checkHandler.bind(this),
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
];
|
|
102
|
+
this.callParent(arguments);
|
|
103
|
+
|
|
104
|
+
this.checksReports = [];
|
|
105
|
+
for (const record of this.checks) {
|
|
106
|
+
this.checksReports.push(record.reportId);
|
|
107
|
+
}
|
|
108
|
+
this.checksGrid = this.down('[reference=checksGrid]');
|
|
109
|
+
this.checksGrid.getStore().loadData(this.checks);
|
|
110
|
+
},
|
|
111
|
+
});
|
|
File without changes
|
|
File without changes
|
|
@@ -640,7 +640,7 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
|
|
|
640
640
|
foundMenuItem.setText(`Фильтр по пустому значению`);
|
|
641
641
|
} else {
|
|
642
642
|
foundMenuItem.setText(`<div style="max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
|
643
|
-
Фильтр по "${this.getValueText(this.columnValue)}"
|
|
643
|
+
Фильтр по "${this.getValueText(this.columnValue)}"
|
|
644
644
|
</div>`);
|
|
645
645
|
}
|
|
646
646
|
}
|
|
@@ -711,7 +711,7 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
|
|
|
711
711
|
if (['string', 'numeric', 'date', 'list', 'combo'].includes(filterType)) {
|
|
712
712
|
filterWrapPanelCfg.width = 600;
|
|
713
713
|
} else {
|
|
714
|
-
filterWrapPanelCfg.minWidth =
|
|
714
|
+
filterWrapPanelCfg.minWidth = 300;
|
|
715
715
|
}
|
|
716
716
|
const menuItem = Ext.widget('FilterWrapPanel', filterWrapPanelCfg);
|
|
717
717
|
menuItem.on('dofilter', function(value, condition) {
|
|
@@ -92,7 +92,16 @@ Ext.define('Coon.report.plugin.grid.CustomButtonPlugin', {
|
|
|
92
92
|
<b>${this.panelButtonItemId}</b>.
|
|
93
93
|
${this.panelButtonItemId} - ключ, по которому связана конфигурация кнопки в кастомной панели с кнопкой в репорте.`;
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
buttonConfig.xtype = buttonConfig.xtype || 'button';
|
|
96
|
+
const button = Ext.create(buttonConfig)
|
|
97
|
+
if (!button.isButton) {
|
|
98
|
+
Coon.log.error(`[CustomButtonPlugin] xtype error - it's not a button component`)
|
|
99
|
+
buttonConfig.xtype = 'button';
|
|
100
|
+
button.destroy()
|
|
101
|
+
this.separateAction = Ext.create(buttonConfig);
|
|
102
|
+
} else {
|
|
103
|
+
this.separateAction = button;
|
|
104
|
+
}
|
|
96
105
|
if (!this.isUnused) {
|
|
97
106
|
this.processBind(bindConfig);
|
|
98
107
|
}
|
|
@@ -10,7 +10,7 @@ Ext.define('Coon.report.plugin.grid.addFilterConditionPlugin.FilterFieldFactory'
|
|
|
10
10
|
case 'date':
|
|
11
11
|
return this.getDateFields();
|
|
12
12
|
case 'boolean':
|
|
13
|
-
return this.getBooleanFields(options
|
|
13
|
+
return this.getBooleanFields(options);
|
|
14
14
|
case 'numeric':
|
|
15
15
|
return this.getNumericFields();
|
|
16
16
|
case 'list':
|
|
@@ -56,8 +56,8 @@ Ext.define('Coon.report.plugin.grid.addFilterConditionPlugin.FilterFieldFactory'
|
|
|
56
56
|
},
|
|
57
57
|
});
|
|
58
58
|
},
|
|
59
|
-
getBooleanFields(
|
|
60
|
-
labels =
|
|
59
|
+
getBooleanFields(options) {
|
|
60
|
+
const labels = options.booleanLabels || {};
|
|
61
61
|
return {
|
|
62
62
|
xtype: 'container',
|
|
63
63
|
items: {
|
|
@@ -67,8 +67,8 @@ Ext.define('Coon.report.plugin.grid.addFilterConditionPlugin.FilterFieldFactory'
|
|
|
67
67
|
},
|
|
68
68
|
simpleValue: true,
|
|
69
69
|
items: [
|
|
70
|
-
{boxLabel: labels.trueText || 'Да', name:
|
|
71
|
-
{boxLabel: labels.falseText || 'Нет', name:
|
|
70
|
+
{boxLabel: labels.trueText || 'Да', name: options.dataIndex, inputValue: true},
|
|
71
|
+
{boxLabel: labels.falseText || 'Нет', name: options.dataIndex, inputValue: false, margin: '0 0 0 15'}
|
|
72
72
|
],
|
|
73
73
|
bind: {
|
|
74
74
|
value: '{filter.fromValue}',
|
|
@@ -156,7 +156,16 @@ Ext.define('Coon.report.plugin.grid.addFilterConditionPlugin.FilterItem', {
|
|
|
156
156
|
const listData = filter.listData;
|
|
157
157
|
const useCombo = filter.useCombo && operator==='eq';
|
|
158
158
|
const allowBlank= !['like', 'eq'].includes(operator);
|
|
159
|
-
return this.factory.getFields(
|
|
159
|
+
return this.factory.getFields(
|
|
160
|
+
type,
|
|
161
|
+
{
|
|
162
|
+
booleanLabels,
|
|
163
|
+
listData,
|
|
164
|
+
useCombo,
|
|
165
|
+
allowBlank,
|
|
166
|
+
dataIndex: this.filter.dataIndex,
|
|
167
|
+
}
|
|
168
|
+
);
|
|
160
169
|
},
|
|
161
170
|
|
|
162
171
|
isValid() {
|
package/src/version.js
CHANGED