ru.coon 2.5.26 → 2.5.28

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,16 @@
1
+ # Version 2.5.28, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1234c97e665cf63c2ab2a4a0048f26b99c815f04)
2
+ * ## Fixes
3
+ * <span style='color:red'> TR-67140 method renamed</span> ([129cb9], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/129cb965f9c1be60ca5ba877f35eedbead2dc815))
4
+
5
+ * upd ([bb428e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bb428e586bc5a72cdc5f9e84f9195f34c508276f))
6
+ * update: CHANGELOG.md ([9de895], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9de895f725e09a81ca3ff01d6820e64efa73a919))
7
+
8
+ # Version 2.5.27, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fcd4e0950fe72a254f300c150d37283487a172c1)
9
+ * ## Fixes
10
+ * <span style='color:red'>Fix:HT-7001 override setValue in ReportLookupCombo</span> ([794a19], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/794a199b1fc5488a5519db1fb9b03328f85a84b7))
11
+
12
+ * update: CHANGELOG.md ([6be855], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6be8553e20b399bfa42e1a92bb3bd9a5de72256f))
13
+
1
14
  # Version 2.5.26, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/da7767ea8d5507d8b2081aeaf13f46c21010f0d2)
2
15
  * ## Features
3
16
  * <span style='color:green'>feat: TR-67310 исправление ситуации когда defaultFocus на поле в состоянии disabled приводит к возврату фокуса на предыдущий элемент</span> ([335b93], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/335b9374874e2406e6f5c80daada6ba49eef05dc))
@@ -79,8 +92,10 @@ fix ReportPropertiesPanelController</span> ([e2b928], [link](http://gitlab-dbr.s
79
92
  * ## Features
80
93
  * <span style='color:green'>feat: Добавлена возможность использовать параметры с filterPanel. Closes BFL-8098.</span> ([5b1fd5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5b1fd503a24a3ff6c18f0fadffc1f6e3fd360ddc))
81
94
  * <span style='color:green'>feat: Добавлена возможнось автоматически изменять размеры окна в зависимости от размеров открываемой панели. Related to BFL-7771.</span> ([5d7560], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5d756008132baf464fc924a8c0bb58ef0c3ed27d))
95
+ * <span style='color:green'>feat: TR-67140 доработка RequiredFlagPlugin</span> ([ae6581], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ae65810543f27e094d5d8a026c47a47edc7768a3))
82
96
  * <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))
83
97
  * <span style='color:green'>Feat:TR-67289 Включил возможность авторизации по гит токену</span> ([b9505b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b9505baa99ee5f5785e6da287063774918f0d698))
98
+ * <span style='color:green'>feat: TR-67140 разработка универсальной компонент-формы для обработки статуса требуемых полей</span> ([20e76d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/20e76d097db4ddf9120ddc56f86b6470ab7335ca))
84
99
  * <span style='color:green'>feat BFL-7734: передача headers в ASyncBaseCommand</span> ([ed1202], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ed1202d1f90cb9c73bd858598a28f63b519642c7))
85
100
 
86
101
  * ## Fixes
@@ -111,17 +126,24 @@ ReportPropertiesPanelController.buildPropertiesTreeData was losing property "key
111
126
  - prevent native BoundList popup after select record
112
127
  - decomposing initComponent
113
128
  - add some specifications</span> ([be963d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/be963d7435441dcbf5adb8db81d764bdf22516b9))
129
+ * <span style='color:red'> TR-67140 поддержка реконфигурации полей</span> ([d347aa], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d347aa2a9b2f02a130fb5745af99552b65e9adcd))
114
130
 
115
131
  * remove sass/example path from eslint and gitignored ([31c40c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/31c40c762968c7ec3d824b270bba70d28a4958b1))
132
+ * upd ([523148], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5231484d8d8a999ce8e5f4430bf5f83ae71be130))
116
133
  * update: CHANGELOG.md ([65d101], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/65d10184c4d288dd083ff31880e560dab4a764e7))
117
134
 
118
135
  # Version 2.5.14, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1c5a4296f1a7a2649f02deb68e05542aa6185f10)
119
136
  * ## Fixes
120
137
  * <span style='color:red'> HT-7017 linter</span> ([264cac], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/264cac926d75d4c68805a4904828ebb26b9b7979))
