ru.coon 2.7.2 → 2.7.3

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 2.7.3, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e9a311b868bd00ad5e46a868e7f0b829122ffa06)
2
+ * refactoring ([1385c2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1385c2bf065c0e57f6d8484cf360a1201cdbb656))
3
+ * update: CHANGELOG.md ([10bd16], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/10bd16df0b8d6d43c2a41f2651b8610c35dcd899))
4
+
1
5
  # Version 2.7.2, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3b94df2c23f76552c5c626a4bfda4a317e33abff)
2
6
  * ## Features
3
7
  * <span style='color:green'>feat: HT-8199: trim string values in request</span> ([cfc709], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cfc709daacaad1522f4dff858e04966a758bcb6a))
@@ -6,6 +10,9 @@
6
10
  * update: CHANGELOG.md ([44e78b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44e78b830a9a374db90e2fc1554188c9154ce462))
7
11
 
8
12
  # Version 2.7.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9028ecb552a8341a78e6a7e0d2f9eee91554c2d0)
13
+ * ## Fixes
14
+ * <span style='color:red'>fix</span> ([abf529], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/abf5294343d6597b0e45303be0bb85c77db8bb65))
15
+
9
16
  * upd ([901f4c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/901f4c345d1025ef8861b1b649d84590c6a6a7ec))
10
17
  * update: CHANGELOG.md ([1a5ea6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1a5ea663b234831a73ec046c23b951b71797481a))
11
18
 
@@ -168,6 +175,9 @@ This reverts commit ec83613d1dd2673b448c9fabee62287e9160f6bf. ([e6e94a], [link](
168
175
  * <span style='color:red'> HT-8036: remove override view config</span> ([f13055], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f1305573f3761f2657e995310a79a7d75887c091))
169
176
 
170
177
  * update extjs_iconpack to 1.3.19 ([adff9d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/adff9d7411fad6a04e153065c9c472b080d7e719))
178
+ * HT-7448 рефакторинг по замечаниям. ([786627], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/786627361a1236661118c9ec6d5ae7fdd89bcfe4))
179
+ * HT-7448 удаление неиспользуемых компонентов ([3e25a3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3e25a33e765403cb1eda1d16f80fce2c4b1e4cb0))
180
+ * HT-7448 переделка layout панели конфигурировая плагина ExecuteCommandButtonPluginConfigPanel ([b922d4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b922d4d984db425fea0ac2c660ecb7b4ddc97e51))
171
181
  * update: CHANGELOG.md ([f82d7f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f82d7f36520836cc6733ac936ef98bf0589b15d2))
172
182
 
173
183
  # Version 2.6.5, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5695d2c215ad6469aacd802ca46a536c81845c35)
@@ -198,6 +208,9 @@ This reverts commit ec83613d1dd2673b448c9fabee62287e9160f6bf. ([e6e94a], [link](
198
208
  * <span style='color:green'>feat: Добавлено редактирование значений по умолчанию для плагинов. Closes TR-67200.</span> ([cd9502], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cd950235c2b0180f2b73fb87dc3b05a4f5b397ae))
199
209
 
200
210
  * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/report/component/settings/plugin/ReportFormPluginPanelController.jsb52d37cb6c33e6a74d2f3d7cae1654f93b60a2e1))
211
+ * HT-7448 по умолчанию скрыта кнопка загрузки свойств команды в grid ([5328e2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5328e27d49b2092fe75b5fbe5c8a7dea231402a7))
212
+ * HT-7448 исправление найденной после мержа ошибки. ([e76d4c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e76d4c3ada4813a01c2b10167a92f4cc808940d6))
213
+ * HT-7448 исправление замечаний ([862d72], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/862d7293a4fb82c872b2d11b17cfbf47550756fc))
201
214
  * update: CHANGELOG.md ([bb6944], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bb6944320af0388b296ad97429195c6188908738))
202
215
 
203
216
  # Version 2.6.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2b7d5d8cd09bf94320d149f9cf3aa78ef27594a8)
@@ -226,6 +239,9 @@ This reverts commit ec83613d1dd2673b448c9fabee62287e9160f6bf. ([e6e94a], [link](
226
239
  * Revert "feat: Добавлено предупреждение при выборе дефолтной конфигурации плагина. Closes TR-67200."
227
240
 
228
241
  This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/312854f7d59d711c9921f394c6849d398e529e10))
