@cauca-911/management 12.0.2 → 13.0.2

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 (46) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +4 -4
  3. package/assets/i18n/cauca/en-management.json +16 -16
  4. package/assets/i18n/cauca/es-management.json +16 -0
  5. package/assets/i18n/cauca/fr-management.json +16 -16
  6. package/cauca-911-management.d.ts +5 -5
  7. package/{esm2015/cauca-911-management.js → esm2020/cauca-911-management.mjs} +4 -4
  8. package/esm2020/lib/cauca-management-group/cauca-management-group.component.mjs +285 -0
  9. package/{esm2015/lib/cauca-management-user/cauca-management-user.component.js → esm2020/lib/cauca-management-user/cauca-management-user.component.mjs} +96 -106
  10. package/{esm2015/lib/cauca-management.component.js → esm2020/lib/cauca-management.component.mjs} +23 -27
  11. package/{esm2015/lib/cauca-management.module.js → esm2020/lib/cauca-management.module.mjs} +57 -57
  12. package/{esm2015/lib/cauca-management.service.js → esm2020/lib/cauca-management.service.mjs} +13 -13
  13. package/{esm2015/lib/shared/models/group-model.js → esm2020/lib/shared/models/group-model.mjs} +7 -7
  14. package/{esm2015/lib/shared/models/group-permission-model.js → esm2020/lib/shared/models/group-permission-model.mjs} +8 -8
  15. package/{esm2015/lib/shared/models/permission-model.js → esm2020/lib/shared/models/permission-model.mjs} +7 -7
  16. package/{esm2015/lib/shared/models/user-group-model.js → esm2020/lib/shared/models/user-group-model.mjs} +7 -7
  17. package/{esm2015/lib/shared/models/user-model.js → esm2020/lib/shared/models/user-model.mjs} +11 -11
  18. package/{esm2015/lib/shared/models/user-permission-model.js → esm2020/lib/shared/models/user-permission-model.mjs} +8 -8
  19. package/{esm2015/lib/shared/services/management-group.service.js → esm2020/lib/shared/services/management-group.service.mjs} +33 -33
  20. package/{esm2015/lib/shared/services/management-permission.service.js → esm2020/lib/shared/services/management-permission.service.mjs} +30 -30
  21. package/{esm2015/lib/shared/services/management-user.service.js → esm2020/lib/shared/services/management-user.service.mjs} +48 -48
  22. package/{esm2015/public-api.js → esm2020/public-api.mjs} +16 -16
  23. package/fesm2015/cauca-911-management.mjs +650 -0
  24. package/fesm2015/cauca-911-management.mjs.map +1 -0
  25. package/{fesm2015/cauca-911-management.js → fesm2020/cauca-911-management.mjs} +563 -590
  26. package/fesm2020/cauca-911-management.mjs.map +1 -0
  27. package/lib/cauca-management-group/cauca-management-group.component.d.ts +45 -45
  28. package/lib/cauca-management-user/cauca-management-user.component.d.ts +20 -20
  29. package/lib/cauca-management.component.d.ts +8 -8
  30. package/lib/cauca-management.module.d.ts +15 -15
  31. package/lib/cauca-management.service.d.ts +6 -6
  32. package/lib/shared/models/group-model.d.ts +9 -9
  33. package/lib/shared/models/group-permission-model.d.ts +7 -7
  34. package/lib/shared/models/permission-model.d.ts +7 -7
  35. package/lib/shared/models/user-group-model.d.ts +6 -6
  36. package/lib/shared/models/user-model.d.ts +15 -15
  37. package/lib/shared/models/user-permission-model.d.ts +7 -7
  38. package/lib/shared/services/management-group.service.d.ts +17 -17
  39. package/lib/shared/services/management-permission.service.d.ts +16 -16
  40. package/lib/shared/services/management-user.service.d.ts +23 -23
  41. package/package.json +22 -9
  42. package/public-api.d.ts +12 -12
  43. package/bundles/cauca-911-management.umd.js +0 -734
  44. package/bundles/cauca-911-management.umd.js.map +0 -1
  45. package/esm2015/lib/cauca-management-group/cauca-management-group.component.js +0 -298
  46. package/fesm2015/cauca-911-management.js.map +0 -1
@@ -18,624 +18,597 @@ import * as i6 from 'devextreme-angular/ui/nested';
18
18
  import * as i7 from 'devextreme-angular/core';
19
19
  import { CommonModule } from '@angular/common';
20
20
 
21
- class CaucaManagementService {
22
- constructor() { }
23
- }
24
- CaucaManagementService.ɵfac = function CaucaManagementService_Factory(t) { return new (t || CaucaManagementService)(); };
25
- CaucaManagementService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaucaManagementService, factory: CaucaManagementService.ɵfac, providedIn: 'root' });
26
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementService, [{
27
- type: Injectable,
28
- args: [{
29
- providedIn: 'root'
30
- }]
21
+ class CaucaManagementService {
22
+ constructor() { }
23
+ }
24
+ CaucaManagementService.ɵfac = function CaucaManagementService_Factory(t) { return new (t || CaucaManagementService)(); };
25
+ CaucaManagementService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaucaManagementService, factory: CaucaManagementService.ɵfac, providedIn: 'root' });
26
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementService, [{
27
+ type: Injectable,
28
+ args: [{
29
+ providedIn: 'root'
30
+ }]
31
31
  }], function () { return []; }, null); })();
32
32
 
33
- class CaucaManagementComponent {
34
- constructor() { }
35
- ngOnInit() {
36
- }
37
- }
38
- CaucaManagementComponent.ɵfac = function CaucaManagementComponent_Factory(t) { return new (t || CaucaManagementComponent)(); };
39
- CaucaManagementComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementComponent, selectors: [["cauca-management"]], decls: 3, vars: 3, template: function CaucaManagementComponent_Template(rf, ctx) { if (rf & 1) {
40
- i0.ɵɵelementStart(0, "div");
41
- i0.ɵɵtext(1);
42
- i0.ɵɵpipe(2, "translate");
43
- i0.ɵɵelementEnd();
44
- } if (rf & 2) {
45
- i0.ɵɵadvance(1);
46
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "core.noGenericComponentOnThisLibrary"));
47
- } }, pipes: [i1.TranslatePipe], encapsulation: 2 });
48
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementComponent, [{
49
- type: Component,
50
- args: [{
51
- selector: 'cauca-management',
52
- templateUrl: './cauca-management.component.html',
53
- styles: []
54
- }]
33
+ class CaucaManagementComponent {
34
+ constructor() { }
35
+ ngOnInit() {
36
+ }
37
+ }
38
+ CaucaManagementComponent.ɵfac = function CaucaManagementComponent_Factory(t) { return new (t || CaucaManagementComponent)(); };
39
+ CaucaManagementComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementComponent, selectors: [["cauca-management"]], decls: 3, vars: 3, template: function CaucaManagementComponent_Template(rf, ctx) { if (rf & 1) {
40
+ i0.ɵɵelementStart(0, "div");
41
+ i0.ɵɵtext(1);
42
+ i0.ɵɵpipe(2, "translate");
43
+ i0.ɵɵelementEnd();
44
+ } if (rf & 2) {
45
+ i0.ɵɵadvance(1);
46
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "core.noGenericComponentOnThisLibrary"));
47
+ } }, pipes: [i1.TranslatePipe], encapsulation: 2 });
48
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementComponent, [{
49
+ type: Component,
50
+ args: [{ selector: 'cauca-management', styles: [], template: "<div>{{'core.noGenericComponentOnThisLibrary' | translate}}</div>" }]
55
51
  }], function () { return []; }, null); })();
56
52
 
57
- class ManagementGroupService {
58
- constructor(coreService, http) {
59
- this.http = http;
60
- this.config = coreService.getConfig();
61
- }
62
- getAll() {
63
- return this.http.get(`${this.config.apiUrl}GroupManagement`);
64
- }
65
- get(idGroup) {
66
- return this.http.get(`${this.config.apiUrl}GroupManagement/${idGroup}`);
67
- }
68
- save(group) {
69
- return this.http.post(`${this.config.apiUrl}GroupManagement`, group);
70
- }
71
- delete(idGroup) {
72
- return this.http.delete(`${this.config.apiUrl}GroupManagement/${idGroup}`);
73
- }
74
- hasExistingGroupName(group) {
75
- return this.http.post(`${this.config.apiUrl}GroupManagement/GroupNameAlreadyExist`, group);
76
- }
77
- }
78
- ManagementGroupService.ɵfac = function ManagementGroupService_Factory(t) { return new (t || ManagementGroupService)(i0.ɵɵinject(i1$1.CaucaCoreService), i0.ɵɵinject(i2.HttpClient)); };
79
- ManagementGroupService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ManagementGroupService, factory: ManagementGroupService.ɵfac, providedIn: 'root' });
80
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManagementGroupService, [{
81
- type: Injectable,
82
- args: [{
83
- providedIn: 'root'
84
- }]
53
+ class ManagementGroupService {
54
+ constructor(coreService, http) {
55
+ this.http = http;
56
+ this.config = coreService.getConfig();
57
+ }
58
+ getAll() {
59
+ return this.http.get(`${this.config.apiUrl}GroupManagement`);
60
+ }
61
+ get(idGroup) {
62
+ return this.http.get(`${this.config.apiUrl}GroupManagement/${idGroup}`);
63
+ }
64
+ save(group) {
65
+ return this.http.post(`${this.config.apiUrl}GroupManagement`, group);
66
+ }
67
+ delete(idGroup) {
68
+ return this.http.delete(`${this.config.apiUrl}GroupManagement/${idGroup}`);
69
+ }
70
+ hasExistingGroupName(group) {
71
+ return this.http.post(`${this.config.apiUrl}GroupManagement/GroupNameAlreadyExist`, group);
72
+ }
73
+ }
74
+ ManagementGroupService.ɵfac = function ManagementGroupService_Factory(t) { return new (t || ManagementGroupService)(i0.ɵɵinject(i1$1.CaucaCoreService), i0.ɵɵinject(i2.HttpClient)); };
75
+ ManagementGroupService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ManagementGroupService, factory: ManagementGroupService.ɵfac, providedIn: 'root' });
76
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManagementGroupService, [{
77
+ type: Injectable,
78
+ args: [{
79
+ providedIn: 'root'
80
+ }]
85
81
  }], function () { return [{ type: i1$1.CaucaCoreService }, { type: i2.HttpClient }]; }, null); })();