121
138
  * <span style='color:red'> HT-7017 GridEditButtons исправлено создание кнопки при отсутствии initialConfig</span> ([510cac], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/510cac7188bebbf9a92944a95f9cfceb668436a1))
139
+ * <span style='color:red'> исправление ReportGroupsFieldValidationPlugin при отсутсвии параметров, исправление поведение * когда параметры "ИЛИ"</span> ([87ef01], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/87ef010ef0197e837dc353055b76a9c8f427db9d))
140
+ * <span style='color:red'> TR-67140 обработка чек-боксов и радио групп</span> ([aca447], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aca4477e3d24ace1eea5fdf18a774b674dd4f900))
122
141
 
123
142
  * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/report/plugin/grid/GridEditButtons.jsffc544232e87d74e648fe17d11f0038f3e73e2cb))
143
+ * upd ([5c52f7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5c52f7fc7e44e33988d2cd7eee787bf6470af3e5))
124
144
  * upd ([d30f44], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d30f449e6b5c3525a66a1faa2ef67ecda3832d20))
145
+ * upd ([86dfa1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/86dfa17be5a109869f890cc3f4c223f2ee02d802))
146
+ * upd ([f4b797], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f4b797b2b4a4a9f5e5be507ac2f2eadfd8bd4e02))
125
147
  * refactoring ([62c1c2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/62c1c27d5a75ebb37409d98a8ac486cbe2c1e978))
126
148
  * update: CHANGELOG.md ([71a489], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/71a489f22f186bd675cafde8f01fc089566de2f9))
127
149
 
@@ -131,7 +153,13 @@ ReportPropertiesPanelController.buildPropertiesTreeData was losing property "key
131
153
  * <span style='color:green'>feat: HT-6957 Сохранение сворачивания структуры конфигурации панели при редактировании</span> ([59990a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/59990a0b6ae662624d551ce206ab02f15bcd843a))
132
154
 
133
155
  * ## Fixes
156
+ * <span style='color:red'> TR-67140 переименование функций</span> ([531fa1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/531fa1ee8ec89f876e7ee68ae912a206a2761a39))
157
+ * <span style='color:red'> TR-67140 доработка формы</span> ([b5c3db], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b5c3db369182c7d9b827427580cf8c0842aae14d))
134
158
  * <span style='color:red'> this.plugins не пересоздается при создании экземпляра TypedCharacteristicEditor</span> ([37167d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/37167d823286d01e7b90039d57e5fcfc843f228d))
159
+ * <span style='color:red'> TR-67140 доработка универсальной компонент-формы для обработки статуса требуемых полей</span> ([294681], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/294681e202244355280a03f7b9230699f5b7a3b3))
160
+ * <span style='color:red'> TR-67140 доработка универсальной компонент-формы для обработки статуса требуемых полей</span> ([133feb], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/133febffbff133519c1a5c6ba86e5d6870060e3a))
161
+ * <span style='color:red'> TR-67140 рефакторинг</span> ([cb4e9e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cb4e9ea50f4a724a70b211c35bfa01f6ac9aa447))
162
+ * <span style='color:red'> TR-67140 рефакторинг</span> ([4c8a53], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4c8a532875fd7226a73eb1d91f19d9ef8c468769))
135
163
  * <span style='color:red'> При использовании AddidionalParametersPanel параметры всегда преобразовывались в json, независимо от наличия jsonData. Related to BFL-7771.</span> ([4d8091], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4d809127ad310b19fbe96bcee3d37855d410619e))
136
164
 
137
165
  * upd ([9c5433], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9c543365e09b2f9736f41ff602c15ef57e5d9f36))
@@ -139,18 +167,26 @@ ReportPropertiesPanelController.buildPropertiesTreeData was losing property "key
139
167
  * revert changes ([fc528a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fc528a2298acf08d8ab4cce8d84accad7dc1e33e))
140
168
  * revert changes ([4e4a73], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4e4a73bb5432c6fcac589b34b001d8aa401c5477))
141
169
  * TR-66400 Добавлен триггер очистки. Убрана неиспользуемая переменная. Исправлена ошибка логики выполнения проверки существованию UI элемента. ([b53382], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b53382c2eb9228c55a948ce365aeff177e3ad857))
170
+ * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update RequiredWatcherForm.js44b47853aaea5a9ac09be75fc262e4e008bc040d))
142
171
  * update: CHANGELOG.md ([3f5713], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3f5713a9a003bd789e7595388f94ec54c17c19d4))