242
+ * HT-7448 Рефакторинг ExecuteCommandPluginConfigPanelFormEditor ([74a393], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/74a393cb2781622d4eafc981e153bd4a5edf7cdf))
243
+ * HT-7448 Рефакторинг ExecuteCommandPluginConfigPanelFormEditor ([18090f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/18090f5c72e1595cb54e6ae7cf9e9645b9fec0e6))
244
+ * HT-7448 Исправлена ошибка, возникающая в AceEditor в окне редактирования свойств команды. ([5b3f57], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5b3f57d189f98ccf55f169c3ad29db778b27570c))
229
245
  * HT-7882 поддержать возможность передачи свойств редактора х-ки в поле mask в формате json ([ff9d88], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ff9d88c6e8f12d59ea7fd4f8be344696670d13af))
230
246
  * update: CHANGELOG.md ([fed09b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fed09bab2391b2ef0adde36107c4c8e9f8e9ad32))
231
247
 
@@ -242,6 +258,7 @@ This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](
242
258
  * ## Features
243
259
  * <span style='color:green'>feat: HT-7281 GridEditorPlugin editor dependField</span> ([975be6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/975be69118652f7995b2bfd40e5a174deaa47c68))
244
260
 
261
+ * HT-7448 Рефакторинг внешнего вида ExecuteCommandPluginConfigPanelFormEditor. Компонент для упрощения мапинга. ([3c3380], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3c33806c30b08c23a2b161543c3e11be94477902))
245
262
  * update: CHANGELOG.md ([d8027e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d8027e3fe08b900d1cb6da3bfe688684b5764008))
246
263
 
247
264
  # Version 2.5.66, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4e253ae2e8836166212d3886d091d342673deaee)
@@ -269,7 +286,10 @@ This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](
269
286
 
270
287
  * remove unnecessary filterItemsOnRow property ([772f61], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/772f6190df8b958bd6ff97e5731a59971c9a11fc))
271
288
  * HT-7885 ([601a41], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/601a4199efef15290c161766431908ab8993862b))
289
+ * HT-7448 Исправление вызова completeHandler и errorHandler в работе плагина репорта ExecuteCommandButtonPlugin ([ea4774], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ea477445f344d94c59b1116738b464ba49e79c57))
272
290
  * Update getDataFromForm function ([d79274], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d79274267b970ea0b4a31f1724d3dfc54d82d9d5))
291
+ * HT-7448 Проверка результатов выполнения команды перед переносом данных во viewModel при работе ExecuteCommandPlugin ([c74d65], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c74d656fc1fb764b5dc24d5e96f1cf9b9f8ee27c))
292
+ * HT-7448 исправление работы completeHandler и responseHandler в ExecuteCommandButtonPlugin ([23ee69], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/23ee69a6d1bb084cff6402e0cc4cc36c2a6c3c51))
273
293
  * HT-7882 поддержать возможность передачи свойств редактора х-ки в поле mask в формате json ([507490], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5074900afb170d9f11aa10de6549e05cef12f7cb))
274
294
  * Combine query in one row ([6fbb49], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6fbb496601a46bef0506b56d34d179d3d10148ca))
275
295
  * update: CHANGELOG.md ([2ec18c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2ec18ccddcb1d571ef6a1d00b9cde439355c8304))
@@ -419,6 +439,7 @@ fix ReportPanel.loadData - abort previous request</span> ([03cfbd], [link](http:
419
439
  * add decimal-light - arbitrary-precision Decimal type for JavaScript
420
440
  fix Coon.format.MoneyFormat, zero always format as positive value ([09a4ad], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/09a4ad9879f025371db56475252ec93eeb52b265))
421
441
  * перенос чекбокса и работа с value ([c56525], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c5652553cca0934ec1549f6e0762f481161b2998))
442
+ * HT-7448 Исправления по замечаниям код ревью ([8fbd95], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8fbd95f08c83c36817363401641fe4ae333ec02f))
422
443
  * исправление ошибок ([44fc10], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44fc1038ab848989c56bf51ad56933f5fe2f2535))
423
444
  * исправление ошибок ([fcc83e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fcc83e4aa4d85b241723c2fd1d317bafe5b44689))
424
445
  * доработка ([dbc2bf], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dbc2bf69be0d31423c93275b01e320703823dbb2))
