ru.coon 2.7.14 → 2.7.16

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.
Files changed (26) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/package.json +1 -1
  3. package/src/common/component/editor/CharacteristicGridCopyPlugin.js +1 -1
  4. package/src/common/field/checkbox/ToggleBox.js +15 -0
  5. package/src/common/field/checkbox/ToggleBox.scss +9 -0
  6. package/src/common/field/combo/CommandComboBox.js +1 -1
  7. package/src/nav/AppNavigationMenuController.js +18 -7
  8. package/src/nav/editor/NavigateElementEditorView.js +5 -4
  9. package/src/nav/editor/menu/NavMenuTreeController.js +38 -28
  10. package/src/nav/editor/menu/form/NavMenuFormView.js +12 -2
  11. package/src/nav/editor/menu/form/NavMenuFormViewController.js +21 -6
  12. package/src/nav/editor/menu/form/NavMenuFormViewModel.js +2 -0
  13. package/src/nav/editor/workspace/NavWorkspaceListController.js +20 -26
  14. package/src/nav/editor/workspace/form/NavWorkspaceFormController.js +1 -0
  15. package/src/nav/editor/workspace/form/NavWorkspaceFormView.js +2 -0
  16. package/src/report/component/ReportPanel.js +4 -1
  17. package/src/report/component/reportpanel/ReportGrid.js +22 -1
  18. package/src/report/component/settings/property/ReportPropertiesPanelController.js +6 -2
  19. package/src/report/plugin/grid/UpdateGridPlugin.js +8 -4
  20. package/src/uielement/plugin/configPanel/executeCommand/ExecuteCommandPluginConfigPanelFormEditor.js +31 -30
  21. package/src/version.js +1 -1
  22. package/src/common/field/checkbox/RoundCheckbox.js +0 -5
  23. package/src/common/field/checkbox/RoundCheckbox.scss +0 -48
  24. package/src/nav/MenuLoader.js +0 -23
  25. package/src/nav/editor/NavigateElementEditorController.js +0 -34
  26. package/src/report/plugin/grid/ExportReportDataToFilePlugin.md +0 -7
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # Version 2.7.16, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7470e85348491fcb984af32ac03d0f18ef6c7198)
2
+ * ## Fixes
3
+ * <span style='color:red'> Не удаляются св-ва репорта HT-8501</span> ([6e2784], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6e2784c51f2fd41f1d403882cb57c2da3e71ee06))
4
+
5
+ * upd ([7ff561], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7ff561c6399b72eb779e615700e211ded1902154))
6
+ * update: CHANGELOG.md ([e4d031], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e4d031a2fe4e3d25048e2296c8c46e04adec2802))
7
+
8
+ # Version 2.7.15, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1e27a6d56071c26951813a36d45daf805a6f750d)
9
+ * ## Features
10
+ * <span style='color:green'>feat: Вывод сообщения об ошибках при инициализации плагинов отчета. Closes HT-8531.</span> ([a35d09], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a35d09c39f20263dd032f6accc9d175a8241e111))
11
+ * <span style='color:green'>feat: Добавлено логирование ошибки, при возврате отчетом более одной строки. Related to HT-8223.</span> ([34491c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/34491c4ee3f5dc6d26f5c04652796d563c9fb6c4))
12
+
13
+ * ## Fixes
14
+ * <span style='color:red'> HT-8257: publish state only on tab change and prepare data to save</span> ([81e5a6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/81e5a64bf6c1f106f477877a94d61d5da55faf36))
15
+
16
+ * HT-7448 feat: В ExecuteCommandPluginConfigPanelFormEditor первая вкладка - Параметры. В списке выбора команд выбранная команда отображается без пути. ([f375d4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f375d4fed40c394cde8b4a92f8ec2e1ea8419093))
17
+ * update: CHANGELOG.md ([13e1ac], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/13e1ac4f0c51b95aaecfb0a6bd8b32f4370db067))
18
+
1
19
  # Version 2.7.14, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8e9321ed8ae4de458b50e7821b2ff5169eabb199)
2
20
  * ## Fixes
3
21
  * <span style='color:red'> BFL-3938: check plugin attribute is no=t empty and check row objects</span> ([94ce92], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/94ce92a1ee3d9a7313462b061a1b7ec8868c3275))
@@ -50,6 +68,9 @@
50
68
  * update: CHANGELOG.md ([52f34d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/52f34db2ead3febb4225a85f3c2a1522d536a9e7))
51
69
 
52
70
  # Version 2.7.7, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f0c25945de971960d59df2b576e159e08fb535ef)
