ru.coon 3.0.62 → 3.0.67
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 +26 -9
- package/package.json +1 -1
- package/src/app/Application.js +1 -2
- package/src/app/Router.js +19 -41
- package/src/app/viewPort/CenterView.js +3 -8
- package/src/common/ComponentFactory.js +0 -1
- package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js +9 -3
- package/src/common/component/editor/CharacteristicGridEditor.js +12 -0
- package/src/common/component/editor/CharacteristicGridEditor.scss +10 -0
- package/src/common/component/editor/TypedCharacteristicEditor.js +10 -0
- package/src/report/component/ReportPanel.js +1 -1
- package/src/report/component/reportpanel/ReportTreeStore.js +3 -0
- package/src/report/plugin/configPanel/ControlColumnByParamPluginConfigPanel.js +0 -15
- package/src/report/plugin/grid/GridToolbarButtonPlugin.js +50 -21
- package/src/report/plugin/grid/OpenCustomPanelButtonPlugin.js +362 -384
- package/src/report/toolbar/ReportGridToolbar.js +3 -4
- package/src/report/toolbar/layout/ReportToolbarOverflow.js +14 -18
- package/src/uielement/component/UiCustomController.js +1 -1
- package/src/validator.js +2 -10
- package/src/version.js +1 -1
- package/src/common/component/OpenComponent.js +0 -514
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
# Version 3.0.
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
# Version 3.0.67, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d850ee12048246ba85557eef4475595043fc9d00)
|
|
2
|
+
* HT-14811: исправление открытия редактора для характеристик FKV ([becf94], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/becf94689878553b8c8287c6260ca986a314b08e))
|
|
3
|
+
* update: CHANGELOG.md ([ef54a3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ef54a339c72c36ce13a27672dff3cf89e35ddded))
|
|
4
|
+
|
|
5
|
+
# Version 3.0.66, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/75bb3540f20b528ed830505b80d99216d572121c)
|
|
6
|
+
* HT-14811: доработан внешний вид и открытие на редактирование характеристик FKV ([c55804], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c558045e343890c69c03801984b203b238cae552))
|
|
7
|
+
* update: CHANGELOG.md ([dd323a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dd323a40af65c90d5ac4e59b03d48f365cbf003f))
|
|
8
|
+
|
|
9
|
+
# Version 3.0.65, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b313f77a0208579201ce66ff042e5f548b54533d)
|
|
10
|
+
* ## Fixes
|
|
11
|
+
* <span style='color:red'> validator.mixin</span> ([8eadf3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8eadf3f0b3b2843e2ea42bc3e577ed6db9f1b62b))
|
|
12
|
+
|
|
13
|
+
* update: CHANGELOG.md ([196fe2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/196fe2b32f8bacb0551b5517ce7b458548945f6a))
|
|
14
|
+
|
|
15
|
+
# Version 3.0.64, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/977abbf84dfd6b813420431d11c1202170cd2fe8)
|
|
16
|
+
* ## Fixes
|
|
17
|
+
* <span style='color:red'>fix show title only with staticText</span> ([05d479], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/05d479ef92447495d4246dda085656e2042b0889))
|
|
18
|
+
|
|
19
|
+
* update: CHANGELOG.md ([9b97b4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9b97b4c4ca9abfda170712cf594ffb725b9e9f03))
|
|
20
|
+
|
|
21
|
+
# Version 3.0.63, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/eb48b260e66b233a4cad92d0d856d0d8da4c021b)
|
|
22
|
+
# Version 3.0.62, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d8f3faa85fc70860397b0074b43d93aa9b9ffa00)
|
|
23
|
+
* ## Fixes
|
|
24
|
+
* <span style='color:red'>fix csrf in ReportTreeStore</span> ([cb402a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cb402a1790a7b1081a5e8a17968db947ba583df9))
|
|
25
|
+
|
|
26
|
+
* HT-14775 fix: Исправление ширины системного тулбара ([bdd783], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bdd7836f8eef889ec642e486e896d3910eeb1850))
|
|
5
27
|
* update: CHANGELOG.md ([0624d1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0624d16d97c878b4e695b775a6a08cb00d3f12bd))
|
|
6
28
|
|
|
7
29
|
# Version 3.0.61, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0a79e6af1f962bbf5062d7a242281b679c4b0f35)
|
|
@@ -16,11 +38,6 @@
|
|
|
16
38
|
|
|
17
39
|
* HT-13993 добавлена боковая панель фильтров для репортов ([e2d5c7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e2d5c7436900d232cd48c9389a685affbacf721a))
|
|
18
40
|
* HT-14628 открытие компонента внутри репорта - закрытие через крестик ([fc4f4e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fc4f4e9112a3ba1a85cb4a064d65d7a7cfb8cec1))
|
|
19
|
-
* prerelease urls ([da6a94], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/da6a94022df090290d9ff8f7ae96adf2f486fed8))
|
|
20
|
-
* sync ([4f0a82], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4f0a82ba634e89ef75c8c7006d691725c5252ba1))
|
|
21
|
-
* sync ([f650de], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f650de035c4135485bbe05745b372095d807c565))
|
|
22
|
-
* upd ([47ade3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/47ade3ed0f9782d87c3271b98fa746cb1f4d9157))
|
|
23
|
-
* upd ([7f6bc5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7f6bc58a66df2cac0f35853416c2ef3a0c9a8455))
|
|
24
41
|
* update: CHANGELOG.md ([e42a2a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e42a2a6fb8b511ba174ab5060fc84c683a046945))
|
|
25
42
|
|
|
26
43
|
# Version 3.0.59, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/065a134b1f6c6211d56ef758b127778d5e104faa)
|
package/package.json
CHANGED
package/src/app/Application.js
CHANGED
|
@@ -7,8 +7,6 @@ Ext.define('Coon.app.Application', {
|
|
|
7
7
|
applicationMainView: null,
|
|
8
8
|
},
|
|
9
9
|
|
|
10
|
-
links: {},
|
|
11
|
-
|
|
12
10
|
init() {
|
|
13
11
|
this.appRouter = Coon.app.Router;
|
|
14
12
|
},
|
|
@@ -258,6 +256,7 @@ Ext.define('Coon.app.Application', {
|
|
|
258
256
|
},
|
|
259
257
|
|
|
260
258
|
launch: function() {
|
|
259
|
+
this.appRouter.onBeforeRouteEnterFn = this.isAuthenticated.bind(this);
|
|
261
260
|
Ext.on('auth:logout', this.onLogout, this);
|
|
262
261
|
let jwtToken;
|
|
263
262
|
let beforeAuth = () => Promise.resolve();
|
package/src/app/Router.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
Ext.define('Coon.app.Router', {
|
|
2
2
|
mixins: ['Ext.route.Mixin'],
|
|
3
3
|
singleton: true,
|
|
4
|
-
|
|
5
|
-
maxUrlLength: 2048,
|
|
6
4
|
constructor() {
|
|
7
5
|
this.setRoutes({
|
|
8
6
|
'*': {before: 'onAny'},
|
|
@@ -10,17 +8,6 @@ Ext.define('Coon.app.Router', {
|
|
|
10
8
|
action: 'onRouteEnter',
|
|
11
9
|
before: 'validateMenuItem',
|
|
12
10
|
},
|
|
13
|
-
'route/:{cmpId}?:{parameters}': {
|
|
14
|
-
action: 'onSpecificRoute',
|
|
15
|
-
conditions: {
|
|
16
|
-
parameters: {
|
|
17
|
-
re: '(.*)?',
|
|
18
|
-
parse: function(values) {
|
|
19
|
-
return Ext.isEmpty(values) ? {} : Ext.urlDecode(values);
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
11
|
});
|
|
25
12
|
Ext.on('router:goToLastRoute', () => {
|
|
26
13
|
this.onRouteEnter(this.lastRoute);
|
|
@@ -29,27 +16,9 @@ Ext.define('Coon.app.Router', {
|
|
|
29
16
|
|
|
30
17
|
lastRoute: null,
|
|
31
18
|
|
|
32
|
-
onSpecificRoute(route) {
|
|
33
|
-
route.urlHash = window.location.hash;
|
|
34
|
-
if (route.urlHash.length > Coon.app.Router.maxUrlLength) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (this.getRouterView()) {
|
|
39
|
-
Ext.create('Coon.common.component.OpenComponent', {})
|
|
40
|
-
.loadUIElement(route.cmpId, route.parameters, {urlHash: route.urlHash});
|
|
41
|
-
} else {
|
|
42
|
-
Ext.getApplication().on('centerview:init', () => {
|
|
43
|
-
Ext.create('Coon.common.component.OpenComponent', {})
|
|
44
|
-
.loadUIElement(route.cmpId, route.parameters, {urlHash: route.urlHash});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
19
|
onAny(action) {
|
|
50
20
|
if (Ext.getApplication().isAuthenticated()) {
|
|
51
21
|
action.resume();
|
|
52
|
-
return true;
|
|
53
22
|
} else {
|
|
54
23
|
Coon.log.debug('beforeAnyRoute: not authorized');
|
|
55
24
|
if (action.stop) {
|
|
@@ -77,7 +46,6 @@ Ext.define('Coon.app.Router', {
|
|
|
77
46
|
route.stop();
|
|
78
47
|
return;
|
|
79
48
|
}
|
|
80
|
-
route.urlHash = window.location.hash;
|
|
81
49
|
return true;
|
|
82
50
|
} catch (ex) {
|
|
83
51
|
route.stop();
|
|
@@ -85,6 +53,24 @@ Ext.define('Coon.app.Router', {
|
|
|
85
53
|
}
|
|
86
54
|
},
|
|
87
55
|
|
|
56
|
+
onBeforeRouteEnterFn: null,
|
|
57
|
+
|
|
58
|
+
onBeforeRouteEnter() {
|
|
59
|
+
if (typeof this.onBeforeRouteEnterFn === 'function') {
|
|
60
|
+
return this.onBeforeRouteEnterFn();
|
|
61
|
+
}
|
|
62
|
+
return true;
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
onBeforeRouteEnterFailedFn: null,
|
|
66
|
+
|
|
67
|
+
onBeforeRouteEnterFailed() {
|
|
68
|
+
if (typeof this.onBeforeRouteEnterFailedFn === 'function') {
|
|
69
|
+
return this.onBeforeRouteEnterFailedFn();
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
},
|
|
73
|
+
|
|
88
74
|
getLastRoute() {
|
|
89
75
|
return this.lastRoute;
|
|
90
76
|
},
|
|
@@ -99,7 +85,7 @@ Ext.define('Coon.app.Router', {
|
|
|
99
85
|
},
|
|
100
86
|
|
|
101
87
|
getRouterView() {
|
|
102
|
-
return Ext.
|
|
88
|
+
return Ext.ComponentQuery.query('centerview')[0];
|
|
103
89
|
},
|
|
104
90
|
|
|
105
91
|
getActiveComponent() {
|
|
@@ -117,12 +103,4 @@ Ext.define('Coon.app.Router', {
|
|
|
117
103
|
return jwtToken;
|
|
118
104
|
},
|
|
119
105
|
|
|
120
|
-
assign(urlHash) {
|
|
121
|
-
if (urlHash.length <= Coon.app.Router.maxUrlLength) {
|
|
122
|
-
window.location.assign(urlHash);
|
|
123
|
-
} else {
|
|
124
|
-
Coon.log.debug('urlHash too long');
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
|
|
128
106
|
});
|
|
@@ -32,17 +32,14 @@ Ext.define('Coon.app.viewPort.CenterView', {
|
|
|
32
32
|
|
|
33
33
|
initComponent() {
|
|
34
34
|
this.callParent();
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
Ext.on('route:change', this.setMenuComponent, this);
|
|
37
|
+
|
|
37
38
|
this.on('beforeadd', function() {
|
|
38
39
|
return !this.isTabLimit();
|
|
39
40
|
}, this);
|
|
41
|
+
|
|
40
42
|
this.on('add', function(_, component) {
|
|
41
|
-
component.on('activate', function(component) {
|
|
42
|
-
if (typeof component.urlHash === 'string' && component.urlHash.startsWith('#')) {
|
|
43
|
-
Coon.app.Router.assign(component.urlHash);
|
|
44
|
-
}
|
|
45
|
-
}, this);
|
|
46
43
|
component.on('render', function() {
|
|
47
44
|
this.setScrollButtonVisibility();
|
|
48
45
|
}, this, {single: true});
|
|
@@ -50,8 +47,6 @@ Ext.define('Coon.app.viewPort.CenterView', {
|
|
|
50
47
|
this.on('remove', function() {
|
|
51
48
|
this.setScrollButtonVisibility();
|
|
52
49
|
}, this);
|
|
53
|
-
|
|
54
|
-
Ext.getApplication().fireEvent('centerview:init');
|
|
55
50
|
},
|
|
56
51
|
|
|
57
52
|
setScrollButtonVisibility() {
|
package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js
CHANGED
|
@@ -200,10 +200,16 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.EntityGr
|
|
|
200
200
|
if (context.field === 'mask') {
|
|
201
201
|
const editor = context.record.get('editor');
|
|
202
202
|
if (editor) {
|
|
203
|
-
const
|
|
204
|
-
if (
|
|
205
|
-
|
|
203
|
+
const editorClass = Ext.ClassManager.classes[Ext.ClassManager.aliasToName['widget.'+editor]];
|
|
204
|
+
if (editorClass) {
|
|
205
|
+
const proto = Ext.ClassManager.classes[Ext.ClassManager.aliasToName['widget.'+editor]].prototype;
|
|
206
|
+
if (Ext.isObject(proto.editorOptions)) {
|
|
207
|
+
context.column.field.triggers.info.show();
|
|
208
|
+
} else {
|
|
209
|
+
context.column.field.triggers.info.hide();
|
|
210
|
+
}
|
|
206
211
|
} else {
|
|
212
|
+
console.error(`Редактор ${editor} не найден.`);
|
|
207
213
|
context.column.field.triggers.info.hide();
|
|
208
214
|
}
|
|
209
215
|
} else {
|
|
@@ -226,6 +226,15 @@ Ext.define('Coon.common.component.editor.CharacteristicGridEditor', {
|
|
|
226
226
|
} else {
|
|
227
227
|
visibleValue = '';
|
|
228
228
|
}
|
|
229
|
+
} else if (record.get('entity') == 'FKV') {
|
|
230
|
+
const mask = record.get('mask');
|
|
231
|
+
const maskText = mask.match(/link:"(.*?)"/);
|
|
232
|
+
if (maskText) {
|
|
233
|
+
meta.tdCls += ' FVK-cell_link';
|
|
234
|
+
visibleValue = maskText[1];
|
|
235
|
+
} else {
|
|
236
|
+
visibleValue = val;
|
|
237
|
+
}
|
|
229
238
|
} else if (record.get(ns.$entity) === 'FLV' && !Ext.isEmpty(val)) {
|
|
230
239
|
visibleValue = val.substring(40);
|
|
231
240
|
} else {
|
|
@@ -237,6 +246,9 @@ Ext.define('Coon.common.component.editor.CharacteristicGridEditor', {
|
|
|
237
246
|
return Coon.format.withHint(visibleValue, visibleValue || tooltip);
|
|
238
247
|
},
|
|
239
248
|
getEditor: function(record) {
|
|
249
|
+
if ((record.get('entity') === 'FKV') && record.get('mask')) {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
240
252
|
return Ext.create('Ext.grid.CellEditor', {
|
|
241
253
|
field: Ext.create('Ext.form.field.Text', {
|
|
242
254
|
allowBlank: false,
|
|
@@ -92,6 +92,8 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
|
|
|
92
92
|
|
|
93
93
|
this.on('edit', this.afterEditHandler, this);
|
|
94
94
|
this.factory = this.createFactory();
|
|
95
|
+
|
|
96
|
+
this.on('cellclick', this.cellclickHandler, this);
|
|
95
97
|
},
|
|
96
98
|
|
|
97
99
|
createAdditionButtons: function() {
|
|
@@ -292,6 +294,14 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
|
|
|
292
294
|
}
|
|
293
295
|
},
|
|
294
296
|
|
|
297
|
+
cellclickHandler(cmp, td, cellIndex, record) {
|
|
298
|
+
if (this.isEditableChar(record)) {
|
|
299
|
+
if ((record.get('entity') === 'FKV') && record.get('mask')) {
|
|
300
|
+
this.prepareType(record);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
|
|
295
305
|
// private
|
|
296
306
|
calculateState: function() {
|
|
297
307
|
if (this.addTypeButton) {
|
|
@@ -1033,7 +1033,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
1033
1033
|
if (params.bar.items.length === 1) {
|
|
1034
1034
|
return;
|
|
1035
1035
|
}
|
|
1036
|
-
params.bar.items.
|
|
1036
|
+
params.bar.items.sortBy((a, b) => {
|
|
1037
1037
|
if (a.position !== b.position) {
|
|
1038
1038
|
if (a.position < b.position) {
|
|
1039
1039
|
return -1;
|
|
@@ -16,6 +16,9 @@ Ext.define('Coon.report.component.reportpanel.ReportTreeStore', {
|
|
|
16
16
|
getMethod: function() {
|
|
17
17
|
return 'POST';
|
|
18
18
|
},
|
|
19
|
+
getHeaders: function() {
|
|
20
|
+
return {'X-CSRF-Token': localStorage.getItem('CSRFToken')};
|
|
21
|
+
},
|
|
19
22
|
url: 'ReportFormData/get',
|
|
20
23
|
reader: {
|
|
21
24
|
type: 'json',
|
|
@@ -92,21 +92,6 @@ Ext.define('Coon.report.plugin.configPanel.ControlColumnByParamPluginConfigPanel
|
|
|
92
92
|
];
|
|
93
93
|
},
|
|
94
94
|
|
|
95
|
-
addHandler: function(btn) {
|
|
96
|
-
const grid = btn.up('panel').down('gridpanel');
|
|
97
|
-
grid.getStore().add({paramValue: ''});
|
|
98
|
-
const editor = grid.findPlugin('cellediting');
|
|
99
|
-
editor.startEditByPosition({row: this.getStore().getCount() - 1, column: 0});
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
deleteHandler: function(btn) {
|
|
103
|
-
const grid = btn.up('panel').down('gridpanel');
|
|
104
|
-
const record = grid.getSelectionModel().getSelection()[0];
|
|
105
|
-
if (record) {
|
|
106
|
-
grid.getStore().remove(record);
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
|
|
110
95
|
doInit: function(config) {
|
|
111
96
|
this.grid.doInit(config['valueConfig']);
|
|
112
97
|
},
|
|
@@ -108,7 +108,6 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
108
108
|
|
|
109
109
|
computeInteractUIState() {
|
|
110
110
|
const state = {disabled: false, hidden: !!this.invisibleByDefault};
|
|
111
|
-
|
|
112
111
|
if (this.isButtonAdded()) {
|
|
113
112
|
if (!this.dependOnGridParameters && !this.dependOnGridRow) {
|
|
114
113
|
return state;
|
|
@@ -120,9 +119,20 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
120
119
|
state.disabled = this.isFilterDependedParamEmpty();
|
|
121
120
|
}
|
|
122
121
|
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
if (
|
|
123
|
+
!state.disabled &&
|
|
124
|
+
this.inputParametersConfig.haveRequiredReportParameters
|
|
125
|
+
) {
|
|
126
|
+
state.disabled = !this.isRequiredParametersPassed('PRM');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (
|
|
130
|
+
!state.disabled &&
|
|
131
|
+
this.dependOnGridRow &&
|
|
132
|
+
this.isValidForRequiredParametersChecking()
|
|
133
|
+
) {
|
|
134
|
+
const isRequiredFLDParametersPassed = this.isRequiredParametersPassed('FLD');
|
|
135
|
+
state.disabled = this.skipRowValueCheck ? false : !isRequiredFLDParametersPassed;
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
state.hidden = this.isButtonHidden(state.disabled);
|
|
@@ -179,12 +189,27 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
179
189
|
*/
|
|
180
190
|
computeRowInteractState() {
|
|
181
191
|
let rowInteractEnabled= this.isRowInteractBySelection();
|
|
182
|
-
if (
|
|
192
|
+
if (
|
|
193
|
+
rowInteractEnabled &&
|
|
194
|
+
!Ext.isEmpty(this.dependOnGridParameters)
|
|
195
|
+
) {
|
|
183
196
|
rowInteractEnabled = !this.isFilterDependedParamEmpty();
|
|
184
197
|
}
|
|
185
|
-
|
|
186
|
-
|
|
198
|
+
|
|
199
|
+
if (
|
|
200
|
+
rowInteractEnabled &&
|
|
201
|
+
this.inputParametersConfig.haveRequiredReportParameters
|
|
202
|
+
) {
|
|
203
|
+
rowInteractEnabled = this.isRequiredParametersPassed('PRM');
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (
|
|
207
|
+
rowInteractEnabled &&
|
|
208
|
+
this.dependOnGridRow
|
|
209
|
+
) {
|
|
210
|
+
rowInteractEnabled = this.skipRowValueCheck ? true : this.isRequiredParametersPassed('FLD');
|
|
187
211
|
}
|
|
212
|
+
|
|
188
213
|
return {
|
|
189
214
|
rowInteractEnabled,
|
|
190
215
|
};
|
|
@@ -225,6 +250,10 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
225
250
|
}
|
|
226
251
|
});
|
|
227
252
|
|
|
253
|
+
const haveRequiredReportParameters=
|
|
254
|
+
parameters.filter((param) => param.editable &&
|
|
255
|
+
param.reportNavigationOptionContextSource === 'PRM').length > 0;
|
|
256
|
+
|
|
228
257
|
return {
|
|
229
258
|
selectionDependencyType: multiDependencyParameters.length > 0 ? 'multi' : 'single',
|
|
230
259
|
multiDependencyParameters,
|
|
@@ -232,6 +261,7 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
232
261
|
notRequiredMultiParameters,
|
|
233
262
|
defaultParameters: reportIndependentParameters,
|
|
234
263
|
onlyIndependentParameters,
|
|
264
|
+
haveRequiredReportParameters,
|
|
235
265
|
};
|
|
236
266
|
},
|
|
237
267
|
|
|
@@ -276,32 +306,31 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
276
306
|
},
|
|
277
307
|
|
|
278
308
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* PRM - параметр отчета
|
|
282
|
-
* FLD - поле выбранной записи.
|
|
283
|
-
* Достаточно чтобы значение было определено.
|
|
309
|
+
* Обязательные параметры плагина типа type (зависит от значения параметра репорта) настроены и заполнены.
|
|
310
|
+
* @param {string} type тип пареметра плагина (FLD, PRM)
|
|
284
311
|
* @returns {boolean}
|
|
285
312
|
*/
|
|
286
|
-
isRequiredParametersPassed() {
|
|
287
|
-
const parameters = this.getRequiredParameters();
|
|
313
|
+
isRequiredParametersPassed(type) {
|
|
314
|
+
const parameters = this.getRequiredParameters(type);
|
|
288
315
|
if (parameters.length === 0) {
|
|
289
316
|
return true;
|
|
290
317
|
}
|
|
291
|
-
const selected = this.component.getSelectionModel().getLastSelected();
|
|
292
|
-
|
|
293
318
|
return parameters.every((param) => {
|
|
294
|
-
const paramValue = this.getParamValue(param
|
|
319
|
+
const paramValue = this.getParamValue(param);
|
|
295
320
|
return !Ext.isEmpty(paramValue);
|
|
296
321
|
});
|
|
297
322
|
},
|
|
298
323
|
|
|
299
|
-
getRequiredParameters() {
|
|
324
|
+
getRequiredParameters(type) {
|
|
300
325
|
const params = Array.isArray(this.parameters) ? this.parameters : [this.parameters];
|
|
301
|
-
return params.filter((param) =>
|
|
326
|
+
return params.filter((param) =>
|
|
327
|
+
param &&
|
|
328
|
+
param.editable &&
|
|
329
|
+
(!type || type === param.reportNavigationOptionContextSource)
|
|
330
|
+
);
|
|
302
331
|
},
|
|
303
332
|
|
|
304
|
-
getParamValue(param
|
|
333
|
+
getParamValue(param) {
|
|
305
334
|
const {
|
|
306
335
|
defaultValue,
|
|
307
336
|
reportNavigationOptionContextSource: source,
|
|
@@ -314,7 +343,7 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
314
343
|
|
|
315
344
|
switch (source) {
|
|
316
345
|
case 'FLD':
|
|
317
|
-
return
|
|
346
|
+
return this.component.getContextManager()?.getSelectedRecord()?.get(field);
|
|
318
347
|
case 'PRM':
|
|
319
348
|
return this.component.contextMenu?.params?.[field];
|
|
320
349
|
default:
|