@@ -432,6 +453,7 @@ fix Coon.format.MoneyFormat, zero always format as positive value ([09a4ad], [li
432
453
  * <span style='color:red'>fix promisifyCmd
433
454
  fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler</span> ([f8c65b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f8c65b552adfb698809815fc5f2d80f3f5fdb5ee))
434
455
 
456
+ * HT-7447 Рефакторинг CommandComboBox (компонента выбора команад). Рефакторинг настроек плагина ExecuteCommandPlugin ([636f06], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/636f06e2885d7830e2e48c8f95acf902407a8820))
435
457
  * update: CHANGELOG.md ([4d5a2a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4d5a2ac3120c4aba6a672256fc7cc977014f3591))
436
458
 
437
459
  # Version 2.5.46, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a60918e34030d42d694153e8a86fa2c13c97e3a0)
@@ -451,6 +473,7 @@ fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler
451
473
 
452
474
  * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/util.js5a11846bc2f75dd40b3c0f2239047d95f1a9371c))
453
475
  * BFL-9850 Ошибка при сохранении пункта меню ([270e31], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/270e3170b5a70b306591730dce53023dcebf6f34))
476
+ * HT-7448 доработка панели конфигурирования плагина ExecuteCommandButtonPluginConfigPanel ([69c652], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/69c652c2e69719a7ef5964a274c3be30c2980b85))
454
477
  * update: CHANGELOG.md ([8b0186], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8b0186d787ec77ad2a4dfc211e85c8ffadee6559))
455
478
 
456
479
  # Version 2.5.44, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0c4d4a663ae3451dec321c0d68bf1d5c8d70ff58)
@@ -461,6 +484,7 @@ fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler
461
484
  * <span style='color:red'> HT-7469: commit store state on doInit action. This method remove all modified records from store state</span> ([34c025], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/34c02583013b66314a74c2fbc9512f04f218d85e))
462
485
 
463
486
  * hotfix Coon.Function.executeComponentDoInit ([c9e04c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c9e04c22329f1d7822b91a47eca899c6f6e7f95e))
487
+ * HT-7448 Исправление работы кнопки "копировать" ([9ad7a8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9ad7a853bc8753f768e401f068f2a72c9cd205ae))
464
488
  * update: CHANGELOG.md ([f47bce], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f47bce91314446c8f88961ba976fc132e11318d0))
465
489
 
466
490
  # Version 2.5.43, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bc0bf6f30c6fa63c8af9ccfaa0ee75431bda6029)
@@ -472,6 +496,7 @@ fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler
472
496
  * BFL-8607 Доработка редактора характеристики типа "Дата" ([20c221], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/20c2210c3c15817168bf0a3465a219fe49f7d2fe))
473
497
  * BFL-8607 Доработка редактора характеристики типа "Дата" ([0c7529], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0c752984e1e82cdf68d9aa25413375319adfe30e))
474
498
  * Merge with develop ([2f0b72], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2f0b7296a4764645e248dfe2f2e4d5399f695dc4))
499
+ * HT-7448 рефакторинг грида конфигурирования параметров команды ([9f9005], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9f900557a6ce4364c47ae9c7c0881e00afedc071))
475
500
  * update: CHANGELOG.md ([892608], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/892608eb6ddd2ef85d205ba9e1e857aa27672320))
476
501
 
477
502
  # Version 2.5.42, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a6256f14a891eda0974a2af1ee2c108c8904feab)
@@ -488,12 +513,17 @@ fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler
488
513
  # Version 2.5.41, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/612fb7573419ad9857649f7211c8d7a56e52cdb4)
489
514
  * ## Features
490
515
  * <span style='color:green'>feat: Перенесен ShowReportEditorCreator из ISWE. Closes BFL-9446.</span> ([1d7ee3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1d7ee326527f9d14d332bb115bd68a15a7e9c22e))
516
+ * <span style='color:green'>feat: HT-7448 пример рефакторинга</span> ([44f741], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44f7414c76e59454b0635c9b7f4982003adad8d0))
491
517
  * <span style='color:green'>feat: BFL-9521: init dependent form params anytime</span> ([2e5aa1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2e5aa16eeace7205cff9e01295f43d0f4ce956c6))
492
518
 
493
519
  * ## Fixes