143
172
 
144
173
  # Version 2.5.12, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/604d178d5d06bbc2ccd6a9c288b56a7faf189caa)
145
174
  * ## Fixes
146
175
  * <span style='color:red'> TR-67183 Исправлен доступ к асинхронному свойству компонента ReportPickerLookupCombo.</span> ([efe34e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/efe34e7717872f6ab35b04216f5a9112887917f6))
147
176
  * <span style='color:red'> Fix adding duplicate plugins. Related to BFL-7771.</span> ([a133c7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a133c7677c770b78b3b3145585a8e9679b32b828))
177
+ * <span style='color:red'> TR-67140 рефакторинг</span> ([7dd84d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7dd84d8df4015a678acc0ec4d073a068decf5816))
178
+ * <span style='color:red'> TR-67140 доработка компонента-формы для обработки статуса требуемых полей</span> ([c2c0ed], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c2c0ed4978017bb419f42bc3340a91c2b1753ab0))
179
+ * <span style='color:red'> TR-67140 доработка компонента-формы для обработки статуса требуемых полей</span> ([1893a5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1893a5ef3a1cfd1f8c90a2789f2120ca970c2e04))
180
+ * <span style='color:red'> TR-67140 доработка компонента-формы для обработки статуса требуемых полей</span> ([bde6b6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bde6b6d18ef03f6be510e2739e8e4b3c2bd38781))
148
181
 
149
182
  * upd ([9b2670], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9b2670ce6c4dd69a6517bf36995d5ac812178a03))
150
183
  * upd ([6521a4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6521a4d05e8d41ce10619f05ed64d789a329743f))
151
184
  * update: CHANGELOG.md ([0535f6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0535f65ceee74c1535c2c7fa37602e70d5acf95c))
152
185
 
153
186
  # Version 2.5.11, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d3146166caf00237f23ad13b05c93f958a39d3a5)
187
+ * ## Features
188
+ * <span style='color:green'>feat: TR-67140 add SmartContainer</span> ([08480c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/08480c71aba6fe3c470750cfafd74fbfb9222eab))
189
+
154
190
  * ## Fixes
155
191
  * <span style='color:red'> UI fixes. Related to BFL-7771.</span> ([aeedf7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aeedf7bd6565451c3a1e5b680995c59c5b2fb1e8))