71
+ * ## Features
72
+ * <span style='color:green'>feat: TR-67883: refactor & MR menu edtor</span> ([dc91a8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dc91a8795fe541cccacc5b51a0738ae330d697df))
73
+
53
74
  * HT-7850 fix: В FilterConditionToolbar убрано отображение чипов для скрытых полей фильтра. ([8b16f9], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8b16f9de62121e0d9d562dcd6e032655d100a417))
54
75
  * update: CHANGELOG.md ([e0b4b0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e0b4b04a9ddfe329cdcbb440f61d33219ce1cf73))
55
76
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.14",
7
+ "version": "2.7.16",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -22,7 +22,7 @@ Ext.define('Coon.common.component.editor.CharacteristicGridCopyPlugin', {
22
22
  }
23
23
 
24
24
  if (!this.copyConfig || !this.slaveConfig || !Object.keys(this.slaveConfig).length) {
25
- Coon.log.error(`[CharacteristicGridCopyPlugin error], invalid format of copyConfig`);
25
+ // Coon.log.error(`[CharacteristicGridCopyPlugin error], invalid format of copyConfig`);
26
26
  return;
27
27
  }
28
28
 
@@ -0,0 +1,15 @@
1
+ Ext.define('Coon.common.field.checkbox.ToggleBox', {
2
+ extend: 'Ext.form.field.Checkbox', // Ext.form.field.Base
3
+ xtype: ['togglebox', 'ToggleBox'],
4
+
5
+ // // inputEl should always retain the same size, never stretch
6
+ // stretchInputElFixed: false,
7
+
8
+ baseCls: 'ext-togglebox',
9
+
10
+ fieldIconCls: 'offIcon',
11
+
12
+ tpl: `
13
+ <span class={fieldIconCls} />
14
+ `,
15
+ });
@@ -0,0 +1,9 @@
1
+ .ext-togglebox {
2
+ .onIcon {
3
+ background-image: url("data:image/svg+xml,%3Csvg width='25' height='16' viewBox='0 0 25 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16H17C21.4183 16 25 12.4183 25 8C25 3.58172 21.4183 0 17 0H8ZM17 13C19.7614 13 22 10.7614 22 8C22 5.23858 19.7614 3 17 3C14.2386 3 12 5.23858 12 8C12 10.7614 14.2386 13 17 13Z' fill='black'/%3E%3C/svg%3E");
4
+ }
5
+ .offIcon {
6
+ background-image: url("data:image/svg+xml,%3Csvg width='25' height='16' viewBox='0 0 25 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 8C0 3.58172 3.58172 0 8 0H17C21.4183 0 25 3.58172 25 8C25 12.4183 21.4183 16 17 16H8C3.58172 16 0 12.4183 0 8ZM13 8C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 8C3 5.23858 5.23858 3 8 3C10.7614 3 13 5.23858 13 8Z' fill='black'/%3E%3C/svg%3E");
7
+ }
8
+ }
9
+
@@ -11,7 +11,7 @@ Ext.define('Coon.common.field.combo.CommandComboBox', {
11
11
  getData: Coon.util.getAllCommandsList,
12
12
  errorMsgCls: 'combo-field-error',
13
13
  validator(value) {
14
- const isValid = !!this.getStore().findRecord('description', value);
14
+ const isValid = this.getStore().findBy((record) => record.get('description') === value || record.get('xtype') === value) !== -1;
15
15
  return isValid || `команда ${value} не найдена!`;
16
16
  },
17
17
  listConfig: {
@@ -9,6 +9,7 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
9
9
  menuReady: false,
10
10
  selectThenMenuReady: undefined,
11
11
  addWorkspaceToUrl: false,
12
+ menuUpdate: false,
12
13
  init: function(view) {
13
14
  view.updateSelection = this.updateSelection.bind(this);
14
15
  view.getMenuReady = this.getMenuReady.bind(this);
@@ -17,7 +18,6 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
17
18
  view.changeWorkspace = this.changeWorkspace.bind(this);
18
19
  this.view.on('selectionchange', this.onSelectMenuItem, this);
19
20
  this.loadMenu();
20
- view.getFirstAvailable = this.getFirstAvailable.bind(this);
21
21
  Ext.on('route:initial', (route) => {
22
22
  this.selectThenMenuReady = route.id;
23
23
  });
@@ -53,7 +53,9 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
53
53
 
54
54
  updateMenu: function() {
55
55
  Coon.nav.MenuEntity.menuItems = null;
56
- this.loadMenu();
56
+ this.menuUpdate = true;
57
+ const menuItem = this.getViewModel().get('menuItem');
58
+ this.loadMenu(menuItem ? menuItem.get('UI_ELEMENT_CD') : null);
57
59
  },
58
60
 
59
61
  getMenuReady: function() {
@@ -133,8 +135,8 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
133
135
  this.goTo(item && item.get('UI_ELEMENT_CD'));
134
136
  },
135
137
 
136
- selectMenuItem: function(uiElementCd) {
137
- if (!this.menuReady) {
138
+ selectMenuItem: function(uiElementCd, preventViewEvent) {
139
+ if (!this.menuReady || !uiElementCd) {
138
140
  return;
139
141
  }
140
142
  const vm = this.getViewModel();
@@ -169,10 +171,13 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
169
171
  this.locals[menuItem.WORKSPACE_CD] = uiElementCd;
170
172
  treeList.setSelection(node);
171
173
  vm.set('menuItem', node);
172
- this.fireViewEvent('select', node);
174
+ if (!preventViewEvent) {
175
+ this.fireViewEvent('select', node);
176
+ }
177
+
173
178
  return node;
174
179
  },
175
- loadMenu() {
180
+ loadMenu(uiElementCd) {
176
181
  Coon.nav.MenuEntity.get().then((menu) => {
177
182
  if (Array.isArray(menu)) {
178
183
  const dataList = this.prepareMenuData(menu);
@@ -225,7 +230,13 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
225
230
  this.menuReady = true;
226
231
  this.fireViewEvent('menuReady');
227
232
  Ext.fireEvent('nav:ready');
228
- this.onMenuReady();
233
+ if (this.menuUpdate === true) {
234
+ this.menuUpdate = false;
235
+ this.changeWorkspace(this.getViewModel().get('workspace'), false);
236
+ this.selectMenuItem(uiElementCd, true);
237
+ } else {
238
+ this.onMenuReady();
239
+ }
229
240
  }
230
241
  });
231
242
  },
@@ -9,7 +9,6 @@ Ext.define('Coon.nav.editor.NavigateElementEditorView', {
9
9
  ui: 'NavigateElementEditorView',
10
10
 
11
11
  viewModel: 'NavigateElementEditorViewModel',
12
- controller: 'NavigateElementEditorController',
13
12
 
14
13
  requires: [
15
14
  'Coon.nav.editor.NavigateElementEditorViewModel',
@@ -24,16 +23,18 @@ Ext.define('Coon.nav.editor.NavigateElementEditorView', {
24
23
 
25
24
  items: [
26
25
  {
27
- xtype: 'panel',
26
+ xtype: 'fieldset',
28
27
  title: 'Информация по использованию',
29
28
  itemId: 'menuEditorInformation',
30
29
  reference: 'menuEditorInformation',
31
30
  collapsible: true,
31
+ collapsed: true,
32
32
  layout: {
33
33
  type: 'hbox',
34
34
  align: 'stretch',
35
35
  },
36
- flex: 0.3,
36
+ flex: 1,
37
+ scrollable: 'y',
37
38
  margin: '10 10 0 10',
38
39
  items: [
39
40
  {
@@ -65,7 +66,7 @@ Ext.define('Coon.nav.editor.NavigateElementEditorView', {
65
66
  type: 'hbox',
66
67
  align: 'stretch',
67
68
  },
68
- flex: 2,
69
+ flex: 4,
69
70
  defaults: {
70
71
  margin: 10,
71
72
  },
@@ -214,8 +214,10 @@ Ext.define('Coon.nav.editor.menu.NavMenuTreeController', {
214
214
  height: 650,
215
215
  });
216
216
  const menuId = record.get('MENU_ENTRY_CD');
217
+ const isBrokenMenuItem = record.get('isBroken');
218
+ const nestedItems = record.get('children');
217
219
  openWindow.on('afterrender', function() {
218
- Coon.Function.executeComponentDoInit(form, {menuId});
220
+ Coon.Function.executeComponentDoInit(form, {menuId, isBrokenMenuItem, nestedItems});
219
221
  });
220
222
  openWindow.show();
221
223
  openWindow.on('close', this.reloadMenu, this);
@@ -229,44 +231,52 @@ Ext.define('Coon.nav.editor.menu.NavMenuTreeController', {
229
231
  * @returns массив promise
230
232
  */
231
233
 
232
- getMenuData: function(menuEntries, parent) {
234
+ getDataPromises: function(menuEntries) {
233
235
  return menuEntries.reduce((acc, menuEntry) => {
234
- acc.push(Coon.util.promisifyCmd('command.GetMenuCommand', menuEntry.get('MENU_ENTRY_CD'))
235
- .then((response) => {
236
- response.parentMenuId = parent;
237
- return response;
238
- })
239
- );
236
+ acc.push(Coon.util.promisifyCmd('command.SaveMenuCommand', {
237
+ description: menuEntry.get('DESCR'),
238
+ icon: menuEntry.get('iconCls'),
239
+ leafSwitch: menuEntry.get('leaf'),
240
+ menuId: menuEntry.get('MENU_ENTRY_CD'),
241
+ menuType: menuEntry.get('MENU_TYPE'),
242
+ sortSequence: menuEntry.get('index'),
243
+ parentMenuId: menuEntry.parentNode.get('MENU_ENTRY_CD'),
244
+ uiElementId: menuEntry.get('UI_ELEMENT_CD'),
245
+ visibleSwitch: menuEntry.get('isVisible'),
246
+ workspaceId: menuEntry.get('WORKSPACE_CD'),
247
+ }));
240
248
  if (menuEntry.hasChildNodes()) {
241
- acc.push(...this.getMenuData(menuEntry.childNodes, menuEntry.get('MENU_ENTRY_CD')));
249
+ acc.push(...this.getDataPromises(menuEntry.childNodes));
242
250
  }
243
251
  return acc;
244
252
  }, []);
245
253
  },
246
254
 
255
+ /**
256
+ * Функция задаёт пунктам меню порядок сортировки и вызывает команду сохранения
257
+ * @param {Array} data массив пунктов меню
258
+ * @param {String} parent название родительского меню
259
+ * @returns массив из promise
260
+ */
261
+ getListMenuItemPromises: function(data) {
262
+ return data.map((menuEntry, index) => Coon.util.promisifyCmd('command.SaveMenuCommand', menuEntry));
263
+ },
264
+
247
265
  /**
248
266
  * Срабатывает при перетаскивании меню, сохраняет порядок отображения
249
267
  */
250
268
 
251
- saveMenuOrder: function() {
252
- const mt = this.getView();
253
- mt.mask();
254
- Promise.all(this.getMenuData(this.getView().getStore().getRoot().childNodes))
255
- .then((data) => {
256
- data.forEach((menu, index) => {
257
- menu.sortSequence = index;
258
- Coon.util.promisifyCmd('command.SaveMenuCommand', menu)
259
- .catch((error) => {
260
- Coon.log.debug(error);
261
- Ext.Msg.alert(error.toString());
262
- });
263
- });
264
- mt.unmask();
265
- })
266
- .catch((error) => {
267
- Coon.log.debug(error);
268
- Ext.Msg.alert(error.toString());
269
- });
269
+ saveMenuOrder: function(a, c, d) {
270
+ const menuTree = this.getView();
271
+ menuTree.mask();
272
+ Promise.all(this.getDataPromises(menuTree.getRootNode().childNodes)).catch((error) => {
273
+ Coon.log.debug(error);
274
+ menuTree.unmask();
275
+ Ext.Msg.alert('Ошибка', error.toString());
276
+ }).finally(() => {
277
+ menuTree.unmask();
278
+ Ext.fireEvent('nav:reload');
279
+ });
270
280
  },
271
281
 
272
282
  /**
@@ -21,12 +21,13 @@ Ext.define('Coon.nav.editor.menu.form.NavMenuFormView', {
21
21
  },
22
22
  bodyPadding: 5,
23
23
 
24
- bbar: [
25
- '->',
24
+ buttons: [
26
25
  {
27
26
  xtype: 'button',
28
27
  text: 'Сохранить',
29
28
  handler: 'saveHandler',
29
+ formBind: true,
30
+ ui: 'orange-button',
30
31
  }
31
32
  ],
32
33
 
@@ -134,6 +135,15 @@ Ext.define('Coon.nav.editor.menu.form.NavMenuFormView', {
134
135
  disabled: '{!menu.parentMenuId}',
135
136
  },
136
137
  readOnly: true,
138
+ },
139
+ {
140
+ xtype: 'displayfield',
141
+ bind: {
142
+ hidden: '{!isBrokenMenuItem}',
143
+ },
144
+ value: `<span style='color:red'>Ошибка:
145
+ </span>Элемент меню является некорректным, т.к имеет одновременно признак группы и признак пункта меню.
146
+ Определитесь какому типу должен соответствовать данный элемент.`,
137
147
  }
138
148
 
139
149
  ],
@@ -92,15 +92,30 @@ Ext.define('Coon.nav.editor.menu.form.NavMenuFormViewController', {
92
92
  if (this.validate()) {
93
93
  const vm = this.getViewModel();
94
94
  const commandClass = vm.get('newMenu') ? 'AddMenuCommand' : 'SaveMenuCommand';
95
- Coon.util.promisifyCmd('command.' + commandClass, this.getSavedData())
96
- .then((menuBean) => {
97
- vm.set('menu', menuBean);
98
- this.getView().close();
99
- Ext.fireEvent('nav:reload');
95
+ const data = this.getSavedData();
96
+ Coon.util.promisifyCmd({
97
+ command: 'command.GetDynamicReportDataCommand',
98
+ params: {reportId: 'MENU_ALLITEMS', parameterList: `[{"type":"MENU_ENTRY_CD","value":"${data.menuId}"}]`},
99
+ })
100
+ .then((resp) => {
101
+ if (resp.totalCount > 0) {
102
+ Ext.Msg.alert('Ошибка', `Пункт мено с идентификатором ${data.menuId} уже существует`);
103
+ } else {
104
+ Coon.util.promisifyCmd('command.' + commandClass, data)
105
+ .then((menuBean) => {
106
+ vm.set('menu', menuBean);
107
+ this.getView().close();
108
+ Ext.fireEvent('nav:reload');
109
+ })
110
+ .catch((error) => {
111
+ Coon.log.debug(error);
112
+ Ext.Msg.alert('Ошибка', error.toString());
113
+ });
114
+ }
100
115
  })
101
116
  .catch((error) => {
102
117
  Coon.log.debug(error);
103
- Ext.Msg.alert(error.toString());
118
+ Ext.Msg.alert('Ошибка', error.toString());
104
119
  });
105
120
  }
106
121
  },
@@ -20,5 +20,7 @@ Ext.define('Coon.nav.editor.menu.form.NavMenuFormViewModel', {
20
20
  leafSwitch: true,
21
21
  },
22
22
  newMenu: true,
23
+ isBrokenMenuItem: false,
24
+ nestedItems: false,
23
25
  },
24
26
  });
@@ -12,7 +12,7 @@ Ext.define('Coon.nav.editor.workspace.NavWorkspaceListController', {
12
12
  'NavWorkspaceListView': {
13
13
  select: 'selectWorkspace',
14
14
  itemdblclick: 'openFormEditWorkspace',
15
- drop: 'saveWorkspaceOrder',
15
+ drop: 'onSaveWorkspaceOrder',
16
16
  itemcontextmenu: 'showWorkspaceContextMenu',
17
17
  },
18
18
  },
@@ -98,6 +98,7 @@ Ext.define('Coon.nav.editor.workspace.NavWorkspaceListController', {
98
98
  Coon.util.promisifyCmd('command.DeleteWorkspaceCommand', workspace)
99
99
  .then(() => {
100
100
  Ext.Msg.alert('Сообщение', 'Рабочее пространство удалено');
101
+ Ext.fireEvent('nav:reload');
101
102
  this.reloadWorkspaceList();
102
103
  })
103
104
  .catch((error) => {
@@ -111,38 +112,31 @@ Ext.define('Coon.nav.editor.workspace.NavWorkspaceListController', {
111
112
  /**
112
113
  * Срабатывает при перетаскивании рабочего пространства, сохраняет порядок отображения
113
114
  */
114
- saveWorkspaceOrder: function() {
115
+ onSaveWorkspaceOrder: function() {
115
116
  const workspaceListView = this.getView();
116
117
  const workspaces = workspaceListView.getStore().getRange();
117
-
118
118
  workspaceListView.mask();
119
- const workspacePromises = workspaces.map((workspaceEntry) => {
120
- return Coon.util.promisifyCmd('command.GetWorkspaceCommand', workspaceEntry.get('WORKSPACE_CD'));
121
- });
122
119
 
120
+ const workspacePromises = workspaces.map((workspaceEntry, index) => {
121
+ const workspace = {
122
+ description: workspaceEntry.get('DESCRIPTION'),
123
+ icon: workspaceEntry.get('ICON'),
124
+ workspaceId: workspaceEntry.get('WORKSPACE_CD'),
125
+ sortSequence: index,
126
+ };
127
+ return Coon.util.promisifyCmd('command.SaveWorkspaceCommand', workspace);
128
+ });
123
129
 
124
- return Promise.all(workspacePromises)
125
- .then((data) => {
126
- data.forEach((workspace, index) => {
127
- workspace.sortSequence = index;
128
- Coon.util.promisifyCmd('command.SaveWorkspaceCommand', workspace)
129
- .catch((error) => {
130
- Coon.log.debug(error);
131
- Ext.Msg.alert(error.toString());
132
- });
133
- });
134
- workspaceListView.unmask();
135
- })
136
- .catch((error) => {
137
- Coon.log.debug(error);
138
- Ext.Msg.alert(error.toString());
139
- });
130
+ Promise.all(workspacePromises).catch((error) => {
131
+ Coon.log.debug(error);
132
+ workspaceListView.unmask();
133
+ Ext.Msg.alert('Ошибка', error.toString());
134
+ }).finally(() => {
135
+ workspaceListView.unmask();
136
+ Ext.fireEvent('nav:reload');
137
+ });
140
138
  },
141
139
 
142
- /**
143
- * Обновляет отображения списка рабочих пространств
144
- */
145
-
146
140
  reloadWorkspaceList: function() {
147
141
  this.init();
148
142
  this.getView().getStore().reload();
@@ -97,6 +97,7 @@ Ext.define('Coon.nav.editor.workspace.form.NavWorkspaceFormController', {
97
97
  Coon.util.promisifyCmd('command.' + commandClass, vm.get('workspace'))
98
98
  .then((workspaceBean) => {
99
99
  vm.set('workspace', workspaceBean);
100
+ Ext.fireEvent('nav:reload');
100
101
  this.getView().close();
101
102
  })
102
103
  .catch((error) => {
@@ -28,6 +28,8 @@ Ext.define('Coon.nav.editor.workspace.form.NavWorkspaceFormView', {
28
28
  {
29
29
  text: 'Сохранить',
30
30
  handler: 'saveHandler',
31
+ formBind: true,
32
+ ui: 'orange-button',
31
33
  }
32
34
  ],
33
35
 
@@ -780,7 +780,10 @@ Ext.define('Coon.report.component.ReportPanel', {
780
780
 
781
781
  const defaultGridConfig = Coon.report.component.ReportPanel.getColumnsConfig(reportBean[ns.$fields], gridConfig);
782
782
 
783
- const widget = Ext.widget(this.getIsTree() ? 'ReportTree' : 'ReportGrid', Ext.apply(defaultGridConfig, this.gridProperties));
783
+ const widget = Ext.widget(
784
+ this.getIsTree() ? 'ReportTree' : 'ReportGrid',
785
+ Ext.apply(defaultGridConfig, this.gridProperties, {reportId: reportBean[ns.$reportId]})
786
+ );
784
787
  widget.on('buttonIsAdded', this.sortButtons, this);
785
788
  return widget;
786
789
  },
@@ -50,7 +50,28 @@ Ext.define('Coon.report.component.reportpanel.ReportGrid', {
50
50
  this.bbar = Ext.create({xtype: 'toolbar', hidden: true, enableOverflow: true, items: [].concat(this.bbar || [])});
51
51
  this.fbar = Ext.create({xtype: 'toolbar', hidden: true, enableOverflow: true, items: [].concat(this.fbar || [])});
52
52
 
53
-
53
+ const plugins = this.plugins;
54
+ delete this.plugins;
55
+ const pluginErrors = [];
56
+ if (Array.isArray(plugins)) {
57
+ plugins.forEach((plugin) => {
58
+ try {
59
+ this.addPlugin(plugin);
60
+ } catch (e) {
61
+ pluginErrors.push(e.message);
62
+ }
63
+ });
64
+ }
65
+ if (pluginErrors.length) {
66
+ const trace = ['CM_REPORT_CD: ' + this.reportId].concat(Array.from(new Set(pluginErrors))).join('\n');
67
+ Coon.log.error(trace);
68
+ Ext.create('Coon.report.component.ErrorWindow', {
69
+ autoShow: true,
70
+ title: 'Ошибка инициализации отчета',
71
+ trace,
72
+ message: 'Произошла ошибка при инициализации плагинов отчета, некоторые функции будут не доступны.',
73
+ });
74
+ }
54
75
  this.callParent();
55
76
  this.relayEvents(this.getStore(), ['datachanged', 'load']);
56
77
  },
@@ -9,6 +9,11 @@ Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelControl
9
9
  dictionary: Coon.report.component.settings.property.ReportPropertyDictionary,
10
10
 
11
11
  init: function(view) {
12
+ view.up().on('beforetabchange', (cmp, newTab, oldTab) => {
13
+ if (oldTab.id === view.id) {
14
+ this.recordChangeHandler();
15
+ }
16
+ }, this);
12
17
  view.validate = this.validate.bind(this);
13
18
  view.getData = this.getData.bind(this);
14
19
  view.setData = this.setData.bind(this);
@@ -130,7 +135,7 @@ Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelControl
130
135
  const value = vm.get('editorValue');
131
136
  const record = vm.get('propertyGrid.selection');
132
137
  record.set('value', value);
133
- this.getView().fireEvent('propertyChanged');
138
+ // this.getView().fireEvent('propertyChanged');
134
139
  },
135
140
 
136
141
  onShowContextMenu: function(_, record, __, ___, e) {
@@ -160,7 +165,6 @@ Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelControl
160
165
  }
161
166
  this.lookup('descriptionField').reset();
162
167
  this.lookup('propertyValueContainer').removeAll();
163
- this.getView().fireEvent('propertyChanged');
164
168
  },
165
169
 
166
170
  onAddHandler() {
@@ -2,7 +2,10 @@ Ext.define('Coon.report.plugin.grid.UpdateGridPlugin', {
2
2
  extend: 'Ext.AbstractPlugin',
3
3
  alias: 'plugin.UpdateGridPlugin',
4
4
  uses: [],
5
- requires: [],
5
+ requires: [
6
+ 'Coon.report.command.GetDynamicReportDataCommand',
7
+ 'Coon.log'
8
+ ],
6
9
  alternateClassName: [
7
10
  'Sigma.common.grid.plugin.UpdateGridPlugin',
8
11
  'Sigma.common.plugin.grid.UpdateGridPlugin'
@@ -41,8 +44,7 @@ Ext.define('Coon.report.plugin.grid.UpdateGridPlugin', {
41
44
  },
42
45
 
43
46
  execute: function(parameters) {
44
- const command = Ext.create('Coon.report.command.GetDynamicReportDataCommand');
45
- command.on('complete', Ext.bind(this.updateRecords, this), this);
47
+ const command = Ext.create('command.GetDynamicReportDataCommand');
46
48
  parameters = parameters || {};
47
49
  const params = [];
48
50
  for (const key in parameters) {
@@ -50,14 +52,16 @@ Ext.define('Coon.report.plugin.grid.UpdateGridPlugin', {
50
52
  params.push({type: key, value: parameters[key]});
51
53
  }
52
54
  }
55
+ command.on('complete', (response) => this.updateRecords.call(this, response, params));
53
56
  command.execute(this.reportID, Ext.encode(params));
54
57
  },
55
58
 
56
- updateRecords: function(response) {
59
+ updateRecords: function(response, params) {
57
60
  if (!response.list || response.list.length === 0) {
58
61
  return;
59
62
  } else if (response.list.length > 1) {
60
63
  Ext.Msg.alert('Сообщение системы', 'Отчет, используемый для обновления записи, вернул больше одной строки');
64
+ Coon.log.error(`[UpdateGridPlugin] Отчет ${this.reportID} вернул больше одной строки. Параметры: `, params);
61
65
  } else {
62
66
  this.setDataToRecords(response.list[0]);
63
67
  }
@@ -209,6 +209,7 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
209
209
  xtype: 'CommandComboBox',
210
210
  reference: 'commandComboBox',
211
211
  fieldLabel: 'Команда',
212
+ displayField: 'xtype',
212
213
  bind: '{ctype}',
213
214
  listeners: {
214
215
  change: this.onChangeCommand.bind(this),
@@ -226,6 +227,36 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
226
227
  xtype: 'tabpanel',
227
228
  flex: 1,
228
229
  items: [
230
+ {
231
+ xtype: 'panel',
232
+ title: 'Параметры',
233
+ tooltip: 'Настройка параметров команды',
234
+ layout: 'fit',
235
+ tbar: [
236
+ {
237
+ text: 'Загрузить параметры',
238
+ tooltip: 'Параметры, определенные в классе команды, будут созданы в редакторе с пустыми значениями.' +
239
+ 'Если параметры уже определены в редакторе, то они не будут изменены.',
240
+ ui: 'blue-text-button-border',
241
+ hidden: true,
242
+ bind: {
243
+ hidden: '{!commandComboBox.selection}',
244
+ },
245
+ handler: this.loadParametersHandler.bind(this),
246
+ }
247
+ ],
248
+ items: [
249
+ {
250
+ xtype: 'UiAceEditorPanel',
251
+ reference: 'parametersRef',
252
+ hideSearchPanel: true,
253
+ layout: 'fit',
254
+ bind: {
255
+ value: '{parameters}',
256
+ },
257
+ }
258
+ ],
259
+ },
229
260
  {
230
261
  xtype: 'panel',
231
262
  title: 'Настройки',
@@ -358,36 +389,6 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
358
389
  }
359
390
  ],
360
391
  },
361
- {
362
- xtype: 'panel',
363
- title: 'Параметры',
364
- tooltip: 'Настройка параметров команды',
365
- layout: 'fit',
366
- tbar: [
367
- {
368
- text: 'Загрузить параметры',
369
- tooltip: 'Параметры, определенные в классе команды, будут созданы в редакторе с пустыми значениями.' +
370
- 'Если параметры уже определены в редакторе, то они не будут изменены.',
371
- ui: 'blue-text-button-border',
372
- hidden: true,
373
- bind: {
374
- hidden: '{!commandComboBox.selection}',
375
- },
376
- handler: this.loadParametersHandler.bind(this),
377
- }
378
- ],
379
- items: [
380
- {
381
- xtype: 'UiAceEditorPanel',
382
- reference: 'parametersRef',
383
- hideSearchPanel: true,
384
- layout: 'fit',
385
- bind: {
386
- value: '{parameters}',
387
- },
388
- }
389
- ],
390
- },
391
392
  {
392
393
  title: 'Отражение результатов',
393
394
  scrollable: true,
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.7.14',
3
+ number: '2.7.16',
4
4
  });
@@ -1,5 +0,0 @@
1
- Ext.define('Coon.common.field.checkbox.RoundCheckbox', {
2
- extend: 'Ext.form.field.Checkbox',
3
- cls: 'RoundCheckbox',
4
- xtype: ['roundcheckbox', 'RoundCheckbox'],
5
- });
@@ -1,48 +0,0 @@
1
- .x-form-fieldCheckbox {
2
- .x-form-field {
3
- position: relative;
4
- }
5
-
6
- .x-form-field label {
7
- background-color: #fff;
8
- border: 1px solid #ccc;
9
- border-radius: 50%;
10
- cursor: pointer;
11
- height: 28px;
12
- left: 0;
13
- position: absolute;
14
- top: 0;
15
- width: 28px;
16
- }
17
-
18
- .x-form-field label:after {
19
- border: 2px solid #fff;
20
- border-top: none;
21
- border-right: none;
22
- content: "";
23
- height: 6px;
24
- left: 7px;
25
- opacity: 0;
26
- position: absolute;
27
- top: 8px;
28
- transform: rotate(-45deg);
29
- width: 12px;
30
- }
31
-
32
- .x-form-field input[type="checkbox"] {
33
- visibility: hidden;
34
- }
35
-
36
- .x-form-field input[type="checkbox"]:checked + label {
37
- background-color: #66bb6a;
38
- border-color: #66bb6a;
39
- }
40
-
41
- .x-form-field input[type="checkbox"]:checked + label:after {
42
- opacity: 1;
43
- }
44
-
45
- .x-form-item-body, .x-form-cb-wrap-inner {
46
- margin: 0 auto;
47
- }
48
- }
@@ -1,23 +0,0 @@
1
- Ext.define('Coon.nav.MenuLoader', {
2
- singleton: true,
3
-
4
- isLoaded: false,
5
-
6
- load() {
7
- return Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'MENU_ALLITEMS')
8
- .then((data) => {
9
- if (Array.isArray(data.list)) {
10
- this.uiElementMap = data.list.reduce();
11
- }
12
- this.isLoaded = true;
13
- });
14
- },
15
-
16
- get() {
17
-
18
- },
19
-
20
- isValidMenuItem(uiEmentId) {
21
- return this.uiElementMap.has(uiEmentId);
22
- },
23
- });
@@ -1,34 +0,0 @@
1
- /**
2
- * Контроллер рабочих пространств
3
- * @class Coon.nav.editor.workspace.NavWorkspaceListController
4
- */
5
- Ext.define('Coon.nav.editor.NavigateElementEditorController', {
6
- extend: 'Ext.app.ViewController',
7
- alias: 'controller.NavigateElementEditorController',
8
-
9
- init: function() {
10
- const me = this.lookup('menuEditorInformation');
11
- const menuNavEditorHelp = localStorage.getItem('menuNavEditorHelp');
12
- me.setCollapsed(!!menuNavEditorHelp);
13
- let icon;
14
- if (me.getCollapsed()) {
15
- icon = 'x-fa fa-chevron-down';
16
- } else {
17
- icon = 'x-fa fa-chevron-up';
18
- }
19
- me.addTool({
20
- iconCls: icon,
21
- listeners: {
22
- click: function() {
23
- !menuNavEditorHelp && localStorage.setItem('menuNavEditorHelp', 'collapsed');
24
- me.setCollapsed(!me.getCollapsed());
25
- if (me.getCollapsed()) {
26
- this.setIconCls('x-fa fa-chevron-down');
27
- } else {
28
- this.setIconCls('x-fa fa-chevron-up');
29
- }
30
- },
31
- },
32
- });
33
- },
34
- });
@@ -1,7 +0,0 @@
1
- **спецификация:**
2
-
3
- входные параметры:
4
-
5
- - exportFileFormat [xls/pdf]
6
- - allowUserSelectColumnsToUpload
7
- - addToSearchButton добавить в кнопку "поиск", в этом случае в качестве параметра отправляем текущие параметры из FilterPanel(useRawFilterParams: true)