ru.coon 3.0.24 → 3.0.26
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 +10 -0
- package/package.json +1 -1
- package/src/report/component/settings/plugin/ReportFormPluginGrid.js +1 -6
- package/src/report/component/settings/plugin/ReportFormPluginGridController.js +37 -22
- package/src/report/component/settings/plugin/ReportFormPluginSettings.js +2 -1
- package/src/uielement/component/UiCPWrapper.js +18 -5
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# Version 3.0.26, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a0df7c2d955b5d5d24ba68a0fe0a97375acc5ee3)
|
|
2
|
+
* TR-71648 fix: исправлена подгрузка конфигурации плагина при выборе uiElement ([b90d1c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b90d1ce10022a274977c44a2a65b7fbb532c117f))
|
|
3
|
+
* update: CHANGELOG.md ([7a7d54], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7a7d5486bb04c4eb44cef61633dcdf59a62fc1ed))
|
|
4
|
+
|
|
5
|
+
# Version 3.0.25, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/29b2ff1b9c7d3c4fbe98425e94b868a19f332af4)
|
|
6
|
+
* ## Fixes
|
|
7
|
+
* <span style='color:red'> UiCPWrapper parent viewModel inheritance</span> ([ef0228], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ef02284c46d3807a10453b3a3aef9642d778f365))
|
|
8
|
+
|
|
9
|
+
* update: CHANGELOG.md ([ecd6e3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ecd6e3ee6cbf4cf29e6a62f18cd48e8144caa6f4))
|
|
10
|
+
|
|
1
11
|
# Version 3.0.24, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/380c0346c6949314e25b567d825bc43545743828)
|
|
2
12
|
* HT-12505 fix: исправление ошибок взаимодействия с Selection Model MultiRangeSpreadsheetModel ([34fe95], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/34fe953d01cf35a13b9638e02d131a7e64baf88d))
|
|
3
13
|
* HT-12894 feat: displayFieldTpl, displayFieldConverter для ReportLookupTag и SimplestReportCombo ([e0e531], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e0e53115399c0b8a16cf4634247d56df6c43c406))
|
package/package.json
CHANGED
|
@@ -102,12 +102,7 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginGrid', {
|
|
|
102
102
|
{
|
|
103
103
|
iconCls: 'fa fa-cog',
|
|
104
104
|
tooltip: 'Настройка',
|
|
105
|
-
handler
|
|
106
|
-
Ext.create({
|
|
107
|
-
xtype: 'ReportFormPluginSettings',
|
|
108
|
-
selection: Array.from(arguments)[5],
|
|
109
|
-
});
|
|
110
|
-
},
|
|
105
|
+
handler: 'uiElementConfigure',
|
|
111
106
|
}
|
|
112
107
|
],
|
|
113
108
|
},
|
|
@@ -218,10 +218,11 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginGridController
|
|
|
218
218
|
},
|
|
219
219
|
|
|
220
220
|
selectUiElementHandler: function(editorField) {
|
|
221
|
+
const xtype = editorField.up('grid').selection.get('xtype');
|
|
221
222
|
const getListUiElementCd = function(value) {
|
|
222
223
|
Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'UI_ELEMENTS_LIST',
|
|
223
224
|
Ext.encode([
|
|
224
|
-
{type: 'XTYPE', value:
|
|
225
|
+
{type: 'XTYPE', value: xtype},
|
|
225
226
|
{type: 'UI_ELEMENT_CD', value: value}
|
|
226
227
|
]))
|
|
227
228
|
.then((data) => {
|
|
@@ -341,37 +342,40 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginGridController
|
|
|
341
342
|
const selectedPlugin = vm.get('pluginsGrid').selection;
|
|
342
343
|
const lastUiElementId = selectedPlugin && selectedPlugin.get('lastUiElementId');
|
|
343
344
|
selectedPlugin && selectedPlugin.set('lastUiElementId', uiElementId);
|
|
344
|
-
if (lastUiElementId
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
if (lastUiElementId === uiElementId) {
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
const view = this.getView();
|
|
349
|
+
this.isUiElementLinked(uiElementId, reportId)
|
|
350
|
+
.then((isLinked) => {
|
|
351
|
+
isLinked && selectedPlugin && selectedPlugin.set('readOnly', true);
|
|
347
352
|
const uiElementCommand = Ext.create('command.GetUIElementCommand');
|
|
348
|
-
uiElementCommand.on('complete',
|
|
353
|
+
uiElementCommand.on('complete', (data) => {
|
|
349
354
|
if (data && data.id && data.propertyData) {
|
|
350
|
-
Ext.Msg.confirm('Подтверждение', 'Загрузить свойства указанного UiElement?',
|
|
355
|
+
Ext.Msg.confirm('Подтверждение', 'Загрузить свойства указанного UiElement?', (btn) => {
|
|
351
356
|
if (btn === 'yes') {
|
|
352
357
|
vm.set('pluginsGrid.selection.jsonProperties',
|
|
353
358
|
Ext.isObject(data.propertyData) ? data.propertyData : Ext.decode(data.propertyData));
|
|
354
|
-
|
|
359
|
+
view.fireEvent('refreshUiElement');
|
|
355
360
|
}
|
|
356
|
-
}
|
|
361
|
+
});
|
|
357
362
|
}
|
|
358
|
-
}
|
|
363
|
+
});
|
|
359
364
|
uiElementCommand.execute(uiElementId, true);
|
|
360
|
-
}
|
|
361
|
-
|
|
365
|
+
})
|
|
366
|
+
.catch((error) => {
|
|
367
|
+
// todo: Обработать ситуацию, когда при проверке использования ui в репортах произошла ошибка
|
|
368
|
+
});
|
|
362
369
|
},
|
|
363
370
|
|
|
364
|
-
isUiElementLinked: function(uiElementId, ownerReportId
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
parameterList: {'UI_ELEMENT_CD': uiElementId},
|
|
373
|
-
reportId: 'UI_ELEMENT_USED_TABLES',
|
|
374
|
-
},
|
|
371
|
+
isUiElementLinked: function(uiElementId, ownerReportId) {
|
|
372
|
+
return Coon.util.promisifyCmd({
|
|
373
|
+
command: 'command.GetDynamicReportDataCommand',
|
|
374
|
+
params: {reportId: 'UI_ELEMENT_USED_TABLES', parameterList: Ext.encode([{type: 'UI_ELEMENT_CD', value: uiElementId}])},
|
|
375
|
+
}).then((response) => {
|
|
376
|
+
const list = response && response.list;
|
|
377
|
+
const linked = Array.isArray(list) && list.find((row) => row.NAME !== ownerReportId);
|
|
378
|
+
return !!linked;
|
|
375
379
|
});
|
|
376
380
|
},
|
|
377
381
|
autoGenerateUiElementHandler(editorField) {
|
|
@@ -384,4 +388,15 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginGridController
|
|
|
384
388
|
generateUiElementId: function(data) {
|
|
385
389
|
return Coon.report.ReportEntity.generateUiElementId(this.getReportId(), data);
|
|
386
390
|
},
|
|
391
|
+
uiElementConfigure(view, rowIndex, colIndex, item, e, record) {
|
|
392
|
+
const settings = Ext.create({
|
|
393
|
+
xtype: 'ReportFormPluginSettings',
|
|
394
|
+
selection: record,
|
|
395
|
+
});
|
|
396
|
+
settings.on('uielementchanged', (uiElement) => {
|
|
397
|
+
record.set('uiElement', uiElement);
|
|
398
|
+
this.loadPropertiesUiElementCd(uiElement);
|
|
399
|
+
this.updateDependentReports(uiElement);
|
|
400
|
+
});
|
|
401
|
+
},
|
|
387
402
|
});
|
|
@@ -138,7 +138,8 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginSettings', {
|
|
|
138
138
|
});
|
|
139
139
|
},
|
|
140
140
|
applyHandler() {
|
|
141
|
-
|
|
141
|
+
const uiElement = this.lookup('uiElementField').getValue();
|
|
142
|
+
this.getView().fireEvent('uielementchanged', uiElement);
|
|
142
143
|
this.closeHandler();
|
|
143
144
|
},
|
|
144
145
|
closeHandler() {
|
|
@@ -137,18 +137,31 @@ Ext.define('Coon.uielement.component.UiCPWrapper', {
|
|
|
137
137
|
});
|
|
138
138
|
},
|
|
139
139
|
|
|
140
|
+
getParentViewModel() {
|
|
141
|
+
return this.parentViewModel && this.parentViewModel.isViewModel ?
|
|
142
|
+
this.parentViewModel :
|
|
143
|
+
(
|
|
144
|
+
this.up('UiCustomPanel') &&
|
|
145
|
+
this.up('UiCustomPanel').getViewModel() ||
|
|
146
|
+
this.lookupViewModel()
|
|
147
|
+
);
|
|
148
|
+
},
|
|
149
|
+
|
|
140
150
|
setViewModelConfig(config) {
|
|
141
151
|
config.viewModel = {};
|
|
142
152
|
if ([null, false].includes(this.parentViewModel)) {
|
|
143
153
|
return;
|
|
144
154
|
}
|
|
145
|
-
const parentViewModel =
|
|
146
|
-
this.parentViewModel :
|
|
147
|
-
this.up('UiCustomPanel').getViewModel();
|
|
155
|
+
const parentViewModel = this.getParentViewModel();
|
|
148
156
|
if (this.inheritViewModel) {
|
|
149
|
-
|
|
157
|
+
if (parentViewModel) {
|
|
158
|
+
config.viewModel = parentViewModel;
|
|
159
|
+
} else {
|
|
160
|
+
config.viewModel = {};
|
|
161
|
+
Coon.log.error('UICPWrapper has no viewModel!');
|
|
162
|
+
}
|
|
150
163
|
} else {
|
|
151
|
-
config.viewModel.parent = parentViewModel;
|
|
164
|
+
config.viewModel.parent = parentViewModel || {};
|
|
152
165
|
}
|
|
153
166
|
},
|
|
154
167
|
|
package/src/version.js
CHANGED