86
82
 
87
- class ManagementUserService {
88
- constructor(coreService, http) {
89
- this.http = http;
90
- this.config = coreService.getConfig();
91
- }
92
- getAll() {
93
- return this.http.get(`${this.config.apiUrl}UserManagement`);
94
- }
95
- get(idUser) {
96
- return this.http.get(`${this.config.apiUrl}UserManagement/${idUser}`);
97
- }
98
- getGroup(idUser) {
99
- return this.http.get(`${this.config.apiUrl}UserManagement/${idUser}/groups`);
100
- }
101
- addGroup(userGroup) {
102
- return this.http.post(`${this.config.apiUrl}UserManagement/group`, userGroup);
103
- }
104
- deleteGroup(idUserGroup) {
105
- return this.http.delete(`${this.config.apiUrl}UserManagement/groups/${idUserGroup}`);
106
- }
107
- addPermission(userPermission) {
108
- return this.http.post(`${this.config.apiUrl}UserManagement/permission`, userPermission);
109
- }
110
- deletePermission(idUserPermission) {
111
- return this.http.delete(`${this.config.apiUrl}UserManagement/groups/${idUserPermission}`);
112
- }
113
- save(user) {
114
- return this.http.post(`${this.config.apiUrl}UserManagement`, user);
115
- }
116
- delete(idUser) {
117
- return this.http.delete(`${this.config.apiUrl}UserManagement/${idUser}`);
118
- }
119
- hasExistingUserName(user) {
120
- return this.http.post(`${this.config.apiUrl}UserManagement/UserNameAlreadyExist`, user);
121
- }
122
- }
123
- ManagementUserService.ɵfac = function ManagementUserService_Factory(t) { return new (t || ManagementUserService)(i0.ɵɵinject(i1$1.CaucaCoreService), i0.ɵɵinject(i2.HttpClient)); };
124
- ManagementUserService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ManagementUserService, factory: ManagementUserService.ɵfac, providedIn: 'root' });
125
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManagementUserService, [{
126
- type: Injectable,
127
- args: [{
128
- providedIn: 'root'
129
- }]
83
+ class ManagementUserService {
84
+ constructor(coreService, http) {
85
+ this.http = http;
86
+ this.config = coreService.getConfig();
87
+ }
88
+ getAll() {
89
+ return this.http.get(`${this.config.apiUrl}UserManagement`);
90
+ }
91
+ get(idUser) {
92
+ return this.http.get(`${this.config.apiUrl}UserManagement/${idUser}`);
93
+ }
94
+ getGroup(idUser) {
95
+ return this.http.get(`${this.config.apiUrl}UserManagement/${idUser}/groups`);
96
+ }
97
+ addGroup(userGroup) {
98
+ return this.http.post(`${this.config.apiUrl}UserManagement/group`, userGroup);
99
+ }
100
+ deleteGroup(idUserGroup) {
101
+ return this.http.delete(`${this.config.apiUrl}UserManagement/groups/${idUserGroup}`);
102
+ }
103
+ addPermission(userPermission) {
104
+ return this.http.post(`${this.config.apiUrl}UserManagement/permission`, userPermission);
105
+ }
106
+ deletePermission(idUserPermission) {
107
+ return this.http.delete(`${this.config.apiUrl}UserManagement/groups/${idUserPermission}`);
108
+ }
109
+ save(user) {
110
+ return this.http.post(`${this.config.apiUrl}UserManagement`, user);
111
+ }
112
+ delete(idUser) {
113
+ return this.http.delete(`${this.config.apiUrl}UserManagement/${idUser}`);
114
+ }
115
+ hasExistingUserName(user) {
116
+ return this.http.post(`${this.config.apiUrl}UserManagement/UserNameAlreadyExist`, user);
117
+ }
118
+ }
119
+ ManagementUserService.ɵfac = function ManagementUserService_Factory(t) { return new (t || ManagementUserService)(i0.ɵɵinject(i1$1.CaucaCoreService), i0.ɵɵinject(i2.HttpClient)); };
120
+ ManagementUserService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ManagementUserService, factory: ManagementUserService.ɵfac, providedIn: 'root' });
121
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManagementUserService, [{
122
+ type: Injectable,
123
+ args: [{
124
+ providedIn: 'root'
125
+ }]
130
126
  }], function () { return [{ type: i1$1.CaucaCoreService }, { type: i2.HttpClient }]; }, null); })();
131
127
 
132
- class ManagementPermissionService {
133
- constructor(coreService, http) {
134
- this.http = http;
135
- this.config = coreService.getConfig();
136
- }
137
- getAll() {
138
- return this.http.get(`${this.config.apiUrl}PermissionManagement`);
139
- }
140
- get(idPermission) {
141
- return this.http.get(`${this.config.apiUrl}PermissionManagement/${idPermission}`);
142
- }
143
- save(permission) {
144
- return this.http.post(`${this.config.apiUrl}PermissionManagement`, permission);
145
- }
146
- delete(idPermission) {
147
- return this.http.delete(`${this.config.apiUrl}PermissionManagement/${idPermission}`);
148
- }
149
- }
150
- ManagementPermissionService.ɵfac = function ManagementPermissionService_Factory(t) { return new (t || ManagementPermissionService)(i0.ɵɵinject(i1$1.CaucaCoreService), i0.ɵɵinject(i2.HttpClient)); };
151
- ManagementPermissionService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ManagementPermissionService, factory: ManagementPermissionService.ɵfac, providedIn: 'root' });
152
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManagementPermissionService, [{
153
- type: Injectable,
154
- args: [{
155
- providedIn: 'root'
156
- }]
128
+ class ManagementPermissionService {
129
+ constructor(coreService, http) {
130
+ this.http = http;
131
+ this.config = coreService.getConfig();
132
+ }
133
+ getAll() {
134
+ return this.http.get(`${this.config.apiUrl}PermissionManagement`);
135
+ }
136
+ get(idPermission) {
137
+ return this.http.get(`${this.config.apiUrl}PermissionManagement/${idPermission}`);
138
+ }
139
+ save(permission) {
140
+ return this.http.post(`${this.config.apiUrl}PermissionManagement`, permission);
141
+ }
142
+ delete(idPermission) {
143
+ return this.http.delete(`${this.config.apiUrl}PermissionManagement/${idPermission}`);
144
+ }
145
+ }
146
+ ManagementPermissionService.ɵfac = function ManagementPermissionService_Factory(t) { return new (t || ManagementPermissionService)(i0.ɵɵinject(i1$1.CaucaCoreService), i0.ɵɵinject(i2.HttpClient)); };
147
+ ManagementPermissionService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ManagementPermissionService, factory: ManagementPermissionService.ɵfac, providedIn: 'root' });
148
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManagementPermissionService, [{
149
+ type: Injectable,
150
+ args: [{
151
+ providedIn: 'root'
152
+ }]
157
153
  }], function () { return [{ type: i1$1.CaucaCoreService }, { type: i2.HttpClient }]; }, null); })();
158
154
 