520
+ * <span style='color:red'>fix ExecuteCommandButtonPlugin</span> ([a5308e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a5308eb7b674a12e0b4d8665d2c9a939c7d33b80))
494
521
  * <span style='color:red'> BFL-9515 исправления по проверке безопасности фронтенда в части взаимодействия с iswe в iframe</span> ([f34b8f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f34b8fdf31285fd53f932dfe277e961ffa275fd0))
495
522
  * <span style='color:red'> postMessage origin fix. Closes BFL-9515.</span> ([21ab56], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/21ab56a1998efe4b6cd4e4d35337c8fbc5b47729))
496
523
 
524
+ * HT-7448 перенос complete handler и error handler в табпанель ([833aab], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/833aab66900669e885cea97fd7fd614d83d10303))
525
+ * ([В пике], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/В пикер списка команд добавлен тултип в виде описания из класса команды.a90290c3aa288a6201af96a155874f8b4c51459c))
526
+ * ([В getA], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/В getAllCommandsList добавлено описание из класса команды.44653fabe5289074830acffedfd6494c463a9193))
497
527
  * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/uielement/component/settings/UiCustomPanelEditorController.js9987a0e79de3a1fa5fa93216f0ffd4bdb50c59fc))
498
528
  * update: CHANGELOG.md ([958f76], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/958f76b4fca9844ca6bae88260580ff2340843e5))
499
529
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.2",
7
+ "version": "2.7.3",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -192,4 +192,8 @@ Ext.define('Coon.command.ASyncBaseCommand', {
192
192
  getLastParams: function() {
193
193
  return this.lastParams;
194
194
  },
195
+
196
+ commandProperties: function() {
197
+ return [];
198
+ },
195
199
  });
@@ -14,4 +14,24 @@ Ext.define('Coon.common.field.combo.CommandComboBox', {
14
14
  const isValid = !!this.getStore().findRecord('description', value);
15
15
  return isValid || `команда ${value} не найдена!`;
16
16
  },
17
+ listConfig: {
18
+ itemTpl: [
19
+ '<div data-qtip="{ruDescription}"><b>{xtype}</b> : <i style="opacity:.8;font-size: 1rem;">{description}</i> </div>'
20
+ ],
21
+ },
22
+ /**
23
+ * Получение свойств выбранной команды
24
+ * @returns {*|*[]}
25
+ */
26
+ getProperties: function() {
27
+ const commandName = this.getValue();
28
+ let properties = [];
29
+ if (commandName) {
30
+ const fullSource = Ext.ClassManager.aliasToName['command.' + commandName];
31
+ properties = fullSource && Ext.ClassManager.classes[fullSource].prototype.commandProperties &&
32
+ Ext.ClassManager.classes[fullSource].prototype.commandProperties();
33
+ }
34
+
35
+ return properties || [];
36
+ },
17
37
  });
@@ -48,6 +48,20 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
48
48
  handler: 'deleteHandler',
49
49
  reference: 'deleteButton',
50
50
  disabled: true,
51
+ },
52
+ {
53
+ text: 'Загрузить свойства',
54
+ ui: 'blue-text-button-border',
55
+ handler: 'loadPropertiesHandler',
56
+ reference: 'loadPropertiesButton',
57
+ hidden: true,
58
+ },
59
+ {
60
+ text: '{}',
61
+ tooltip: 'Открыть в редакторе',
62
+ ui: 'blue-text-button-border',
63
+ handler: 'openInEditor',
64
+ reference: 'editorButton',
51
65
  }
52
66
  ],
53
67
  }],
@@ -83,6 +97,11 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
83
97
  flex: 1,
84
98
  editor: 'textfield',
85
99
  },
100
+ {
101
+ text: 'Описание',
102
+ dataIndex: 'description',
103
+ flex: 2,
104
+ },
86
105
  {
87
106
  xtype: 'actioncolumn',
88
107
  width: 50,
@@ -120,4 +139,7 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
120
139
  },
121
140
  }
122
141
  ],
142
+ listeners: {
143
+ boxready: 'onGridReady',
144
+ },
123
145
  });
@@ -13,6 +13,11 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
13
13
  view.updateProperties = this.updateProperties.bind(this);
14
14
  },
15
15
 
