ru.coon 2.8.71 → 2.8.73

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,15 @@
1
+ # Version 2.8.73, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f97bb01382aad65df2b647ad444e17832801b2b4)
2
+ * ## Fixes
3
+ * <span style='color:red'> UiCustomController.processAccessDecision on [boxready, afterrender]</span> ([869ca8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/869ca8f1e3c130533b820feee6dab0d75e778810))
4
+
5
+ * update: CHANGELOG.md ([116a19], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/116a197b861a06d314893c3d0b6e26e5a17e6ac3))
6
+
7
+ # Version 2.8.72, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a1eeb12f31b999e7392be579f66ab4708402f925)
8
+ * ## Fixes
9
+ * <span style='color:red'>fix zero date</span> ([e4bac1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e4bac11fa1b2e186857a9b2032745053ffa0eaa3))
10
+
11
+ * update: CHANGELOG.md ([418d14], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/418d14f70e04b8b9cc29c71ce7b1eaff4afc69cc))
12
+
1
13
  # Version 2.8.71, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5a46d94b4b3b366b1b4af0c1cf66350abf7a2010)
2
14
  * ## Features
3
15
  * <span style='color:green'>feat: add text-decoration line-through to GridRowStylePlugin CRM-10848</span> ([d6c80a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d6c80af921e7c084d484722a44f738b92f5c68b5))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.8.71",
7
+ "version": "2.8.73",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -9,7 +9,7 @@ Ext.define('Coon.report.model.CharacteristicBean', {
9
9
  ],
10
10
  requires: 'Coon.report.model.CharacteristicBeanFields',
11
11
  fields: [
12
- {name: Coon.report.model.CharacteristicBeanFields.$effectiveDate, type: 'date'},
12
+ {name: Coon.report.model.CharacteristicBeanFields.$effectiveDate, type: 'date', dateFormat: 'Y-m-d'},
13
13
  {
14
14
  name: Coon.report.model.CharacteristicBeanFields.$value, type: 'string',
15
15
  },
@@ -24,7 +24,7 @@ Ext.define('Coon.uielement.command.GetUIElementCommand', {
24
24
  }
25
25
  props.uiElementCd = this.uiElementCd;
26
26
  props.accessDecision = data.accessDecision;
27
- Coon.log.debug('GetUIElementCommand.props', props);
27
+ // Coon.log.debug('GetUIElementCommand.props', props);
28
28
  data.propertyData = JSON5.stringify(props);
29
29
  } catch (ex) {
30
30
  Coon.log.error('GetUIElementCommand.UiCustomPanel: invalid propertyData JSON5');
@@ -5,51 +5,66 @@ Ext.define('Coon.uielement.component.UiCustomController', {
5
5
 
6
6
  locals: {},
7
7
 
8
+ control: {
9
+ '#': {
10
+ boxready: 'processAccessDecision',
11
+ afterrender: 'processAccessDecision',
12
+ },
13
+ },
14
+
8
15
  init: function(view) {
9
16
  if (this.isTracePluginsEnabled()) {
10
17
  this.getTraceBuffer();
11
18
  }
19
+ },
20
+
21
+ processAccessDecision() {
22
+ if (this.isAccessDecisionProcessed) {
23
+ return;
24
+ }
25
+ this.isAccessDecisionProcessed = true;
26
+ const view = this.getView();
12
27
  const config = view.propertyData || view.initialConfig;
13
28
  if (!view || typeof view.on !== 'function') {
14
29
  Coon.log.debug(` [Error]UiCustomController.init - view not found or view.on is not a function`);
15
30
  return;
16
31
  }
17
- view.on('afterrender', function() {
18
- const {accessDecision, securePoints} = config;
19
- Coon.log.debug('UiCustomController.accessProps', {accessDecision, securePoints});
20
- if (!Ext.isObject(accessDecision) || accessDecision.allow) {
21
- return;
22
- }
23
- const viewButtons = view.query('button');
24
- const allowedMap = new Set(accessDecision.allowedItems);
25
- if (Ext.isObject(securePoints.buttons) && Object.keys(securePoints.buttons).length) {
26
- Coon.log.debug(`used securePoints, allowed: ${accessDecision.allowedItems}, secureButtons: ${Object.keys(securePoints.buttons)}`);
27
- viewButtons.forEach((btn) => {
32
+ Coon.log.debug('UiCustomController.config', config);
33
+
34
+ const {accessDecision, securePoints} = config;
35
+ Coon.log.debug('UiCustomController.accessProps', {accessDecision, securePoints});
36
+ if (!Ext.isObject(accessDecision) || accessDecision.allow) {
37
+ return;
38
+ }
39
+ const viewButtons = view.query('button');
40
+ const allowedMap = new Set(accessDecision.allowedItems);
41
+ if (Ext.isObject(securePoints.buttons) && Object.keys(securePoints.buttons).length) {
42
+ Coon.log.debug(`used securePoints, allowed: ${accessDecision.allowedItems},\nsecureButtons: ${Object.keys(securePoints.buttons)}`);
43
+ viewButtons.forEach((btn) => {
44
+ const id = Coon.util.translit(btn.text || btn.iconCls);
45
+ if (securePoints.buttons[id] && !allowedMap.has(id)) {
46
+ btn.hide();
47
+ }
48
+ });
49
+ } else {
50
+ const excludeBtns = [].concat(
51
+ view.query('tabpanel > tabbar > button').map((btn) => btn.id),
52
+ view.query('ReportPanel button').map((btn) => btn.id),
53
+ view.query('CharacteristicGridEditor button').map((btn) => btn.id)
54
+ );
55
+ const excludeIds = new Set(excludeBtns);
56
+ view.query('button')
57
+ .filter((btn) => btn.text && !excludeIds.has(btn.id))
58
+ .forEach((btn) => {
28
59
  const id = Coon.util.translit(btn.text || btn.iconCls);
29
- if (securePoints.buttons[id] && !allowedMap.has(id)) {
60
+ if (allowedMap.has(id)) {
61
+ Coon.log.debug('PASSED: view.button.id', id);
62
+ } else {
30
63
  btn.hide();
64
+ Coon.log.debug('HIDE: view.button.id', id);
31
65
  }
32
66
  });
33
- } else {
34
- const excludeBtns = [].concat(
35
- view.query('tabpanel > tabbar > button').map((btn) => btn.id),
36
- view.query('ReportPanel button').map((btn) => btn.id),
37
- view.query('CharacteristicGridEditor button').map((btn) => btn.id)
38
- );
39
- const excludeIds = new Set(excludeBtns);
40
- view.query('button')
41
- .filter((btn) => btn.text && !excludeIds.has(btn.id))
42
- .forEach((btn) => {
43
- const id = Coon.util.translit(btn.text || btn.iconCls);
44
- if (allowedMap.has(id)) {
45
- Coon.log.debug('PASSED: view.button.id', id);
46
- } else {
47
- btn.hide();
48
- Coon.log.debug('HIDE: view.button.id', id);
49
- }
50
- });
51
- }
52
- }, this);
67
+ }
53
68
  },
54
69
 
55
70
  getData(view) {
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.8.71',
3
+ number: '2.8.73',
4
4
  });