159
- function CaucaManagementGroupComponent_div_17_Template(rf, ctx) { if (rf & 1) {
160
- const _r4 = i0.ɵɵgetCurrentView();
161
- i0.ɵɵelementStart(0, "div");
162
- i0.ɵɵelementStart(1, "dx-tag-box", 13);
163
- i0.ɵɵlistener("onInitialized", function CaucaManagementGroupComponent_div_17_Template_dx_tag_box_onInitialized_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r4); const field_r2 = restoredCtx.$implicit; const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.getGroupUser(field_r2, $event); })("onValueChanged", function CaucaManagementGroupComponent_div_17_Template_dx_tag_box_onValueChanged_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r4); const field_r2 = restoredCtx.$implicit; const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.setGroupUser(field_r2, $event); });
164
- i0.ɵɵelementEnd();
165
- i0.ɵɵelementEnd();
166
- } if (rf & 2) {
167
- const ctx_r0 = i0.ɵɵnextContext();
168
- i0.ɵɵadvance(1);
169
- i0.ɵɵproperty("displayExpr", ctx_r0.fullName)("dataSource", ctx_r0.users)("searchEnabled", true)("searchExpr", ctx_r0.fullName);
170
- } }
171
- function CaucaManagementGroupComponent_div_18_div_2_Template(rf, ctx) { if (rf & 1) {
172
- const _r11 = i0.ɵɵgetCurrentView();
173
- i0.ɵɵelementStart(0, "div");
174
- i0.ɵɵelementStart(1, "dx-check-box", 15);
175
- i0.ɵɵlistener("onInitialized", function CaucaManagementGroupComponent_div_18_div_2_Template_dx_check_box_onInitialized_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r11); const permission_r8 = restoredCtx.$implicit; const field_r6 = i0.ɵɵnextContext().$implicit; const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.getPermissionStatus(field_r6, permission_r8, $event); })("onValueChanged", function CaucaManagementGroupComponent_div_18_div_2_Template_dx_check_box_onValueChanged_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r11); const permission_r8 = restoredCtx.$implicit; const field_r6 = i0.ɵɵnextContext().$implicit; const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.checkBoxToggled(field_r6, permission_r8, $event); });
176
- i0.ɵɵelementEnd();
177
- i0.ɵɵelementEnd();
178
- } if (rf & 2) {
179
- const permission_r8 = ctx.$implicit;
180
- i0.ɵɵadvance(1);
181
- i0.ɵɵproperty("text", permission_r8.name);
182
- } }
183
- const _c0 = function () { return ["name", "tag"]; };
184
- function CaucaManagementGroupComponent_div_18_Template(rf, ctx) { if (rf & 1) {
185
- i0.ɵɵelementStart(0, "div");
186
- i0.ɵɵelementStart(1, "dx-list", 14);
187
- i0.ɵɵtemplate(2, CaucaManagementGroupComponent_div_18_div_2_Template, 2, 1, "div", 12);
188
- i0.ɵɵelementEnd();
189
- i0.ɵɵelementEnd();
190
- } if (rf & 2) {
191
- const ctx_r1 = i0.ɵɵnextContext();
192
- i0.ɵɵadvance(1);
193
- i0.ɵɵproperty("dataSource", ctx_r1.permissions)("searchEnabled", true)("searchExpr", i0.ɵɵpureFunction0(5, _c0))("hoverStateEnabled", ctx_r1.hoverStatePermission);
194
- i0.ɵɵadvance(1);
195
- i0.ɵɵproperty("dxTemplateOf", "rowTemplate");
196
- } }
197
- class CaucaManagementGroupComponent {
198
- constructor(managementGroupService, managementUserService, managementPermissionService, breakpointObserver) {
199
- this.managementGroupService = managementGroupService;
200
- this.managementUserService = managementUserService;
201
- this.managementPermissionService = managementPermissionService;
202
- this.showPrintButton = true;
203
- this.hoverStatePermission = true;
204
- this.groups = [];
205
- this.users = [];
206
- this.permissions = [];
207
- this.userFullName = {};
208
- this.showColumn = true;
209
- this.showColumnXS = true;
210
- this.translations = [];
211
- this.calculateUsersCellValue = (e) => {
212
- const users = (e.users ? e.users : []);
213
- let usersNames = [];
214
- users.forEach((user) => {
215
- const userGroup = this.users.filter((u) => u.id === user.idUser);
216
- if (userGroup && userGroup[0]) {
217
- usersNames.push(userGroup[0].firstName + ' ' + userGroup[0].lastName);
218
- }
219
- });
220
- usersNames = usersNames.sort((one, two) => (one < two ? -1 : 1));
221
- return usersNames.join(', ');
222
- };
223
- this.groupNameAlreadyUsedValidation = (e) => this.managementGroupService.hasExistingGroupName(e.data).pipe(map((exist) => !exist)).toPromise();
224
- breakpointObserver.observe(['(max-width: 1000px)']).subscribe((result) => {
225
- this.showColumn = !result.matches;
226
- });
227
- breakpointObserver.observe(['(max-width: 600px)']).subscribe((result) => {
228
- this.showColumnXS = !result.matches;
229
- });
230
- }
231
- ngOnInit() {
232
- this.managementUserService.getAll().subscribe((data) => {
233
- this.users = data;
234
- this.users.forEach((user) => {
235
- if (user.isActive) {
236
- if (user.firstName !== '' && user.lastName !== '') {
237
- this.userFullName[user.id] = `${user.firstName} ${user.lastName}`;
238
- }
239
- }
240
- });
241
- });
242
- this.managementPermissionService.getAll().subscribe((permissions) => {
243
- const permissionIndex = permissions.findIndex((c) => c.tag === 'CanAccessPermissions');
244
- if (permissionIndex !== -1) {
245
- permissions.splice(permissionIndex, 1);
246
- }
247
- permissions.sort((a, b) => {
248
- if (a.name < b.name) {
249
- return -1;
250
- }
251
- if (a.name > b.name) {
252
- return 1;
253
- }
254
- return 0;
255
- });
256
- this.permissions = permissions;
257
- });
258
- this.getGroups();
259
- }
260
- fullName(data) {
261
- if (!data) {
262
- return '';
263
- }
264
- return `${data.firstName} ${data.lastName}`;
265
- }
266
- getGroupUser(field, e) {
267
- const users = [];
268
- if (this.groupUsers) {
269
- this.groupUsers.forEach((user) => {
270
- users.push(user.idUser);
271
- });
272
- }
273
- e.component.option('value', users);
274
- }
275
- setGroupUser(field, e) {
276
- const groupUser = [];
277
- e.value.forEach((idUser) => {
278
- const groupIndex = (field.data.users || []).findIndex((g) => g.idUser === idUser);
279
- if (groupIndex === -1) {
280
- groupUser.push({ idUser, });
281
- }
282
- else {
283
- groupUser.push(field.data.users[groupIndex]);
284
- }
285
- });
286
- field.setValue(JSON.parse(JSON.stringify(groupUser)));
287
- }
288
- setGroupPermission(field, e) {
289
- const groupUser = [];
290
- e.value.forEach((idUser) => {
291
- groupUser.push({
292
- idUser,
293
- });
294
- });
295
- field.setValue(JSON.parse(JSON.stringify(groupUser)));
296
- }
297
- getPermissionStatus(field, permission, e) {
298
- const groupPermission = (field.value || []).find((p) => p.idModulePermission === permission.id);
299
- if (groupPermission) {
300
- e.component.option('value', groupPermission.isAllowed);
301
- }
302
- else {
303
- e.component.option('value', undefined);
304
- }
305
- }
306
- checkBoxToggled(field, permission, e) {
307
- if (e.component.skipOnValueChanged) {
308
- e.component.skipOnValueChanged = false;
309
- return;
310
- }
311
- if (e.component.setUndefinedNextTime) {
312
- e.component.setUndefinedNextTime = false;
313
- e.component.skipOnValueChanged = true;
314
- e.component.option('value', undefined);
315
- this.setPermissionStatus(field, permission, undefined);
316
- return;
317
- }
318
- if (e.value === false) {
319
- e.component.setUndefinedNextTime = true;
320
- }
321
- this.setPermissionStatus(field, permission, e.value);
322
- }
323
- onRowInserted(e) {
324
- this.saveGroup(e.data);
325
- }
326
- onRowUpdated(e) {
327
- this.saveGroup(e.data);
328
- }
329
- onRowRemoved(e) {
330
- const group = e.data;
331
- this.managementGroupService.delete(group.id).subscribe(() => {
332
- this.getGroups();
333
- });
334
- }
335
- onEditingStart(e) {
336
- this.groupUsers = e.data.users;
337
- }
338
- onInitNewRow() {
339
- this.groupUsers = [];
340
- }
341
- setPermissionStatus(field, permission, value) {
342
- const groupPermissions = field.value || [];
343
- const groupIndex = groupPermissions.findIndex((p) => p.idModulePermission === permission.id);
344
- if (groupIndex > -1) {
345
- groupPermissions[groupIndex].isAllowed = value;
346
- }
347
- else {
348
- groupPermissions.push({
349
- idModulePermission: permission.id,
350
- isAllowed: value,
351
- });
352
- }
353
- field.setValue(JSON.parse(JSON.stringify(groupPermissions)));
354
- }
355
- saveGroup(group) {
356
- this.removePermissionUndefined(group);
357
- if (group.users) {
358
- group.users.forEach((userGroup) => {
359
- userGroup.idGroup = group.id;
360
- });
361
- }
362
- if (group.permissions) {
363
- group.permissions.forEach((groupPermission) => {
364
- groupPermission.idGroup = group.id;
365
- });
366
- }
367
- this.managementGroupService.save(group).subscribe(() => {
368
- this.getGroups();
369
- });
370
- this.groupUsers = [];
371
- }
372
- removePermissionUndefined(group) {
373
- group.permissions = group.permissions.filter((permission) => permission.isAllowed !== undefined);
374
- }
375
- getGroups() {
376
- this.managementGroupService.getAll().subscribe((data) => this.groups = data);
377
- }
378
- }
379
- CaucaManagementGroupComponent.ɵfac = function CaucaManagementGroupComponent_Factory(t) { return new (t || CaucaManagementGroupComponent)(i0.ɵɵdirectiveInject(ManagementGroupService), i0.ɵɵdirectiveInject(ManagementUserService), i0.ɵɵdirectiveInject(ManagementPermissionService), i0.ɵɵdirectiveInject(i4.BreakpointObserver)); };
380
- CaucaManagementGroupComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementGroupComponent, selectors: [["cauca-management-group"]], inputs: { showPrintButton: "showPrintButton", hoverStatePermission: "hoverStatePermission" }, decls: 19, vars: 31, consts: [["keyExpr", "id", 3, "allowPrint", "dataSource", "onRowInserted", "onInitNewRow", "onRowUpdated", "onEditingStart", "onRowRemoved"], ["dataField", "name", 3, "caption"], ["type", "async", 3, "message", "validationCallback"], ["dataField", "users", "editCellTemplate", "usersEditTemplate", 3, "caption", "calculateCellValue"], ["dataField", "permissions", "editCellTemplate", "permissionsEditTemplate", 3, "caption", "visible"], [3, "enabled"], ["mode", "popup", 3, "allowAdding", "allowUpdating", "allowDeleting", "useIcons"], [3, "showTitle", "title", "fullScreen"], ["colCount", "1", 3, "labelLocation"], ["dataField", "name", 3, "isRequired"], ["dataField", "users"], ["dataField", "permissions"], [4, "dxTemplate", "dxTemplateOf"], ["valueExpr", "id", 3, "displayExpr", "dataSource", "searchEnabled", "searchExpr", "onInitialized", "onValueChanged"], ["itemTemplate", "rowTemplate", 3, "dataSource", "searchEnabled", "searchExpr", "hoverStateEnabled"], [3, "text", "onInitialized", "onValueChanged"]], template: function CaucaManagementGroupComponent_Template(rf, ctx) { if (rf & 1) {
381
- i0.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
382
- i0.ɵɵlistener("onRowInserted", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowInserted_0_listener($event) { return ctx.onRowInserted($event); })("onInitNewRow", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onInitNewRow_0_listener() { return ctx.onInitNewRow(); })("onRowUpdated", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowUpdated_0_listener($event) { return ctx.onRowUpdated($event); })("onEditingStart", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onEditingStart_0_listener($event) { return ctx.onEditingStart($event); })("onRowRemoved", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowRemoved_0_listener($event) { return ctx.onRowRemoved($event); });
383
- i0.ɵɵelementStart(1, "dxi-column", 1);
384
- i0.ɵɵpipe(2, "translate");
385
- i0.ɵɵelement(3, "dxi-validation-rule", 2);
386
- i0.ɵɵpipe(4, "translate");
387
- i0.ɵɵelementEnd();
388
- i0.ɵɵelement(5, "dxi-column", 3);
389
- i0.ɵɵpipe(6, "translate");
390
- i0.ɵɵelement(7, "dxi-column", 4);
391
- i0.ɵɵpipe(8, "translate");
392
- i0.ɵɵelement(9, "dxo-export", 5);
393
- i0.ɵɵelementStart(10, "dxo-editing", 6);
394
- i0.ɵɵelement(11, "dxo-popup", 7);
395
- i0.ɵɵpipe(12, "translate");
396
- i0.ɵɵelementStart(13, "dxo-form", 8);
397
- i0.ɵɵelement(14, "dxi-item", 9);
398
- i0.ɵɵelement(15, "dxi-item", 10);
399
- i0.ɵɵelement(16, "dxi-item", 11);
400
- i0.ɵɵelementEnd();
401
- i0.ɵɵelementEnd();
402
- i0.ɵɵtemplate(17, CaucaManagementGroupComponent_div_17_Template, 2, 4, "div", 12);
403
- i0.ɵɵtemplate(18, CaucaManagementGroupComponent_div_18_Template, 3, 6, "div", 12);
404
- i0.ɵɵelementEnd();
405
- } if (rf & 2) {
406
- i0.ɵɵproperty("allowPrint", ctx.showPrintButton)("dataSource", ctx.groups);
407
- i0.ɵɵadvance(1);
408
- i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(2, 21, "management.name"));
409
- i0.ɵɵadvance(2);
410
- i0.ɵɵproperty("message", i0.ɵɵpipeBind1(4, 23, "management.groupNameAlreadyUsed"))("validationCallback", ctx.groupNameAlreadyUsedValidation);
411
- i0.ɵɵadvance(2);
412
- i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(6, 25, "management.users"))("calculateCellValue", ctx.calculateUsersCellValue);
413
- i0.ɵɵadvance(2);
414
- i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(8, 27, "management.permissions"))("visible", false);
415
- i0.ɵɵadvance(2);
416
- i0.ɵɵproperty("enabled", false);
417
- i0.ɵɵadvance(1);
418
- i0.ɵɵproperty("allowAdding", true)("allowUpdating", true)("allowDeleting", true)("useIcons", true);
419
- i0.ɵɵadvance(1);
420
- i0.ɵɵproperty("showTitle", true)("title", i0.ɵɵpipeBind1(12, 29, "management.group"))("fullScreen", !ctx.showColumn);
421
- i0.ɵɵadvance(2);
422
- i0.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
423
- i0.ɵɵadvance(1);
424
- i0.ɵɵproperty("isRequired", true);
425
- i0.ɵɵadvance(3);
426
- i0.ɵɵproperty("dxTemplateOf", "usersEditTemplate");
427
- i0.ɵɵadvance(1);
428
- i0.ɵɵproperty("dxTemplateOf", "permissionsEditTemplate");
429
- } }, directives: [i5.CaucaDataGridComponent, i6.DxiColumnComponent, i6.DxiValidationRuleComponent, i6.DxoExportComponent, i6.DxoEditingComponent, i6.DxoPopupComponent, i6.DxoFormComponent, i6.DxiItemComponent, i7.DxTemplateDirective, i8.DxTagBoxComponent, i9.DxListComponent, i10.DxCheckBoxComponent], pipes: [i1.TranslatePipe], styles: [""] });
430
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementGroupComponent, [{
431
- type: Component,
432
- args: [{
433
- selector: 'cauca-management-group',
434
- templateUrl: './cauca-management-group.component.html',
435
- styleUrls: ['./cauca-management-group.component.scss']
436
- }]
437
- }], function () { return [{ type: ManagementGroupService }, { type: ManagementUserService }, { type: ManagementPermissionService }, { type: i4.BreakpointObserver }]; }, { showPrintButton: [{
438
- type: Input
439
- }], hoverStatePermission: [{
440
- type: Input
155
+ function CaucaManagementGroupComponent_div_17_Template(rf, ctx) { if (rf & 1) {
156
+ const _r4 = i0.ɵɵgetCurrentView();
157
+ i0.ɵɵelementStart(0, "div")(1, "dx-tag-box", 13);
158
+ i0.ɵɵlistener("onInitialized", function CaucaManagementGroupComponent_div_17_Template_dx_tag_box_onInitialized_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r4); const field_r2 = restoredCtx.$implicit; const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.getGroupUser(field_r2, $event); })("onValueChanged", function CaucaManagementGroupComponent_div_17_Template_dx_tag_box_onValueChanged_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r4); const field_r2 = restoredCtx.$implicit; const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.setGroupUser(field_r2, $event); });
159
+ i0.ɵɵelementEnd()();
160
+ } if (rf & 2) {
161
+ const ctx_r0 = i0.ɵɵnextContext();
162
+ i0.ɵɵadvance(1);
163
+ i0.ɵɵproperty("displayExpr", ctx_r0.fullName)("dataSource", ctx_r0.users)("searchEnabled", true)("searchExpr", ctx_r0.fullName);
164
+ } }
165
+ function CaucaManagementGroupComponent_div_18_div_2_Template(rf, ctx) { if (rf & 1) {
166
+ const _r11 = i0.ɵɵgetCurrentView();
167
+ i0.ɵɵelementStart(0, "div")(1, "dx-check-box", 15);
168
+ i0.ɵɵlistener("onInitialized", function CaucaManagementGroupComponent_div_18_div_2_Template_dx_check_box_onInitialized_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r11); const permission_r8 = restoredCtx.$implicit; const field_r6 = i0.ɵɵnextContext().$implicit; const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.getPermissionStatus(field_r6, permission_r8, $event); })("onValueChanged", function CaucaManagementGroupComponent_div_18_div_2_Template_dx_check_box_onValueChanged_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r11); const permission_r8 = restoredCtx.$implicit; const field_r6 = i0.ɵɵnextContext().$implicit; const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.checkBoxToggled(field_r6, permission_r8, $event); });
169
+ i0.ɵɵelementEnd()();
170
+ } if (rf & 2) {
171
+ const permission_r8 = ctx.$implicit;
172
+ i0.ɵɵadvance(1);
173
+ i0.ɵɵproperty("text", permission_r8.name);
174
+ } }
175
+ const _c0 = function () { return ["name", "tag"]; };
176
+ function CaucaManagementGroupComponent_div_18_Template(rf, ctx) { if (rf & 1) {
177
+ i0.ɵɵelementStart(0, "div")(1, "dx-list", 14);
178
+ i0.ɵɵtemplate(2, CaucaManagementGroupComponent_div_18_div_2_Template, 2, 1, "div", 12);
179
+ i0.ɵɵelementEnd()();
180
+ } if (rf & 2) {
181
+ const ctx_r1 = i0.ɵɵnextContext();
182
+ i0.ɵɵadvance(1);
183
+ i0.ɵɵproperty("dataSource", ctx_r1.permissions)("searchEnabled", true)("searchExpr", i0.ɵɵpureFunction0(5, _c0))("hoverStateEnabled", ctx_r1.hoverStatePermission);
184
+ i0.ɵɵadvance(1);
185
+ i0.ɵɵproperty("dxTemplateOf", "rowTemplate");
186
+ } }
187
+ class CaucaManagementGroupComponent {
188
+ constructor(managementGroupService, managementUserService, managementPermissionService, breakpointObserver) {
189
+ this.managementGroupService = managementGroupService;
190
+ this.managementUserService = managementUserService;
191
+ this.managementPermissionService = managementPermissionService;
192
+ this.showPrintButton = true;
193
+ this.hoverStatePermission = true;
194
+ this.groups = [];
195
+ this.users = [];
196
+ this.permissions = [];
197
+ this.userFullName = {};
198
+ this.showColumn = true;
199
+ this.showColumnXS = true;
200
+ this.translations = [];
201
+ this.calculateUsersCellValue = (e) => {
202
+ const users = (e.users ? e.users : []);
203
+ let usersNames = [];
204
+ users.forEach((user) => {
205
+ const userGroup = this.users.filter((u) => u.id === user.idUser);
206
+ if (userGroup && userGroup[0]) {
207
+ usersNames.push(userGroup[0].firstName + ' ' + userGroup[0].lastName);
208
+ }
209
+ });
210
+ usersNames = usersNames.sort((one, two) => (one < two ? -1 : 1));
211
+ return usersNames.join(', ');
212
+ };
213
+ this.groupNameAlreadyUsedValidation = (e) => this.managementGroupService.hasExistingGroupName(e.data).pipe(map((exist) => !exist)).toPromise();
214
+ breakpointObserver.observe(['(max-width: 1000px)']).subscribe((result) => {
215
+ this.showColumn = !result.matches;
216
+ });
217
+ breakpointObserver.observe(['(max-width: 600px)']).subscribe((result) => {
218
+ this.showColumnXS = !result.matches;
219
+ });
220
+ }
221
+ ngOnInit() {
222
+ this.managementUserService.getAll().subscribe((data) => {
223
+ this.users = data;
224
+ this.users.forEach((user) => {
225
+ if (user.isActive) {
226
+ if (user.firstName !== '' && user.lastName !== '') {
227
+ this.userFullName[user.id] = `${user.firstName} ${user.lastName}`;
228
+ }
229
+ }
230
+ });
231
+ });
232
+ this.managementPermissionService.getAll().subscribe((permissions) => {
233
+ const permissionIndex = permissions.findIndex((c) => c.tag === 'CanAccessPermissions');
234
+ if (permissionIndex !== -1) {
235
+ permissions.splice(permissionIndex, 1);
236
+ }
237
+ permissions.sort((a, b) => {
238
+ if (a.name < b.name) {
239
+ return -1;
240
+ }
241
+ if (a.name > b.name) {
242
+ return 1;
243
+ }
244
+ return 0;
245
+ });
246
+ this.permissions = permissions;
247
+ });
248
+ this.getGroups();
249
+ }
250
+ fullName(data) {
251
+ if (!data) {
252
+ return '';
253
+ }
254
+ return `${data.firstName} ${data.lastName}`;
255
+ }
256
+ getGroupUser(field, e) {
257
+ const users = [];
258
+ if (this.groupUsers) {
259
+ this.groupUsers.forEach((user) => {
260
+ users.push(user.idUser);
261
+ });
262
+ }
263
+ e.component.option('value', users);
264
+ }
265
+ setGroupUser(field, e) {
266
+ const groupUser = [];
267
+ e.value.forEach((idUser) => {
268
+ const groupIndex = (field.data.users || []).findIndex((g) => g.idUser === idUser);
269
+ if (groupIndex === -1) {
270
+ groupUser.push({ idUser, });
271
+ }
272
+ else {
273
+ groupUser.push(field.data.users[groupIndex]);
274
+ }
275
+ });
276
+ field.setValue(JSON.parse(JSON.stringify(groupUser)));
277
+ }
278
+ setGroupPermission(field, e) {
279
+ const groupUser = [];
280
+ e.value.forEach((idUser) => {
281
+ groupUser.push({
282
+ idUser,
283
+ });
284
+ });
285
+ field.setValue(JSON.parse(JSON.stringify(groupUser)));
286
+ }
287
+ getPermissionStatus(field, permission, e) {
288
+ const groupPermission = (field.value || []).find((p) => p.idModulePermission === permission.id);
289
+ if (groupPermission) {
290
+ e.component.option('value', groupPermission.isAllowed);
291
+ }
292
+ else {
293
+ e.component.option('value', undefined);
294
+ }
295
+ }
296
+ checkBoxToggled(field, permission, e) {
297
+ if (e.component.skipOnValueChanged) {
298
+ e.component.skipOnValueChanged = false;
299
+ return;
300
+ }
301
+ if (e.component.setUndefinedNextTime) {
302
+ e.component.setUndefinedNextTime = false;
303
+ e.component.skipOnValueChanged = true;
304
+ e.component.option('value', undefined);
305
+ this.setPermissionStatus(field, permission, undefined);
306
+ return;
307
+ }
308
+ if (e.value === false) {
309
+ e.component.setUndefinedNextTime = true;
310
+ }
311
+ this.setPermissionStatus(field, permission, e.value);
312
+ }
313
+ onRowInserted(e) {
314
+ this.saveGroup(e.data);
315
+ }
316
+ onRowUpdated(e) {
317
+ this.saveGroup(e.data);
318
+ }
319
+ onRowRemoved(e) {
320
+ const group = e.data;
321
+ this.managementGroupService.delete(group.id).subscribe(() => {
322
+ this.getGroups();
323
+ });
324
+ }
325
+ onEditingStart(e) {
326
+ this.groupUsers = e.data.users;
327
+ }
328
+ onInitNewRow() {
329
+ this.groupUsers = [];
330
+ }
331
+ setPermissionStatus(field, permission, value) {
332
+ const groupPermissions = field.value || [];
333
+ const groupIndex = groupPermissions.findIndex((p) => p.idModulePermission === permission.id);
334
+ if (groupIndex > -1) {
335
+ groupPermissions[groupIndex].isAllowed = value;
336
+ }
337
+ else {
338
+ groupPermissions.push({
339
+ idModulePermission: permission.id,
340
+ isAllowed: value,
341
+ });
342
+ }
343
+ field.setValue(JSON.parse(JSON.stringify(groupPermissions)));
344
+ }
345
+ saveGroup(group) {
346
+ this.removePermissionUndefined(group);
347
+ if (group.users) {
348
+ group.users.forEach((userGroup) => {
349
+ userGroup.idGroup = group.id;
350
+ });
351
+ }
352
+ if (group.permissions) {
353
+ group.permissions.forEach((groupPermission) => {
354
+ groupPermission.idGroup = group.id;
355
+ });
356
+ }
357
+ this.managementGroupService.save(group).subscribe(() => {
358
+ this.getGroups();
359
+ });
360
+ this.groupUsers = [];
361
+ }
362
+ removePermissionUndefined(group) {
363
+ group.permissions = group.permissions.filter((permission) => permission.isAllowed !== undefined);
364
+ }
365
+ getGroups() {
366
+ this.managementGroupService.getAll().subscribe((data) => this.groups = data);
367
+ }
368
+ }
369
+ CaucaManagementGroupComponent.ɵfac = function CaucaManagementGroupComponent_Factory(t) { return new (t || CaucaManagementGroupComponent)(i0.ɵɵdirectiveInject(ManagementGroupService), i0.ɵɵdirectiveInject(ManagementUserService), i0.ɵɵdirectiveInject(ManagementPermissionService), i0.ɵɵdirectiveInject(i4.BreakpointObserver)); };
370
+ CaucaManagementGroupComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementGroupComponent, selectors: [["cauca-management-group"]], inputs: { showPrintButton: "showPrintButton", hoverStatePermission: "hoverStatePermission" }, decls: 19, vars: 31, consts: [["keyExpr", "id", 3, "allowPrint", "dataSource", "onRowInserted", "onInitNewRow", "onRowUpdated", "onEditingStart", "onRowRemoved"], ["dataField", "name", 3, "caption"], ["type", "async", 3, "message", "validationCallback"], ["dataField", "users", "editCellTemplate", "usersEditTemplate", 3, "caption", "calculateCellValue"], ["dataField", "permissions", "editCellTemplate", "permissionsEditTemplate", 3, "caption", "visible"], [3, "enabled"], ["mode", "popup", 3, "allowAdding", "allowUpdating", "allowDeleting", "useIcons"], [3, "showTitle", "title", "fullScreen"], ["colCount", "1", 3, "labelLocation"], ["dataField", "name", 3, "isRequired"], ["dataField", "users"], ["dataField", "permissions"], [4, "dxTemplate", "dxTemplateOf"], ["valueExpr", "id", 3, "displayExpr", "dataSource", "searchEnabled", "searchExpr", "onInitialized", "onValueChanged"], ["itemTemplate", "rowTemplate", 3, "dataSource", "searchEnabled", "searchExpr", "hoverStateEnabled"], [3, "text", "onInitialized", "onValueChanged"]], template: function CaucaManagementGroupComponent_Template(rf, ctx) { if (rf & 1) {
371
+ i0.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
372
+ i0.ɵɵlistener("onRowInserted", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowInserted_0_listener($event) { return ctx.onRowInserted($event); })("onInitNewRow", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onInitNewRow_0_listener() { return ctx.onInitNewRow(); })("onRowUpdated", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowUpdated_0_listener($event) { return ctx.onRowUpdated($event); })("onEditingStart", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onEditingStart_0_listener($event) { return ctx.onEditingStart($event); })("onRowRemoved", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowRemoved_0_listener($event) { return ctx.onRowRemoved($event); });
373
+ i0.ɵɵelementStart(1, "dxi-column", 1);
374
+ i0.ɵɵpipe(2, "translate");
375
+ i0.ɵɵelement(3, "dxi-validation-rule", 2);
376
+ i0.ɵɵpipe(4, "translate");
377
+ i0.ɵɵelementEnd();
378
+ i0.ɵɵelement(5, "dxi-column", 3);
379
+ i0.ɵɵpipe(6, "translate");
380
+ i0.ɵɵelement(7, "dxi-column", 4);
381
+ i0.ɵɵpipe(8, "translate");
382
+ i0.ɵɵelement(9, "dxo-export", 5);
383
+ i0.ɵɵelementStart(10, "dxo-editing", 6);
384
+ i0.ɵɵelement(11, "dxo-popup", 7);
385
+ i0.ɵɵpipe(12, "translate");
386
+ i0.ɵɵelementStart(13, "dxo-form", 8);
387
+ i0.ɵɵelement(14, "dxi-item", 9)(15, "dxi-item", 10)(16, "dxi-item", 11);
388
+ i0.ɵɵelementEnd()();
389
+ i0.ɵɵtemplate(17, CaucaManagementGroupComponent_div_17_Template, 2, 4, "div", 12);
390
+ i0.ɵɵtemplate(18, CaucaManagementGroupComponent_div_18_Template, 3, 6, "div", 12);
391
+ i0.ɵɵelementEnd();
392
+ } if (rf & 2) {
393
+ i0.ɵɵproperty("allowPrint", ctx.showPrintButton)("dataSource", ctx.groups);
394
+ i0.ɵɵadvance(1);
395
+ i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(2, 21, "management.name"));
396
+ i0.ɵɵadvance(2);
397
+ i0.ɵɵproperty("message", i0.ɵɵpipeBind1(4, 23, "management.groupNameAlreadyUsed"))("validationCallback", ctx.groupNameAlreadyUsedValidation);
398
+ i0.ɵɵadvance(2);
399
+ i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(6, 25, "management.users"))("calculateCellValue", ctx.calculateUsersCellValue);
400
+ i0.ɵɵadvance(2);
401
+ i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(8, 27, "management.permissions"))("visible", false);
402
+ i0.ɵɵadvance(2);
403
+ i0.ɵɵproperty("enabled", false);
404
+ i0.ɵɵadvance(1);
405
+ i0.ɵɵproperty("allowAdding", true)("allowUpdating", true)("allowDeleting", true)("useIcons", true);
406
+ i0.ɵɵadvance(1);
407
+ i0.ɵɵproperty("showTitle", true)("title", i0.ɵɵpipeBind1(12, 29, "management.group"))("fullScreen", !ctx.showColumn);
408
+ i0.ɵɵadvance(2);
409
+ i0.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
410
+ i0.ɵɵadvance(1);
411
+ i0.ɵɵproperty("isRequired", true);
412
+ i0.ɵɵadvance(3);
413
+ i0.ɵɵproperty("dxTemplateOf", "usersEditTemplate");
414
+ i0.ɵɵadvance(1);
415
+ i0.ɵɵproperty("dxTemplateOf", "permissionsEditTemplate");
416
+ } }, directives: [i5.CaucaDataGridComponent, i6.DxiColumnComponent, i6.DxiValidationRuleComponent, i6.DxoExportComponent, i6.DxoEditingComponent, i6.DxoPopupComponent, i6.DxoFormComponent, i6.DxiItemComponent, i7.DxTemplateDirective, i8.DxTagBoxComponent, i9.DxListComponent, i10.DxCheckBoxComponent], pipes: [i1.TranslatePipe], styles: [""] });
417
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementGroupComponent, [{
418
+ type: Component,
419
+ args: [{ selector: 'cauca-management-group', template: "<cauca-dx-data-grid [allowPrint]=\"showPrintButton\" keyExpr=\"id\" [dataSource]=\"groups\"\n (onRowInserted)=\"onRowInserted($event)\" (onInitNewRow)=\"onInitNewRow()\" (onRowUpdated)=\"onRowUpdated($event)\"\n (onEditingStart)=\"onEditingStart($event)\" (onRowRemoved)=\"onRowRemoved($event)\">\n\n <dxi-column dataField=\"name\" [caption]=\"'management.name' | translate\">\n <dxi-validation-rule type=\"async\" [message]=\"'management.groupNameAlreadyUsed' | translate\"\n [validationCallback]=\"groupNameAlreadyUsedValidation\"></dxi-validation-rule>\n </dxi-column>\n <dxi-column dataField=\"users\" [caption]=\"'management.users' | translate\" editCellTemplate=\"usersEditTemplate\"\n [calculateCellValue]=\"calculateUsersCellValue\">\n </dxi-column>\n <dxi-column dataField=\"permissions\" [caption]=\"'management.permissions' | translate\" [visible]=\"false\"\n editCellTemplate=\"permissionsEditTemplate\">\n </dxi-column>\n <dxo-export [enabled]=\"false\"></dxo-export>\n <dxo-editing mode=\"popup\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\" [useIcons]=\"true\">\n <dxo-popup [showTitle]=\"true\" [title]=\"'management.group' | translate\" [fullScreen]=\"!showColumn\"></dxo-popup>\n <dxo-form colCount=\"1\" [labelLocation]=\"showColumnXS ? 'left' : 'top'\">\n <dxi-item dataField=\"name\" [isRequired]=\"true\"></dxi-item>\n <dxi-item dataField=\"users\"></dxi-item>\n <dxi-item dataField=\"permissions\"></dxi-item>\n </dxo-form>\n </dxo-editing>\n\n <div *dxTemplate=\"let field of 'usersEditTemplate'\">\n <dx-tag-box valueExpr=\"id\" [displayExpr]=\"fullName\" [dataSource]=\"users\" [searchEnabled]=\"true\"\n [searchExpr]=\"fullName\" (onInitialized)=\"getGroupUser(field, $event)\"\n (onValueChanged)=\"setGroupUser(field, $event)\">\n </dx-tag-box>\n </div>\n <div *dxTemplate=\"let field of 'permissionsEditTemplate'\">\n <dx-list [dataSource]=\"permissions\" itemTemplate=\"rowTemplate\" [searchEnabled]=\"true\"\n [searchExpr]=\"['name', 'tag']\" [hoverStateEnabled]=\"hoverStatePermission\">\n <div *dxTemplate=\"let permission of 'rowTemplate'\">\n <dx-check-box [text]=\"permission.name\" (onInitialized)=\"getPermissionStatus(field, permission, $event)\"\n (onValueChanged)=\"checkBoxToggled(field, permission, $event)\">\n </dx-check-box>\n </div>\n </dx-list>\n </div>\n</cauca-dx-data-grid>", styles: [""] }]
420
+ }], function () { return [{ type: ManagementGroupService }, { type: ManagementUserService }, { type: ManagementPermissionService }, { type: i4.BreakpointObserver }]; }, { showPrintButton: [{
421
+ type: Input
422
+ }], hoverStatePermission: [{
423
+ type: Input
441
424
  }] }); })();