16
+ onGridReady: function() {
17
+ const loadPropertiesSource = this.getView().loadPropertiesSource;
18
+ this.lookup('loadPropertiesButton').setHidden(!loadPropertiesSource);
19
+ },
20
+
16
21
  onSelectionChange: function(view, selection) {
17
22
  const deleteButton = this.lookup('deleteButton');
18
23
  deleteButton.setDisabled(Ext.isEmpty(selection));
@@ -66,11 +71,15 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
66
71
  * @param {Object[]} data
67
72
  */
68
73
  setData: function(data) {
74
+ if (this.getView().loadParametersSource) {
75
+ this.lastSource = this.getView().loadParametersSource.field.getValue();
76
+ }
69
77
  const store = this.getView().getStore();
70
78
  if (Ext.isFunction(store.loadData)) {
71
79
  store.reload();
72
80
  if (Ext.isArray(data)) {
73
81
  store.loadData(data);
82
+ this.addDescriptions();
74
83
  }
75
84
  }
76
85
  },
@@ -145,6 +154,56 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
145
154
  this.updateProperties();
146
155
  },
147
156
 
157
+ loadPropertiesHandler: function() {
158
+ const grid = this.getView();
159
+ this.lastSource = grid.loadPropertiesSource && grid.loadPropertiesSource.field.getValue();
160
+ if (!this.lastSource) {
161
+ Coon.log.warn('Не выбрана команда!');
162
+ }
163
+ const properties = Ext.ClassManager.getByAlias('command.' + this.lastSource).prototype.commandProperties();
164
+
165
+ const dataForLoad = properties.map(function(property, i) {
166
+ const newProperty = {
167
+ sequenceNumber: i,
168
+ key: property.name,
169
+ description: property.description,
170
+ };
171
+ if (property.defaultValue) {
172
+ newProperty.value = property.defaultValue;
173
+ }
174
+ return newProperty;
175
+ }, this).filter((property) => {
176
+ return !grid.getStore().findRecord('key', property['key']);
177
+ });
178
+
179
+ grid.getStore().loadData(dataForLoad, true);
180
+ },
181
+
182
+ /**
183
+ * Добавление описаний к свойствам команды
184
+ */
185
+ addDescriptions: function() {
186
+ const grid = this.getView();
187
+ const commandCombo = grid.loadPropertiesSource && grid.loadPropertiesSource.field;
188
+ if (!commandCombo) {
189
+ return;
190
+ }
191
+ const command = commandCombo.getValue();
192
+ if (!command) {
193
+ return;
194
+ }
195
+
196
+ const descriptions = Ext.ClassManager.getByAlias('command.' + command).prototype.commandProperties().reduce((acc, property) => {
197
+ acc[property['name']] = property['description'];
198
+ return acc;
199
+ }, {});
200
+
201
+ Object.entries(descriptions).forEach(function([key, value]) {
202
+ const rec = grid.getStore().findRecord('key', key);
203
+ rec && rec.set('description', value, {dirty: false});
204
+ });
205
+ },
206
+
148
207
  /**
149
208
  * Открытие свойств параметра в редакторе кода
150
209
  */
@@ -157,7 +216,7 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
157
216
 
158
217
  /**
159
218
  * Загрузка изменений, внесенных в редакторе кода, в store.
160
- * @param {Object} changes
219
+ * @param {Object} data
161
220
  */
162
221
  loadChangesFromEditor: function(data) {
163
222
  const store = this.getView().getStore();
@@ -6,10 +6,7 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
6
6
  'Coon.report.model.ReportNavigationContextBeanFields',
7
7
  'Coon.report.model.ComboValueWrapperFields',
8
8
  'Coon.report.model.ComboValueWrapper',
9
- 'Coon.report.model.ReportParameterMaintenanceBeanFields',
10
- 'Coon.report.model.ReportFieldMaintenanceBeanFields',
11
9
  'Coon.report.model.ReportNavigationContextBean',
12
- 'Coon.report.store.ReportNavigationContextStore',
13
10
  'Coon.report.plugin.grid.GridStoreDependency',
14
11
  'Coon.report.store.RefStore'
15
12
  ],
@@ -79,7 +76,9 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
79
76
  }];
80
77
  }
81
78
 
82
- this.store = Ext.create('Coon.report.store.ReportNavigationContextStore');
79
+ this.store = new Ext.data.Store({
80
+ fields: Coon.report.model.ReportNavigationContextBeanFields,
81
+ });
83
82
 