156
192
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.5.26",
7
+ "version": "2.5.28",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -0,0 +1,135 @@
1
+ Ext.define('Coon.common.panel.SmartForm', {
2
+ extend: 'Ext.form.Panel',
3
+ xtype: 'SmartForm',
4
+
5
+ config: {
6
+ buttonId: 'submitButton',
7
+ bindToModel: undefined,
8
+ },
9
+
10
+ initComponent: function() {
11
+ this.callParent(arguments);
12
+
13
+ this.componentsInvalid = new Set();
14
+
15
+ this.fields = this.query('field');
16
+ for (const field of this.fields) {
17
+ if (field.xtype === 'radiofield') {
18
+ const radioGroup = field.up('radiogroup');
19
+ if (radioGroup.findPlugin('RequiredFlagPlugin')) {
20
+ continue;
21
+ }
22
+ radioGroup.addPlugin('RequiredFlagPlugin');
23
+ this.handleComponentInit(radioGroup);
24
+ } else {
25
+ field.addPlugin('RequiredFlagPlugin');
26
+ this.handleComponentInit(field);
27
+ }
28
+ }
29
+
30
+ this.on('reconfigureComponents', this.reconfigureComponents, this);
31
+ },
32
+
33
+ reconfigureComponents: function() {
34
+ for (const field of this.fields) {
35
+ if (field.xtype === 'radiofield') {
36
+ const radioGroup = field.up('radiogroup');
37
+ radioGroup.isRequiredPropChanged() && this.changeComponentsInvalid(radioGroup);
38
+ } else {
39
+ field.isRequiredPropChanged() && this.changeComponentsInvalid(field);
40
+ }
41
+ }
42
+ this.isFormValid();
43
+ },
44
+
45
+ isComponentInvalid: function(component) {
46
+ const isEmpty = Ext.isObject(component.getValue()) ? Ext.Object.isEmpty(component.getValue()) : !component.getValue();
47
+ return (!component.isValid() || isEmpty) &&
48
+ !component.isHidden() &&
49
+ component.isRequired;
50
+ },
51
+
52
+ changeComponentsInvalid: function(component) {
53
+ if (this.isComponentInvalid(component)) {
54
+ this.componentsInvalid.add(component.id);
55
+ component.setFlagColor(component.requiredFlagColor);
56
+ !component.getValue() && component.clearInvalid();
57
+ } else {
58
+ this.componentsInvalid.delete(component.id);
59
+ if (Ext.isFunction(component.setFlagColor)) {
60
+ component.setFlagColor('gray');
61
+ }
62
+ }
63
+ },
64
+
65
+ handleComponentInit: function(component) {
66
+ component.on('show', this.handleComponentValidation, this);
67
+ component.on('hide', this.deleteHiddenComponent, this);
68
+ component.on('change', this.handleComponentValidation, this);
69
+ this.changeComponentsInvalid(component);
70
+ },
71
+
72
+ deleteHiddenComponent: function(component) {
73
+ if (!component.isRequired) {
74
+ return;
75
+ }
76
+ this.componentsInvalid.delete(component.id);
77
+ this.isFormValid();
78
+ },
79
+
80
+ handleComponentValidation: function(component) {
81
+ const isComponentValid = component.isValid() && component.getValue();
82
+
83
+ if (!component.isRequired || component.valid === isComponentValid) {
84
+ return;
85
+ }
86
+
87
+ component.valid = isComponentValid;
88
+
89
+ component.setFlagColor(isComponentValid ? 'gray' : component.requiredFlagColor);
90
+
91
+ if (isComponentValid) {
92
+ this.componentsInvalid.delete(component.id);
93
+ } else {
94
+ this.componentsInvalid.add(component.id);
95
+ }
96
+
97
+ this.isFormValid();
98
+ },
99
+
100
+ isFormValid: function() {
101
+ const isValid = this.componentsInvalid.size === 0;
102
+
103
+ this.fireEvent('smartvaliditychange', !isValid);
104
+
105
+ this.changeFormStatus(isValid);
106
+
107
+ return isValid;
108
+ },
109
+
110
+ changeFormStatus: function(isFormValid) {
111
+ if (this.bindToModel) {
112
+ this.lookupViewModel().set(this.bindToModel, !isFormValid);
113
+ }
114
+
115
+ const button = this.getButton();
116
+ button && button.setDisabled(!isFormValid);
117
+ },
118
+
119
+ getButton: function() {
120
+ const referenceButton = this.query(`[reference = ${this.buttonId}]`)[0];
121
+ if (referenceButton) {
122
+ return referenceButton;
123
+ }
124
+
125
+ const buttonId = this.query(`[itemId = ${this.buttonId}]`)[0];
126
+ if (buttonId) {
127
+ return buttonId;
128
+ }
129
+
130
+ const buttonSubmit = this.query(`[itemId = submitButton]`)[0];
131
+ if (buttonSubmit) {
132
+ return buttonSubmit;
133
+ }
134
+ },
135
+ });
@@ -14,13 +14,32 @@ Ext.define('Coon.common.plugin.form.RequiredFlagPlugin', {
14
14
  init: function(field) {
15
15
  this.field = field;
16
16
  this.field.validate = Ext.Function.createSequence(this.field.validate, this.animateInvalidField, this);
17
- this.initHighlightRequiredField();
17
+ const isRequired = this.isRequired();
18
+ this.setFieldFlag(isRequired);
19
+ this.extendFieldBehavior();
18
20
  },
19
21
 
20
- initHighlightRequiredField: function() {
21
- // Если поле обязательно к заполнению, то его поведение меняется
22
- if (this.field.allowBlank === false || this.field.validateBlankByPlugin) {
23
- this.extendFieldBehavior();
22
+ isRequired: function() {
23
+ return this.field.allowBlank === false || this.field.validateBlankByPlugin || this.field.required === true;
24
+ },
25
+
26
+ setFieldFlag: function(isRequired) {
27
+ const field = this.field;
28
+ field.isRequired = isRequired;
29
+ if (isRequired) {
30
+ field.afterLabelTextTpl = `<span class='required-flag'>*</span>`;
31
+ } else {
32
+ field.afterLabelTextTpl = `<span class='required-flag'></span>`;
33
+ }
34
+ },
35
+
36
+ changeFieldFlag: function(isRequired) {
37
+ const field = this.field;
38
+ field.isRequired = isRequired;
39
+ if (isRequired) {
40
+ field.getEl().dom.querySelector('.required-flag').textContent = '*';
41
+ } else {
42
+ field.getEl().dom.querySelector('.required-flag').textContent = '';
24
43
  }
25
44
  },
26
45
 
@@ -38,14 +57,23 @@ Ext.define('Coon.common.plugin.form.RequiredFlagPlugin', {
38
57
  this.getEl().dom.querySelector('.required-flag').style.color = color;
39
58
  }.bind(field);
40
59
 
60
+ field.isRequiredPropChanged = function() {
61
+ const isRequired = this.isRequired();
62
+ if (isRequired === field.isRequired) {
63
+ return false;
64
+ }
65
+
66
+ this.changeFieldFlag(isRequired);
67
+
68
+ return true;
69
+ }.bind(this);
70
+
41
71
  field.on('afterrender', function(fld) {
42
72
  if (fld.lastFlagColor) {
43
73
  fld.setFlagColor(fld.lastFlagColor);
44
74
  }
45
75
  },
46
76
  this, {single: true});
47
-
48
- field.afterLabelTextTpl = `<span class='required-flag' style='color: ${this.requiredFlagColor};'>*</span>`;
49
77
  },
50
78
 
51
79
  /**
@@ -75,6 +75,8 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
75
75
 
76
76
  initComponent() {
77
77
  this._cachedValue = Boolean(false);
78
+ this._inited = Boolean(false);
79
+
78
80
  if (!this.getDisplayField()) {
79
81
  Coon.log.error('displayField is empty!');
80
82
  }
@@ -87,6 +89,15 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
87
89
  }
88
90
  this.callParent(arguments);
89
91
 
92
+ this._setValue = this.setValue.bind(this);
93
+ this.setValue = function(value) {
94
+ this._setValue(value);
95
+ if (!this._inited && value) {
96
+ this._inited = true;
97
+ this.loadReportData(value);
98
+ }
99
+ };
100
+
90
101
  this.on('beforequery', function() {
91
102
  return false;
92
103
  });
@@ -142,7 +153,7 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
142
153
  this.clearValue();
143
154
  if (this.bindToModel) {
144
155
  this.setViewModelValue(null);
145
- } else if (this.bind.value) {
156
+ } else if (this.bind && this.bind.value) {
146
157
  this.publishState('value', null);
147
158
  }
148
159
  },
@@ -274,8 +274,10 @@ Ext.define('Coon.report.component.reportpanel.FilterPanel', {
274
274
  if (this.enableHighlightingRequiredFields) {
275
275
  if (Ext.isFunction(this.validateGroups)) {
276
276
  const validateResult = this.validateGroups();
277
- isValid = validateResult.valid;
278
- invalidMessage = validateResult.invalidMessage;
277
+ if (validateResult) {
278
+ isValid = validateResult.valid;
279
+ invalidMessage = validateResult.invalidMessage;
280
+ }
279
281
  } else {
280
282
  const fields = this.query('[allowBlank=false][hidden=false]');
281
283
  const wrapFieldNames = function(field) {
@@ -295,7 +297,6 @@ Ext.define('Coon.report.component.reportpanel.FilterPanel', {
295
297
  }
296
298
  this.searchButtonToggle(isValid, ` ${invalidMessage}`); // <span style="font-weight: bold">Заполните поля:</span>
297
299
  }
298
-
299
300
  return isValid;
300
301
  },
301
302
 
@@ -148,11 +148,9 @@ Ext.define('Coon.report.plugin.form.ReportGroupsFieldValidationPlugin', {
148
148
  break;
149
149
  }
150
150
  }
151
- if (valid) {
152
- for (const field of group.children) {
153
- const currentField = this.fields.find((element) => element.name === field.reportParameterCd);
154
- currentField.setFlagColor(this.requiredFieldColorState2);
155
- }
151
+ for (const field of group.children) {
152
+ const currentField = this.fields.find((element) => element.name === field.reportParameterCd);
153
+ currentField.setFlagColor(valid ? this.requiredFieldColorState2 : this.requiredFieldColorState1);
156
154
  }
157
155
  group.checkResult = this.getCheckResultOr(valid, group);
158
156
  return group.invertValue ? !valid : valid;
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.5.26',
3
+ number: '2.5.28',
4
4
  });