442
425
 
443
- class UserModel {
444
- constructor() {
445
- this.userName = '';
446
- this.firstName = '';
447
- this.lastName = '';
448
- this.password = '';
449
- this.email = '';
450
- this.isActive = true;
451
- this.twoFactorAuthenticatorEnabled = false;
452
- }
426
+ class UserModel {
427
+ constructor() {
428
+ this.userName = '';
429
+ this.firstName = '';
430
+ this.lastName = '';
431
+ this.password = '';
432
+ this.email = '';
433
+ this.isActive = true;
434
+ this.twoFactorAuthenticatorEnabled = false;
435
+ }
453
436
  }
454
437
 
455
- class CaucaManagementUserComponent {
456
- constructor(managementUserService, breakpointObserver) {
457
- this.managementUserService = managementUserService;
458
- this.users = [
459
- new UserModel()
460
- ];
461
- this.showColumnXS = true;
462
- this.userNameAlreadyUsedValidation = (e) => this.managementUserService.hasExistingUserName(e.data).pipe(map((exist) => !exist)).toPromise();
463
- breakpointObserver.observe(['(max-width: 600px)']).subscribe((result) => {
464
- this.showColumnXS = !result.matches;
465
- });
466
- }
467
- ngOnInit() {
468
- this.getUsers();
469
- }
470
- onRowInserted(e) {
471
- this.saveGroup(e.data);
472
- }
473
- onRowUpdated(e) {
474
- this.saveGroup(e.key);
475
- }
476
- onRowRemoved(e) {
477
- const user = e.data;
478
- this.managementUserService.delete(user.id).subscribe((data) => {
479
- this.getUsers();
480
- });
481
- }
482
- saveGroup(user) {
483
- this.managementUserService.save(user).subscribe(() => {
484
- this.getUsers();
485
- });
486
- }
487
- getUsers() {
488
- this.managementUserService.getAll().subscribe((data) => this.users = data);
489
- }
490
- }
491
- CaucaManagementUserComponent.ɵfac = function CaucaManagementUserComponent_Factory(t) { return new (t || CaucaManagementUserComponent)(i0.ɵɵdirectiveInject(ManagementUserService), i0.ɵɵdirectiveInject(i4.BreakpointObserver)); };
492
- CaucaManagementUserComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementUserComponent, selectors: [["cauca-management-user"]], decls: 22, vars: 31, consts: [["keyExpr", "id", 3, "dataSource", "onRowInserted", "onRowUpdated", "onRowRemoved"], ["dataField", "userName", 3, "caption"], ["type", "async", 3, "message", "validationCallback"], ["dataField", "isActive", 3, "caption", "visible"], ["dataField", "firstName", 3, "caption"], ["dataField", "lastName", 3, "caption"], ["dataField", "groups", 3, "caption"], ["mode", "popup", 3, "allowAdding", "allowUpdating", "allowDeleting", "useIcons"], [3, "showTitle", "title"], ["colCount", "2", 3, "labelLocation"], ["dataField", "userName", 3, "isRequired"], ["dataField", "isActive"], ["dataField", "firstName"], ["dataField", "lastName"], ["dataField", "group"]], template: function CaucaManagementUserComponent_Template(rf, ctx) { if (rf & 1) {
493
- i0.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
494
- i0.ɵɵlistener("onRowInserted", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowInserted_0_listener($event) { return ctx.onRowInserted($event); })("onRowUpdated", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowUpdated_0_listener($event) { return ctx.onRowUpdated($event); })("onRowRemoved", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowRemoved_0_listener($event) { return ctx.onRowRemoved($event); });
495
- i0.ɵɵelementStart(1, "dxi-column", 1);
496
- i0.ɵɵpipe(2, "translate");
497
- i0.ɵɵelement(3, "dxi-validation-rule", 2);
498
- i0.ɵɵpipe(4, "translate");
499
- i0.ɵɵelementEnd();
500
- i0.ɵɵelement(5, "dxi-column", 3);
501
- i0.ɵɵpipe(6, "translate");
502
- i0.ɵɵelement(7, "dxi-column", 4);
503
- i0.ɵɵpipe(8, "translate");
504
- i0.ɵɵelement(9, "dxi-column", 5);
505
- i0.ɵɵpipe(10, "translate");
506
- i0.ɵɵelement(11, "dxi-column", 6);
507
- i0.ɵɵpipe(12, "translate");
508
- i0.ɵɵelementStart(13, "dxo-editing", 7);
509
- i0.ɵɵelement(14, "dxo-popup", 8);
510
- i0.ɵɵpipe(15, "translate");
511
- i0.ɵɵelementStart(16, "dxo-form", 9);
512
- i0.ɵɵelement(17, "dxi-item", 10);
513
- i0.ɵɵelement(18, "dxi-item", 11);
514
- i0.ɵɵelement(19, "dxi-item", 12);
515
- i0.ɵɵelement(20, "dxi-item", 13);
516
- i0.ɵɵelement(21, "dxi-item", 14);
517
- i0.ɵɵelementEnd();
518
- i0.ɵɵelementEnd();
519
- i0.ɵɵelementEnd();
520
- } if (rf & 2) {
521
- i0.ɵɵproperty("dataSource", ctx.users);
522
- i0.ɵɵadvance(1);
523
- i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(2, 17, "management.userName"));
524
- i0.ɵɵadvance(2);
525
- i0.ɵɵproperty("message", i0.ɵɵpipeBind1(4, 19, "management.userNameAlreadyUsed"))("validationCallback", ctx.userNameAlreadyUsedValidation);
526
- i0.ɵɵadvance(2);
527
- i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(6, 21, "management.isActive"))("visible", false);
528
- i0.ɵɵadvance(2);
529
- i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(8, 23, "management.firstName"));
530
- i0.ɵɵadvance(2);
531
- i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(10, 25, "management.lastName"));
532
- i0.ɵɵadvance(2);
533
- i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(12, 27, "management.group"));
534
- i0.ɵɵadvance(2);
535
- i0.ɵɵproperty("allowAdding", true)("allowUpdating", true)("allowDeleting", true)("useIcons", true);
536
- i0.ɵɵadvance(1);
537
- i0.ɵɵproperty("showTitle", true)("title", i0.ɵɵpipeBind1(15, 29, "management.group"));
538
- i0.ɵɵadvance(2);
539
- i0.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
540
- i0.ɵɵadvance(1);
541
- i0.ɵɵproperty("isRequired", true);
542
- } }, directives: [i5.CaucaDataGridComponent, i6.DxiColumnComponent, i6.DxiValidationRuleComponent, i6.DxoEditingComponent, i6.DxoPopupComponent, i6.DxoFormComponent, i6.DxiItemComponent], pipes: [i1.TranslatePipe], styles: [""] });
543
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementUserComponent, [{
544
- type: Component,
545
- args: [{
546
- selector: 'cauca-management-user',
547
- templateUrl: './cauca-management-user.component.html',
548
- styleUrls: ['./cauca-management-user.component.scss']
549
- }]
438
+ class CaucaManagementUserComponent {
439
+ constructor(managementUserService, breakpointObserver) {
440
+ this.managementUserService = managementUserService;
441
+ this.users = [
442
+ new UserModel()
443
+ ];
444
+ this.showColumnXS = true;
445
+ this.userNameAlreadyUsedValidation = (e) => this.managementUserService.hasExistingUserName(e.data).pipe(map((exist) => !exist)).toPromise();
446
+ breakpointObserver.observe(['(max-width: 600px)']).subscribe((result) => {
447
+ this.showColumnXS = !result.matches;
448
+ });
449
+ }
450
+ ngOnInit() {
451
+ this.getUsers();
452
+ }
453
+ onRowInserted(e) {
454
+ this.saveGroup(e.data);
455
+ }
456
+ onRowUpdated(e) {
457
+ this.saveGroup(e.key);
458
+ }
459
+ onRowRemoved(e) {
460
+ const user = e.data;
461
+ this.managementUserService.delete(user.id).subscribe((data) => {
462
+ this.getUsers();
463
+ });
464
+ }
465
+ saveGroup(user) {
466
+ this.managementUserService.save(user).subscribe(() => {
467
+ this.getUsers();
468
+ });
469
+ }
470
+ getUsers() {
471
+ this.managementUserService.getAll().subscribe((data) => this.users = data);
472
+ }
473
+ }
474
+ CaucaManagementUserComponent.ɵfac = function CaucaManagementUserComponent_Factory(t) { return new (t || CaucaManagementUserComponent)(i0.ɵɵdirectiveInject(ManagementUserService), i0.ɵɵdirectiveInject(i4.BreakpointObserver)); };
475
+ CaucaManagementUserComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementUserComponent, selectors: [["cauca-management-user"]], decls: 22, vars: 31, consts: [["keyExpr", "id", 3, "dataSource", "onRowInserted", "onRowUpdated", "onRowRemoved"], ["dataField", "userName", 3, "caption"], ["type", "async", 3, "message", "validationCallback"], ["dataField", "isActive", 3, "caption", "visible"], ["dataField", "firstName", 3, "caption"], ["dataField", "lastName", 3, "caption"], ["dataField", "groups", 3, "caption"], ["mode", "popup", 3, "allowAdding", "allowUpdating", "allowDeleting", "useIcons"], [3, "showTitle", "title"], ["colCount", "2", 3, "labelLocation"], ["dataField", "userName", 3, "isRequired"], ["dataField", "isActive"], ["dataField", "firstName"], ["dataField", "lastName"], ["dataField", "group"]], template: function CaucaManagementUserComponent_Template(rf, ctx) { if (rf & 1) {
476
+ i0.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
477
+ i0.ɵɵlistener("onRowInserted", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowInserted_0_listener($event) { return ctx.onRowInserted($event); })("onRowUpdated", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowUpdated_0_listener($event) { return ctx.onRowUpdated($event); })("onRowRemoved", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowRemoved_0_listener($event) { return ctx.onRowRemoved($event); });
478
+ i0.ɵɵelementStart(1, "dxi-column", 1);
479
+ i0.ɵɵpipe(2, "translate");
480
+ i0.ɵɵelement(3, "dxi-validation-rule", 2);
481
+ i0.ɵɵpipe(4, "translate");
482
+ i0.ɵɵelementEnd();
483
+ i0.ɵɵelement(5, "dxi-column", 3);
484
+ i0.ɵɵpipe(6, "translate");
485
+ i0.ɵɵelement(7, "dxi-column", 4);
486
+ i0.ɵɵpipe(8, "translate");
487
+ i0.ɵɵelement(9, "dxi-column", 5);
488
+ i0.ɵɵpipe(10, "translate");
489
+ i0.ɵɵelement(11, "dxi-column", 6);
490
+ i0.ɵɵpipe(12, "translate");
491
+ i0.ɵɵelementStart(13, "dxo-editing", 7);
492
+ i0.ɵɵelement(14, "dxo-popup", 8);
493
+ i0.ɵɵpipe(15, "translate");
494
+ i0.ɵɵelementStart(16, "dxo-form", 9);
495
+ i0.ɵɵelement(17, "dxi-item", 10)(18, "dxi-item", 11)(19, "dxi-item", 12)(20, "dxi-item", 13)(21, "dxi-item", 14);
496
+ i0.ɵɵelementEnd()()();
497
+ } if (rf & 2) {
498
+ i0.ɵɵproperty("dataSource", ctx.users);
499
+ i0.ɵɵadvance(1);
500
+ i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(2, 17, "management.userName"));
501
+ i0.ɵɵadvance(2);
502
+ i0.ɵɵproperty("message", i0.ɵɵpipeBind1(4, 19, "management.userNameAlreadyUsed"))("validationCallback", ctx.userNameAlreadyUsedValidation);
503
+ i0.ɵɵadvance(2);
504
+ i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(6, 21, "management.isActive"))("visible", false);
505
+ i0.ɵɵadvance(2);
506
+ i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(8, 23, "management.firstName"));
507
+ i0.ɵɵadvance(2);
508
+ i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(10, 25, "management.lastName"));
509
+ i0.ɵɵadvance(2);
510
+ i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(12, 27, "management.group"));
511
+ i0.ɵɵadvance(2);
512
+ i0.ɵɵproperty("allowAdding", true)("allowUpdating", true)("allowDeleting", true)("useIcons", true);
513
+ i0.ɵɵadvance(1);
514
+ i0.ɵɵproperty("showTitle", true)("title", i0.ɵɵpipeBind1(15, 29, "management.group"));
515
+ i0.ɵɵadvance(2);
516
+ i0.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
517
+ i0.ɵɵadvance(1);
518
+ i0.ɵɵproperty("isRequired", true);
519
+ } }, directives: [i5.CaucaDataGridComponent, i6.DxiColumnComponent, i6.DxiValidationRuleComponent, i6.DxoEditingComponent, i6.DxoPopupComponent, i6.DxoFormComponent, i6.DxiItemComponent], pipes: [i1.TranslatePipe], styles: [""] });
520
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementUserComponent, [{
521
+ type: Component,
522
+ args: [{ selector: 'cauca-management-user', template: "<cauca-dx-data-grid\n keyExpr=\"id\"\n [dataSource]=\"users\"\n (onRowInserted)=\"onRowInserted($event)\"\n (onRowUpdated)=\"onRowUpdated($event)\"\n (onRowRemoved)=\"onRowRemoved($event)\">\n\n <dxi-column dataField=\"userName\" [caption]=\"'management.userName' | translate\">\n <dxi-validation-rule type=\"async\" [message]=\"'management.userNameAlreadyUsed' | translate\" [validationCallback]=\"userNameAlreadyUsedValidation\"></dxi-validation-rule>\n </dxi-column>\n <dxi-column dataField=\"isActive\" [caption]=\"'management.isActive' | translate\" [visible]=\"false\"></dxi-column>\n <dxi-column dataField=\"firstName\" [caption]=\"'management.firstName' | translate\"></dxi-column>\n <dxi-column dataField=\"lastName\" [caption]=\"'management.lastName' | translate\"></dxi-column>\n <dxi-column dataField=\"groups\" [caption]=\"'management.group' | translate\"></dxi-column>\n\n <dxo-editing mode=\"popup\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\" [useIcons]=\"true\">\n <dxo-popup [showTitle]=\"true\" [title]=\"'management.group' | translate\"></dxo-popup>\n <dxo-form colCount=\"2\" [labelLocation]=\"showColumnXS ? 'left' : 'top'\">\n <dxi-item dataField=\"userName\" [isRequired]=\"true\"></dxi-item>\n <dxi-item dataField=\"isActive\"></dxi-item>\n <dxi-item dataField=\"firstName\"></dxi-item>\n <dxi-item dataField=\"lastName\"></dxi-item>\n <dxi-item dataField=\"group\"></dxi-item>\n </dxo-form>\n </dxo-editing>\n</cauca-dx-data-grid>\n", styles: [""] }]
550
523
  }], function () { return [{ type: ManagementUserService }, { type: i4.BreakpointObserver }]; }, null); })();