84
83
  const numEditor = Ext.create('Ext.form.field.Number', {
85
84
  allowDecimals: false,
@@ -99,8 +98,8 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
99
98
 
100
99
  this.valueEditor = Ext.create('Coon.common.field.combo.BaseComboBox', {
101
100
  loadOnRender: false,
102
- displayField: Coon.report.model.ComboValueWrapperFields.$description,
103
- valueField: Coon.report.model.ComboValueWrapperFields.$value,
101
+ displayField: 'description',
102
+ valueField: 'value',
104
103
  store: Ext.create('Coon.report.store.RefStore'),
105
104
  allowBlank: false,
106
105
  });
@@ -109,14 +108,13 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
109
108
  allowBlank: false,
110
109
  });
111
110
 
112
- const ns = Coon.report.model.ReportNavigationContextBeanFields;
113
111
  this.columns = {
114
112
  items: [
115
- {required: true, text: '№ п/п', dataIndex: ns.$sortSequence, xtype: 'BigNumColumn', editor: numEditor, flex: .3},
113
+ {required: true, text: '№ п/п', dataIndex: 'sortSequence', xtype: 'BigNumColumn', editor: numEditor, flex: .3},
116
114
  {
117
115
  required: true,
118
116
  text: 'Параметр',
119
- dataIndex: ns.$reportParameter,
117
+ dataIndex: 'reportParameter',
120
118
  xtype: 'hintColumn',
121
119
  editor: paramEditor,
122
120
  },
@@ -124,7 +122,7 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
124
122
  required: true,
125
123
  text: 'Тип',
126
124
  minWidth: 150,
127
- dataIndex: ns.$reportNavigationOptionContextSource,
125
+ dataIndex: 'reportNavigationOptionContextSource',
128
126
  xtype: 'hintColumn',
129
127
  editor: this.typeEditor,
130
128
  renderer: Coon.format.comboRenderer(this.typeEditor),
@@ -132,44 +130,49 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
132
130
  },
133
131
  {
134
132
  text: 'Значение',
135
- tooltip: 'название поля таблицы отчета',
136
- dataIndex: ns.$reportNavigationOptionContextSourceValue,
133
+ tooltip: 'название поля таблицы отчета/название параметра отчета',
134
+ dataIndex: 'reportNavigationOptionContextSourceValue',
137
135
  xtype: 'hintColumn',
138
136
  width: 130,
139
137
  editor: this.valueEditor,
140
138
  renderer: Ext.bind(function(value, meta, record) {
141
- const type = record.get(ns.$reportNavigationOptionContextSource);
139
+ const type = record.get('reportNavigationOptionContextSource');
142
140
  let visibleValue;
143
- const fieldsNS = Coon.report.model.ComboValueWrapperFields;
144
- let pos;
141
+
142
+ let found;
145
143
  if (type === 'FLD') {
146
- pos = this.fieldsStore.findExact(fieldsNS.$value, value);
147
- if (pos !== -1) {
148
- visibleValue = this.fieldsStore.getAt(pos).get(fieldsNS.$description);
149
- }
144
+ found = this.fieldsStore.findRecord('value', value);
145
+ visibleValue = found && found.get('description');
150
146
  } else if (type === 'PRM') {
151
- pos = this.paramsStore.findExact(fieldsNS.$value, value);
152
- if (pos !== -1) {
153
- visibleValue = this.paramsStore.getAt(pos).get(fieldsNS.$description);
154
- }
147
+ found = this.paramsStore.findRecord('value', value);
148
+ visibleValue = found && found.get('description');
155
149
  } else if (type === 'SELR' || type === 'ALLR' || type === 'RCRD' || type === 'MDFD' || type === 'CHCK') {
156
- for (let i = 0; i < this.storeForSELR.length; i++) {
157
- if (this.storeForSELR[i].value === value) {
158
- visibleValue = this.storeForSELR[i].description;
159
- }
160
- }
150
+ found = this.storeForSELR.find((obj) => obj.value === value);
151
+ visibleValue = found && found.description;
161
152
  }
162
153
  return Coon.format.withHint(visibleValue);
163
154
  }, this),
164
155
  },
165
156
  {
166
157
  text: 'Значение по умолчанию',
167
- dataIndex: ns.$defaultValue,
158
+ dataIndex: 'defaultValue',
168
159
  xtype: 'hintColumn',
169
160
  editor: valueDefaultEditor,
170
161
  flex: .7,
171
162
  },
172
- {text: 'Обязательно', dataIndex: ns.$editable, xtype: 'checkcolumn', editable: true, flex: .35}
163
+ {
164
+ text: 'Обязательно',
165
+ dataIndex: 'editable',
166
+ xtype: 'checkcolumn',
167
+ editable: true,
168
+ flex: .35,
169
+ },
170
+ {
171
+ text: 'Описание',
172
+ tooltip: 'Описание параметра отчета',
173
+ dataIndex: 'description',
174
+ xtype: 'hintColumn',
175
+ }
173
176
  ],
