ru.coon 3.0.73 → 3.0.74
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
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# Version 3.0.74, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/723e4a3b5562fe1ce81ea131cba9987cfe286001)
|
|
2
|
+
* HT-10758: исправление доступности кнопок в зависимости от типа параметра ([db308d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/db308d95a02df99e875998bc2039380dff4c87c7))
|
|
3
|
+
* update: CHANGELOG.md ([734d0f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/734d0fed9b45fffbff8d29a7b43723e06d9265fb))
|
|
4
|
+
|
|
1
5
|
# Version 3.0.73, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d77f15a5f3bbd05c134e65d32edab3f7cbb2b80f)
|
|
2
6
|
* ## Features
|
|
3
7
|
* <span style='color:green'>feat: HT-12053: Добавил возможность изменить xtype кнопки, что позволит использовать split, segmented и кастомные кнопки</span> ([b0f2e7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b0f2e72e4115266d83b9a39028159169355d2e73))
|
package/package.json
CHANGED
|
@@ -28,6 +28,7 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
|
|
|
28
28
|
},
|
|
29
29
|
|
|
30
30
|
initComponent: function() {
|
|
31
|
+
const me = this;
|
|
31
32
|
this.storeForSELR = [
|
|
32
33
|
{
|
|
33
34
|
value: 'CVW',
|
|
@@ -102,6 +103,8 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
|
|
|
102
103
|
allowBlank: false,
|
|
103
104
|
});
|
|
104
105
|
|
|
106
|
+
this.fullValueEditorCombo = this.getFullValueEditorCombo();
|
|
107
|
+
|
|
105
108
|
const valueDefaultEditor = Ext.create('Ext.form.field.Text', {
|
|
106
109
|
allowBlank: false,
|
|
107
110
|
});
|
|
@@ -132,7 +135,7 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
|
|
|
132
135
|
dataIndex: 'reportNavigationOptionContextSourceValue',
|
|
133
136
|
xtype: 'hintColumn',
|
|
134
137
|
width: 130,
|
|
135
|
-
|
|
138
|
+
editable: true,
|
|
136
139
|
renderer: Ext.bind(function(value, meta, record) {
|
|
137
140
|
const type = record.get('reportNavigationOptionContextSource');
|
|
138
141
|
let visibleValue;
|
|
@@ -140,16 +143,28 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
|
|
|
140
143
|
let found;
|
|
141
144
|
if (type === 'FLD') {
|
|
142
145
|
found = this.fieldsStore.findRecord('value', value);
|
|
143
|
-
visibleValue = found && found.get('description');
|
|
146
|
+
visibleValue = found && (`${found.get('value')} (${found.get('description')})`);
|
|
144
147
|
} else if (type === 'PRM') {
|
|
145
148
|
found = this.paramsStore.findRecord('value', value);
|
|
146
|
-
visibleValue = found && found.get('description');
|
|
149
|
+
visibleValue = found && (`${found.get('value')} (${found.get('description')})`);
|
|
147
150
|
} else if (type === 'SELR' || type === 'ALLR' || type === 'RCRD' || type === 'MDFD' || type === 'CHCK') {
|
|
148
151
|
found = this.storeForSELR.find((obj) => obj.value === value);
|
|
149
152
|
visibleValue = found && found.description;
|
|
150
153
|
}
|
|
151
154
|
return Coon.format.withHint(visibleValue);
|
|
152
155
|
}, this),
|
|
156
|
+
getEditor: function(record) {
|
|
157
|
+
const type = record.get('reportNavigationOptionContextSource');
|
|
158
|
+
let editor;
|
|
159
|
+
if (['PRM', 'FLD'].includes(type)) {
|
|
160
|
+
editor = me.fullValueEditorCombo;
|
|
161
|
+
} else {
|
|
162
|
+
editor = me.valueEditor;
|
|
163
|
+
}
|
|
164
|
+
return Ext.create('Ext.grid.CellEditor', {
|
|
165
|
+
field: editor,
|
|
166
|
+
});
|
|
167
|
+
},
|
|
153
168
|
},
|
|
154
169
|
{
|
|
155
170
|
text: 'Значение по умолчанию',
|
|
@@ -235,6 +250,37 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
|
|
|
235
250
|
}, this);
|
|
236
251
|
},
|
|
237
252
|
|
|
253
|
+
getFullValueEditorCombo() {
|
|
254
|
+
const {$reportField, $description, $reportFieldTypeLookup} =
|
|
255
|
+
Coon.report.model.ReportFieldMaintenanceBeanFields;
|
|
256
|
+
const fieldTypeStyle =
|
|
257
|
+
'opacity:.8;background-color:lightgrey;font-size:.7rem;padding:2px 4px;';
|
|
258
|
+
const listItemTpl = Ext.create(
|
|
259
|
+
'Ext.XTemplate',
|
|
260
|
+
'<ul class="x-list-plain"><tpl for=".">',
|
|
261
|
+
'<li role="option" class="x-boundlist-item">',
|
|
262
|
+
`<b>{[values["${$reportField}"]]}</b> : <i style="${fieldTypeStyle}">{[values["${$reportFieldTypeLookup}"]]}</i>`,
|
|
263
|
+
'<tpl if="description.length">',
|
|
264
|
+
`<div style="opacity:.8;font-size: 1rem;"><i>{[values["${$description}"]]}</i></div>`,
|
|
265
|
+
'</tpl>',
|
|
266
|
+
'</li>',
|
|
267
|
+
'</tpl></ul>'
|
|
268
|
+
);
|
|
269
|
+
return Ext.create(
|
|
270
|
+
'Coon.report.component.SimplestReportCombo',
|
|
271
|
+
{
|
|
272
|
+
valueField: $reportField,
|
|
273
|
+
displayField: $reportField,
|
|
274
|
+
listConfig: {
|
|
275
|
+
tpl: listItemTpl,
|
|
276
|
+
},
|
|
277
|
+
displayTpl: new Ext.XTemplate(
|
|
278
|
+
'<tpl>{[values[0].reportFieldCd]} ({[values[0].description]})</tpl>'
|
|
279
|
+
),
|
|
280
|
+
}
|
|
281
|
+
);
|
|
282
|
+
},
|
|
283
|
+
|
|
238
284
|
/**
|
|
239
285
|
* Инициализация
|
|
240
286
|
*/
|
|
@@ -323,9 +369,11 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
|
|
|
323
369
|
switch (type) {
|
|
324
370
|
case 'FLD':
|
|
325
371
|
list = Coon.Function.serializeRecords(this.fieldsStore.getRange());
|
|
372
|
+
this.fillFullValueCombo(this.fieldsStore.getRange());
|
|
326
373
|
break;
|
|
327
374
|
case 'PRM':
|
|
328
375
|
list = Coon.Function.serializeRecords(this.paramsStore.getRange());
|
|
376
|
+
this.fillFullValueCombo(this.paramsStore.getRange());
|
|
329
377
|
break;
|
|
330
378
|
case 'RCRD':
|
|
331
379
|
case 'ALLR':
|
|
@@ -342,10 +390,29 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
|
|
|
342
390
|
}
|
|
343
391
|
},
|
|
344
392
|
|
|
393
|
+
fillFullValueCombo(data) {
|
|
394
|
+
const {$reportField, $description, $reportFieldTypeLookup} =
|
|
395
|
+
Coon.report.model.ReportFieldMaintenanceBeanFields;
|
|
396
|
+
const columnsData = [];
|
|
397
|
+
data.forEach((item) => {
|
|
398
|
+
// const fieldData = item.getData();
|
|
399
|
+
const description = Ext.util.Format.stripTags(
|
|
400
|
+
String(item.get('description')).replaceAll('<br>', ' ')
|
|
401
|
+
);
|
|
402
|
+
columnsData.push({
|
|
403
|
+
[$description]: description || '',
|
|
404
|
+
[$reportField]: item.get('value'),
|
|
405
|
+
[$reportFieldTypeLookup]: item.get('typeLookup'),
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
this.fullValueEditorCombo.getStore().loadData(columnsData);
|
|
409
|
+
},
|
|
410
|
+
|
|
345
411
|
changeFieldsList: function(fields) {
|
|
346
412
|
const cvList = fields.map((field) => ({
|
|
347
413
|
value: field['reportFieldCd'],
|
|
348
414
|
description: field['description'],
|
|
415
|
+
typeLookup: field['reportFieldTypeLookup'],
|
|
349
416
|
}));
|
|
350
417
|
this.fieldsStore.loadData(cvList);
|
|
351
418
|
},
|
|
@@ -354,6 +421,7 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
|
|
|
354
421
|
const cvList = parameters.map((param) => ({
|
|
355
422
|
value: param['reportParameterCd'],
|
|
356
423
|
description: param['description'],
|
|
424
|
+
typeLookup: param['reportParameterTypeLookup'],
|
|
357
425
|
}));
|
|
358
426
|
this.paramsStore.loadData(cvList);
|
|
359
427
|
},
|
|
@@ -243,10 +243,8 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
243
243
|
param.editable ? requiredMultiParameters.push(param) : notRequiredMultiParameters.push(param);
|
|
244
244
|
multiDependencyParameters.push(param);
|
|
245
245
|
onlyIndependentParameters = false;
|
|
246
|
-
} else if (param.reportNavigationOptionContextSource === 'DFLT') {
|
|
247
|
-
reportIndependentParameters.push(param);
|
|
248
246
|
} else {
|
|
249
|
-
|
|
247
|
+
reportIndependentParameters.push(param);
|
|
250
248
|
}
|
|
251
249
|
});
|
|
252
250
|
|
package/src/version.js
CHANGED