551
524
 
552
- class CaucaManagementModule {
553
- }
554
- CaucaManagementModule.ɵfac = function CaucaManagementModule_Factory(t) { return new (t || CaucaManagementModule)(); };
555
- CaucaManagementModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CaucaManagementModule });
556
- CaucaManagementModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
557
- CommonModule,
558
- DxCheckBoxModule,
559
- DxListModule,
560
- DxTagBoxModule,
561
- CaucaCoreForChildModule,
562
- CaucaDevextremeModule,
563
- ]] });
564
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementModule, [{
565
- type: NgModule,
566
- args: [{
567
- declarations: [
568
- CaucaManagementComponent,
569
- CaucaManagementGroupComponent,
570
- CaucaManagementUserComponent
571
- ],
572
- imports: [
573
- CommonModule,
574
- DxCheckBoxModule,
575
- DxListModule,
576
- DxTagBoxModule,
577
- CaucaCoreForChildModule,
578
- CaucaDevextremeModule,
579
- ],
580
- exports: [
581
- CaucaManagementComponent,
582
- CaucaManagementUserComponent,
583
- CaucaManagementGroupComponent,
584
- ]
585
- }]
586
- }], null, null); })();
587
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CaucaManagementModule, { declarations: [CaucaManagementComponent,
588
- CaucaManagementGroupComponent,
589
- CaucaManagementUserComponent], imports: [CommonModule,
590
- DxCheckBoxModule,
591
- DxListModule,
592
- DxTagBoxModule,
593
- CaucaCoreForChildModule,
594
- CaucaDevextremeModule], exports: [CaucaManagementComponent,
595
- CaucaManagementUserComponent,
525
+ class CaucaManagementModule {
526
+ }
527
+ CaucaManagementModule.ɵfac = function CaucaManagementModule_Factory(t) { return new (t || CaucaManagementModule)(); };
528
+ CaucaManagementModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CaucaManagementModule });
529
+ CaucaManagementModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
530
+ CommonModule,
531
+ DxCheckBoxModule,
532
+ DxListModule,
533
+ DxTagBoxModule,
534
+ CaucaCoreForChildModule,
535
+ CaucaDevextremeModule,
536
+ ]] });
537
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementModule, [{
538
+ type: NgModule,
539
+ args: [{
540
+ declarations: [
541
+ CaucaManagementComponent,
542
+ CaucaManagementGroupComponent,
543
+ CaucaManagementUserComponent
544
+ ],
545
+ imports: [
546
+ CommonModule,
547
+ DxCheckBoxModule,
548
+ DxListModule,
549
+ DxTagBoxModule,
550
+ CaucaCoreForChildModule,
551
+ CaucaDevextremeModule,
552
+ ],
553
+ exports: [
554
+ CaucaManagementComponent,
555
+ CaucaManagementUserComponent,
556
+ CaucaManagementGroupComponent,
557
+ ]
558
+ }]
559
+ }], null, null); })();
560
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CaucaManagementModule, { declarations: [CaucaManagementComponent,
561
+ CaucaManagementGroupComponent,
562
+ CaucaManagementUserComponent], imports: [CommonModule,
563
+ DxCheckBoxModule,
564
+ DxListModule,
565
+ DxTagBoxModule,
566
+ CaucaCoreForChildModule,
567
+ CaucaDevextremeModule], exports: [CaucaManagementComponent,
568
+ CaucaManagementUserComponent,
596
569
  CaucaManagementGroupComponent] }); })();