174
177
  defaults: {
175
178
  sortable: true,
@@ -196,12 +199,12 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
196
199
  });
197
200
  } else {
198
201
  this.on('beforeedit', function(plugin, context) {
199
- if (context.field === ns.$sortSequence) {
202
+ if (context.field === 'sortSequence') {
200
203
  return context.record.get('isNew');
201
204
  }
202
205
 
203
- if (context.field === ns.$reportNavigationOptionContextSourceValue) {
204
- const type = context.record.get(ns.$reportNavigationOptionContextSource);
206
+ if (context.field === 'reportNavigationOptionContextSourceValue') {
207
+ const type = context.record.get('reportNavigationOptionContextSource');
205
208
  if (type === 'DFLT') {
206
209
  return false;
207
210
  } else {
@@ -212,9 +215,9 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
212
215
  }, this);
213
216
 
214
217
  this.on('edit', function(plugin, context) {
215
- if (context.field === ns.$reportNavigationOptionContextSource) {
216
- context.record.set(ns.$reportNavigationOptionContextSourceValue, null);
217
- context.record.set(ns.$defaultValue, null);
218
+ if (context.field === 'reportNavigationOptionContextSource') {
219
+ context.record.set('reportNavigationOptionContextSourceValue', null);
220
+ context.record.set('defaultValue', null);
218
221
  }
219
222
  return true;
220
223
  }, this);
@@ -223,15 +226,13 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
223
226
 
224
227
  this.fieldsStore = Ext.create('Coon.report.store.RefStore');
225
228
  this.paramsStore = Ext.create('Coon.report.store.ReportParameterStore');
226
- this.typeEditor.getStore().on('load', function() {
227
- if (!this.additionalContext || !Ext.isArray(this.additionalContext)) {
228
- return;
229
- }
230
- for (let i = 0; i < this.additionalContext.length; i++) {
231
- const record = this.additionalContext[i];
232
- if (this.typeEditor.getStore().find('value', record.get('value')) === -1) {
233
- this.typeEditor.getStore().add(record);
234
- }
229
+ this.typeEditor.getStore().on('load', function(store, records) {
230
+ if (Ext.isArray(this.additionalContext) && records.length) {
231
+ this.additionalContext.forEach((record) => {
232
+ if (record && record.isModel && record.get('value') && store.find('VALUE', record.get('value')) === -1) {
233
+ store.add(record);
234
+ }
235
+ });
235
236
  }
236
237
  }, this);
237
238
  },
@@ -302,13 +303,12 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
302
303
  },
303
304
 
304
305
  getData: function() {
305
- const records = this.getStore().getRange();
306
306
  const recordsToSave = [];
307
- for (let i = 0; i < records.length; i++) {
308
- if (!records[i].get('isDeleted')) {
309
- recordsToSave.push(records[i]);
307
+ this.store.each((record) => {
308
+ if (!record.get('isDeleted')) {
309
+ recordsToSave.push(record);
310
310
  }
311
- }
311
+ });
312
312
  return Coon.Function.serializeRecords(recordsToSave);
313
313
  },
314
314
 
@@ -345,32 +345,18 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
345
345
  },
346
346
 
347
347
  changeFieldsList: function(fields) {
348
- const ns = Coon.report.model.ComboValueWrapperFields;
349
- const cvList = [];
350
-
351
- const fieldNs = Coon.report.model.ReportFieldMaintenanceBeanFields;
352
- for (let i = 0; i < fields.length; i++) {
353
- const field = fields[i];
354
- const obj = {};
355
- obj[ns.$value] = field[fieldNs.$reportField];
356
- obj[ns.$description] = field[fieldNs.$description];
357
- cvList.push(obj);
358
- }
348
+ const cvList = fields.map((field) => ({
349
+ value: field['reportFieldCd'],
350
+ description: field['description'],
351
+ }));
359
352
  this.fieldsStore.loadData(cvList);
360
353
  },
361
354
 
362
355
  changeParametersList: function(parameters) {
363
- const ns = Coon.report.model.ComboValueWrapperFields;
364
- const cvList = [];
365
-
366
- const paramNs = Coon.report.model.ReportParameterMaintenanceBeanFields;
367
- for (let i = 0; i < parameters.length; i++) {
368
- const param = parameters[i];
369
- const obj = {};
370
- obj[ns.$value] = param[paramNs.$reportParameter];
371
- obj[ns.$description] = param[paramNs.$description];
372
- cvList.push(obj);
373
- }
356
+ const cvList = parameters.map((param) => ({
357
+ value: param['reportParameterCd'],
358
+ description: param['description'],
359
+ }));
374
360
  this.paramsStore.loadData(cvList);
375
361
  },
376
362
 
@@ -401,12 +387,10 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
401
387
  return;
402
388
  }
403
389
 
404
- const record = Ext.create('Coon.report.model.ReportNavigationContextBean', {
390
+ this.getStore().insert(0, {
405
391
  isNew: true,
406
392
  reportNavigationOptionContextSource: 'DFLT',
407
393
  });
408
- // record.markDirty();
409
- this.getStore().insert(0, record);
410
394
 
411
395
  const editor = this.findPlugin('cellediting');
412
396
  editor.startEditByPosition({row: 0, column: 0});
@@ -463,6 +447,7 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
463
447
  default:
464
448
  break;
465
449
  }
450
+
466
451
  this.loadData(parameters);
467
452
  }
468
453
  }
@@ -472,37 +457,37 @@ Ext.define('Coon.report.component.settings.common.ReportFormContextParametersGri
472
457
  parameters = parameters || [];
473
458
  nameField = nameField || 'name';
474
459
  isRequiredField = isRequiredField || 'required';
475
- const dataForLoad = [];
460
+
461
+ let dataForLoad = [];
476
462
  if (this.loadParametersSource.field.getValue() !== this.lastSource) {
477
463
  this.lastSource = this.loadParametersSource.field.getValue();
478
- for (let i = 0; i < parameters.length; i++) {
479
- dataForLoad.push(this.getDataForRecord(i, parameters[i][nameField], parameters[i][isRequiredField]));
480
- }
464
+ dataForLoad = parameters.map(function(parameter, i) {
465
+ return this.getDataForRecord(i, parameter[nameField], parameter[isRequiredField], parameter['description']);
466
+ }, this);
481
467
  this.load(dataForLoad);
482
468
  } else {
483
- for (let i = 0; i < parameters.length; i++) {
484
- if (this.getStore().findExact('reportParameter', parameters[i][nameField]) === -1) {
485
- const record = Ext.create('Coon.report.model.ReportNavigationContextBean',
486
- this.getDataForRecord(i, parameters[i][nameField], parameters[i][isRequiredField]));
487
- dataForLoad.push(record);
469
+ parameters.forEach(function(parameter, i) {
470
+ if (!this.getStore().findRecord('reportParameter', parameter[nameField])) {
471
+ dataForLoad.push(this.getDataForRecord(i, parameter[nameField], parameter[isRequiredField], parameter['description']));
488
472
  }
489
- }
473
+ }, this);
490
474
  if (dataForLoad.length > 0) {
491
- this.getStore().insert(this.getStore().getCount(), dataForLoad);
475
+ this.getStore().add(dataForLoad);
492
476
  }
493
477
  }
494
478
  },
495
479
 
496
- getDataForRecord: function(i, value, editable) {
480
+ getDataForRecord: function(i, value, editable, description) {
497
481
  return {
498
482
  sortSequence: i,
499
483
  reportParameter: value,
500
484
  isNew: true,
501
485
  editable: editable || false,
486
+ description: description,
502
487
  };
503
488
  },
504
489
  deleteHandler: function() {
505
- const record = this.getSelectionModel().getSelection()[0];
490
+ const record = this.getSelection()[0];
506
491
  if (record) {
507
492
  this.deleteAction(record);
508
493
  }