597
570
 
598
- class UserGroupModel {
599
- constructor() {
600
- this.idUserGroup = '';
601
- this.idGroup = '';
602
- this.idUser = '';
603
- }
571
+ class UserGroupModel {
572
+ constructor() {
573
+ this.idUserGroup = '';
574
+ this.idGroup = '';
575
+ this.idUser = '';
576
+ }
604
577
  }
605
578
 
606
- class UserPermissionModel {
607
- constructor() {
608
- this.idUserPermission = '';
609
- this.isAllowed = false;
610
- this.idUser = '';
611
- this.idModulePermission = '';
612
- }
579
+ class UserPermissionModel {
580
+ constructor() {
581
+ this.idUserPermission = '';
582
+ this.isAllowed = false;
583
+ this.idUser = '';
584
+ this.idModulePermission = '';
585
+ }
613
586
  }
614
587
 
615
- class GroupModel {
616
- constructor() {
617
- this.name = '';
618
- this.users = [];
619
- this.permissions = [];
620
- }
588
+ class GroupModel {
589
+ constructor() {
590
+ this.name = '';
591
+ this.users = [];
592
+ this.permissions = [];
593
+ }
621
594
  }
622
595
 
623
- class GroupPermissionModel {
624
- constructor() {
625
- this.idGroupPermission = '';
626
- this.isAllowed = false;
627
- this.idGroup = '';
628
- this.idModulePermission = '';
629
- }
596
+ class GroupPermissionModel {
597
+ constructor() {
598
+ this.idGroupPermission = '';
599
+ this.isAllowed = false;
600
+ this.idGroup = '';
601
+ this.idModulePermission = '';
602
+ }
630
603
  }
631
604
 
632
- /*
633
- * Public API Surface of cauca-management
605
+ /*
606
+ * Public API Surface of cauca-management
634
607
  */
635
608
 
636
- /**
637
- * Generated bundle index. Do not edit.
609
+ /**
610
+ * Generated bundle index. Do not edit.
638
611
  */
639
612
 
640
613
  export { CaucaManagementComponent, CaucaManagementGroupComponent, CaucaManagementModule, CaucaManagementService, CaucaManagementUserComponent, GroupModel, GroupPermissionModel, ManagementGroupService, ManagementUserService, UserGroupModel, UserModel, UserPermissionModel };
641
- //# sourceMappingURL=cauca-911-management.js.map
614
+ //# sourceMappingURL=cauca-911-management.mjs.map