@memberjunction/ng-explorer-settings 2.70.0 → 2.72.0
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/dist/lib/application-management/application-dialog/application-dialog.component.d.ts +60 -0
- package/dist/lib/application-management/application-dialog/application-dialog.component.d.ts.map +1 -0
- package/dist/lib/application-management/application-dialog/application-dialog.component.js +584 -0
- package/dist/lib/application-management/application-dialog/application-dialog.component.js.map +1 -0
- package/dist/lib/application-management/application-management.component.d.ts +4 -2
- package/dist/lib/application-management/application-management.component.d.ts.map +1 -1
- package/dist/lib/application-management/application-management.component.js +79 -35
- package/dist/lib/application-management/application-management.component.js.map +1 -1
- package/dist/lib/entity-permissions/entity-permissions.component.d.ts +3 -1
- package/dist/lib/entity-permissions/entity-permissions.component.d.ts.map +1 -1
- package/dist/lib/entity-permissions/entity-permissions.component.js +43 -66
- package/dist/lib/entity-permissions/entity-permissions.component.js.map +1 -1
- package/dist/lib/entity-permissions/permission-dialog/permission-dialog.component.d.ts +50 -0
- package/dist/lib/entity-permissions/permission-dialog/permission-dialog.component.d.ts.map +1 -0
- package/dist/lib/entity-permissions/permission-dialog/permission-dialog.component.js +464 -0
- package/dist/lib/entity-permissions/permission-dialog/permission-dialog.component.js.map +1 -0
- package/dist/lib/role-management/role-dialog/role-dialog.component.d.ts +38 -0
- package/dist/lib/role-management/role-dialog/role-dialog.component.d.ts.map +1 -0
- package/dist/lib/role-management/role-dialog/role-dialog.component.js +329 -0
- package/dist/lib/role-management/role-dialog/role-dialog.component.js.map +1 -0
- package/dist/lib/role-management/role-management.component.d.ts +4 -0
- package/dist/lib/role-management/role-management.component.d.ts.map +1 -1
- package/dist/lib/role-management/role-management.component.js +114 -72
- package/dist/lib/role-management/role-management.component.js.map +1 -1
- package/dist/lib/settings/settings.component.js +8 -8
- package/dist/lib/settings/settings.component.js.map +1 -1
- package/dist/lib/shared/components/settings-card/settings-card.component.d.ts.map +1 -1
- package/dist/lib/shared/components/settings-card/settings-card.component.js +11 -8
- package/dist/lib/shared/components/settings-card/settings-card.component.js.map +1 -1
- package/dist/lib/user-management/user-dialog/user-dialog.component.d.ts +44 -0
- package/dist/lib/user-management/user-dialog/user-dialog.component.d.ts.map +1 -0
- package/dist/lib/user-management/user-dialog/user-dialog.component.js +470 -0
- package/dist/lib/user-management/user-dialog/user-dialog.component.js.map +1 -0
- package/dist/lib/user-management/user-management.component.d.ts +9 -0
- package/dist/lib/user-management/user-management.component.d.ts.map +1 -1
- package/dist/lib/user-management/user-management.component.js +213 -98
- package/dist/lib/user-management/user-management.component.js.map +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, inject, HostListener, ChangeDetectorRef, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';
|
|
4
|
+
import { Metadata } from '@memberjunction/core';
|
|
5
|
+
import { WindowModule } from '@progress/kendo-angular-dialog';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/common";
|
|
8
|
+
import * as i2 from "@angular/forms";
|
|
9
|
+
import * as i3 from "@progress/kendo-angular-dialog";
|
|
10
|
+
const _forTrack0 = ($index, $item) => $item.roleId;
|
|
11
|
+
const _forTrack1 = ($index, $item) => $item.ID;
|
|
12
|
+
const _c0 = () => ({ standalone: true });
|
|
13
|
+
function PermissionDialogComponent_kendo_window_0_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵelementStart(0, "div", 8)(1, "div", 45);
|
|
15
|
+
i0.ɵɵelement(2, "i", 46);
|
|
16
|
+
i0.ɵɵelementStart(3, "div");
|
|
17
|
+
i0.ɵɵtext(4);
|
|
18
|
+
i0.ɵɵelementEnd()()();
|
|
19
|
+
} if (rf & 2) {
|
|
20
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
21
|
+
i0.ɵɵadvance(4);
|
|
22
|
+
i0.ɵɵtextInterpolate(ctx_r1.error);
|
|
23
|
+
} }
|
|
24
|
+
function PermissionDialogComponent_kendo_window_0_For_70_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
+
i0.ɵɵelementStart(0, "span", 51);
|
|
26
|
+
i0.ɵɵtext(1, "New");
|
|
27
|
+
i0.ɵɵelementEnd();
|
|
28
|
+
} }
|
|
29
|
+
function PermissionDialogComponent_kendo_window_0_For_70_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
+
i0.ɵɵelementStart(0, "span", 52);
|
|
31
|
+
i0.ɵɵtext(1, "Modified");
|
|
32
|
+
i0.ɵɵelementEnd();
|
|
33
|
+
} }
|
|
34
|
+
function PermissionDialogComponent_kendo_window_0_For_70_Template(rf, ctx) { if (rf & 1) {
|
|
35
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
36
|
+
i0.ɵɵelementStart(0, "tr", 47)(1, "td", 48)(2, "div", 49);
|
|
37
|
+
i0.ɵɵelement(3, "i", 50);
|
|
38
|
+
i0.ɵɵelementStart(4, "span");
|
|
39
|
+
i0.ɵɵtext(5);
|
|
40
|
+
i0.ɵɵelementEnd();
|
|
41
|
+
i0.ɵɵtemplate(6, PermissionDialogComponent_kendo_window_0_For_70_Conditional_6_Template, 2, 0, "span", 51)(7, PermissionDialogComponent_kendo_window_0_For_70_Conditional_7_Template, 2, 0, "span", 52);
|
|
42
|
+
i0.ɵɵelementEnd()();
|
|
43
|
+
i0.ɵɵelementStart(8, "td", 53)(9, "div", 54)(10, "input", 55);
|
|
44
|
+
i0.ɵɵtwoWayListener("ngModelChange", function PermissionDialogComponent_kendo_window_0_For_70_Template_input_ngModelChange_10_listener($event) { const rolePermission_r4 = i0.ɵɵrestoreView(_r3).$implicit; i0.ɵɵtwoWayBindingSet(rolePermission_r4.entityPermission.CanCreate, $event) || (rolePermission_r4.entityPermission.CanCreate = $event); return i0.ɵɵresetView($event); });
|
|
45
|
+
i0.ɵɵelementEnd();
|
|
46
|
+
i0.ɵɵelementStart(11, "label", 56);
|
|
47
|
+
i0.ɵɵelement(12, "div", 57);
|
|
48
|
+
i0.ɵɵelementEnd()()();
|
|
49
|
+
i0.ɵɵelementStart(13, "td", 53)(14, "div", 54)(15, "input", 55);
|
|
50
|
+
i0.ɵɵtwoWayListener("ngModelChange", function PermissionDialogComponent_kendo_window_0_For_70_Template_input_ngModelChange_15_listener($event) { const rolePermission_r4 = i0.ɵɵrestoreView(_r3).$implicit; i0.ɵɵtwoWayBindingSet(rolePermission_r4.entityPermission.CanRead, $event) || (rolePermission_r4.entityPermission.CanRead = $event); return i0.ɵɵresetView($event); });
|
|
51
|
+
i0.ɵɵelementEnd();
|
|
52
|
+
i0.ɵɵelementStart(16, "label", 56);
|
|
53
|
+
i0.ɵɵelement(17, "div", 57);
|
|
54
|
+
i0.ɵɵelementEnd()()();
|
|
55
|
+
i0.ɵɵelementStart(18, "td", 53)(19, "div", 54)(20, "input", 55);
|
|
56
|
+
i0.ɵɵtwoWayListener("ngModelChange", function PermissionDialogComponent_kendo_window_0_For_70_Template_input_ngModelChange_20_listener($event) { const rolePermission_r4 = i0.ɵɵrestoreView(_r3).$implicit; i0.ɵɵtwoWayBindingSet(rolePermission_r4.entityPermission.CanUpdate, $event) || (rolePermission_r4.entityPermission.CanUpdate = $event); return i0.ɵɵresetView($event); });
|
|
57
|
+
i0.ɵɵelementEnd();
|
|
58
|
+
i0.ɵɵelementStart(21, "label", 56);
|
|
59
|
+
i0.ɵɵelement(22, "div", 57);
|
|
60
|
+
i0.ɵɵelementEnd()()();
|
|
61
|
+
i0.ɵɵelementStart(23, "td", 53)(24, "div", 54)(25, "input", 55);
|
|
62
|
+
i0.ɵɵtwoWayListener("ngModelChange", function PermissionDialogComponent_kendo_window_0_For_70_Template_input_ngModelChange_25_listener($event) { const rolePermission_r4 = i0.ɵɵrestoreView(_r3).$implicit; i0.ɵɵtwoWayBindingSet(rolePermission_r4.entityPermission.CanDelete, $event) || (rolePermission_r4.entityPermission.CanDelete = $event); return i0.ɵɵresetView($event); });
|
|
63
|
+
i0.ɵɵelementEnd();
|
|
64
|
+
i0.ɵɵelementStart(26, "label", 56);
|
|
65
|
+
i0.ɵɵelement(27, "div", 57);
|
|
66
|
+
i0.ɵɵelementEnd()()();
|
|
67
|
+
i0.ɵɵelementStart(28, "td", 58)(29, "button", 59);
|
|
68
|
+
i0.ɵɵlistener("click", function PermissionDialogComponent_kendo_window_0_For_70_Template_button_click_29_listener() { const rolePermission_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.removeRolePermission(rolePermission_r4)); });
|
|
69
|
+
i0.ɵɵelement(30, "i", 43);
|
|
70
|
+
i0.ɵɵelementEnd()()();
|
|
71
|
+
} if (rf & 2) {
|
|
72
|
+
const rolePermission_r4 = ctx.$implicit;
|
|
73
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
74
|
+
i0.ɵɵclassProp("has-changes", ctx_r1.hasEntityChanges(rolePermission_r4))("is-new", rolePermission_r4.isNew);
|
|
75
|
+
i0.ɵɵadvance(5);
|
|
76
|
+
i0.ɵɵtextInterpolate(rolePermission_r4.roleName);
|
|
77
|
+
i0.ɵɵadvance();
|
|
78
|
+
i0.ɵɵconditional(rolePermission_r4.isNew ? 6 : -1);
|
|
79
|
+
i0.ɵɵadvance();
|
|
80
|
+
i0.ɵɵconditional(ctx_r1.hasEntityChanges(rolePermission_r4) && !rolePermission_r4.isNew ? 7 : -1);
|
|
81
|
+
i0.ɵɵadvance(3);
|
|
82
|
+
i0.ɵɵproperty("id", "create-" + rolePermission_r4.roleId);
|
|
83
|
+
i0.ɵɵtwoWayProperty("ngModel", rolePermission_r4.entityPermission.CanCreate);
|
|
84
|
+
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(23, _c0));
|
|
85
|
+
i0.ɵɵadvance();
|
|
86
|
+
i0.ɵɵproperty("for", "create-" + rolePermission_r4.roleId);
|
|
87
|
+
i0.ɵɵadvance(4);
|
|
88
|
+
i0.ɵɵproperty("id", "read-" + rolePermission_r4.roleId);
|
|
89
|
+
i0.ɵɵtwoWayProperty("ngModel", rolePermission_r4.entityPermission.CanRead);
|
|
90
|
+
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(24, _c0));
|
|
91
|
+
i0.ɵɵadvance();
|
|
92
|
+
i0.ɵɵproperty("for", "read-" + rolePermission_r4.roleId);
|
|
93
|
+
i0.ɵɵadvance(4);
|
|
94
|
+
i0.ɵɵproperty("id", "update-" + rolePermission_r4.roleId);
|
|
95
|
+
i0.ɵɵtwoWayProperty("ngModel", rolePermission_r4.entityPermission.CanUpdate);
|
|
96
|
+
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(25, _c0));
|
|
97
|
+
i0.ɵɵadvance();
|
|
98
|
+
i0.ɵɵproperty("for", "update-" + rolePermission_r4.roleId);
|
|
99
|
+
i0.ɵɵadvance(4);
|
|
100
|
+
i0.ɵɵproperty("id", "delete-" + rolePermission_r4.roleId);
|
|
101
|
+
i0.ɵɵtwoWayProperty("ngModel", rolePermission_r4.entityPermission.CanDelete);
|
|
102
|
+
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(26, _c0));
|
|
103
|
+
i0.ɵɵadvance();
|
|
104
|
+
i0.ɵɵproperty("for", "delete-" + rolePermission_r4.roleId);
|
|
105
|
+
} }
|
|
106
|
+
function PermissionDialogComponent_kendo_window_0_Conditional_71_Template(rf, ctx) { if (rf & 1) {
|
|
107
|
+
i0.ɵɵelementStart(0, "div", 32);
|
|
108
|
+
i0.ɵɵelement(1, "i", 50);
|
|
109
|
+
i0.ɵɵelementStart(2, "p");
|
|
110
|
+
i0.ɵɵtext(3, "No role permissions configured");
|
|
111
|
+
i0.ɵɵelementEnd();
|
|
112
|
+
i0.ɵɵelementStart(4, "p", 60);
|
|
113
|
+
i0.ɵɵtext(5, "Add permissions for specific roles to control access to this entity");
|
|
114
|
+
i0.ɵɵelementEnd()();
|
|
115
|
+
} }
|
|
116
|
+
function PermissionDialogComponent_kendo_window_0_For_80_Template(rf, ctx) { if (rf & 1) {
|
|
117
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
118
|
+
i0.ɵɵelementStart(0, "button", 61);
|
|
119
|
+
i0.ɵɵlistener("click", function PermissionDialogComponent_kendo_window_0_For_80_Template_button_click_0_listener() { const role_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.addRolePermission(role_r6)); });
|
|
120
|
+
i0.ɵɵelement(1, "i", 26);
|
|
121
|
+
i0.ɵɵtext(2);
|
|
122
|
+
i0.ɵɵelementEnd();
|
|
123
|
+
} if (rf & 2) {
|
|
124
|
+
const role_r6 = ctx.$implicit;
|
|
125
|
+
i0.ɵɵpropertyInterpolate1("title", "Add permissions for ", role_r6.Name, "");
|
|
126
|
+
i0.ɵɵadvance(2);
|
|
127
|
+
i0.ɵɵtextInterpolate1(" ", role_r6.Name, " ");
|
|
128
|
+
} }
|
|
129
|
+
function PermissionDialogComponent_kendo_window_0_Conditional_81_Template(rf, ctx) { if (rf & 1) {
|
|
130
|
+
i0.ɵɵelementStart(0, "p", 37);
|
|
131
|
+
i0.ɵɵtext(1, "All roles have been configured");
|
|
132
|
+
i0.ɵɵelementEnd();
|
|
133
|
+
} }
|
|
134
|
+
function PermissionDialogComponent_kendo_window_0_Conditional_84_Template(rf, ctx) { if (rf & 1) {
|
|
135
|
+
i0.ɵɵelementStart(0, "span", 40);
|
|
136
|
+
i0.ɵɵelement(1, "i", 46);
|
|
137
|
+
i0.ɵɵtext(2, " You have unsaved changes ");
|
|
138
|
+
i0.ɵɵelementEnd();
|
|
139
|
+
} }
|
|
140
|
+
function PermissionDialogComponent_kendo_window_0_Conditional_90_Template(rf, ctx) { if (rf & 1) {
|
|
141
|
+
i0.ɵɵelement(0, "i", 62);
|
|
142
|
+
i0.ɵɵtext(1, " Saving... ");
|
|
143
|
+
} }
|
|
144
|
+
function PermissionDialogComponent_kendo_window_0_Conditional_91_Template(rf, ctx) { if (rf & 1) {
|
|
145
|
+
i0.ɵɵelement(0, "i", 63);
|
|
146
|
+
i0.ɵɵtext(1, " Save Permissions ");
|
|
147
|
+
} }
|
|
148
|
+
function PermissionDialogComponent_kendo_window_0_Template(rf, ctx) { if (rf & 1) {
|
|
149
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
150
|
+
i0.ɵɵelementStart(0, "kendo-window", 1);
|
|
151
|
+
i0.ɵɵlistener("close", function PermissionDialogComponent_kendo_window_0_Template_kendo_window_close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
|
|
152
|
+
i0.ɵɵelementStart(1, "kendo-window-titlebar")(2, "div", 2)(3, "h2", 3);
|
|
153
|
+
i0.ɵɵelement(4, "i", 4);
|
|
154
|
+
i0.ɵɵtext(5, " Edit Entity Permissions ");
|
|
155
|
+
i0.ɵɵelementEnd();
|
|
156
|
+
i0.ɵɵelementStart(6, "p", 5);
|
|
157
|
+
i0.ɵɵtext(7);
|
|
158
|
+
i0.ɵɵelementEnd()()();
|
|
159
|
+
i0.ɵɵelementStart(8, "div", 6)(9, "form", 7);
|
|
160
|
+
i0.ɵɵlistener("ngSubmit", function PermissionDialogComponent_kendo_window_0_Template_form_ngSubmit_9_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSubmit()); });
|
|
161
|
+
i0.ɵɵtemplate(10, PermissionDialogComponent_kendo_window_0_Conditional_10_Template, 5, 1, "div", 8);
|
|
162
|
+
i0.ɵɵelementStart(11, "div", 8)(12, "div", 9)(13, "div", 10)(14, "h3", 11);
|
|
163
|
+
i0.ɵɵelement(15, "i", 12);
|
|
164
|
+
i0.ɵɵtext(16, " Entity Information ");
|
|
165
|
+
i0.ɵɵelementEnd();
|
|
166
|
+
i0.ɵɵelementStart(17, "p", 13);
|
|
167
|
+
i0.ɵɵtext(18);
|
|
168
|
+
i0.ɵɵelementEnd()();
|
|
169
|
+
i0.ɵɵelementStart(19, "div", 14)(20, "div", 15)(21, "div", 16);
|
|
170
|
+
i0.ɵɵelement(22, "i", 17);
|
|
171
|
+
i0.ɵɵelementStart(23, "span", 18);
|
|
172
|
+
i0.ɵɵtext(24, "Entity:");
|
|
173
|
+
i0.ɵɵelementEnd();
|
|
174
|
+
i0.ɵɵelementStart(25, "span", 19);
|
|
175
|
+
i0.ɵɵtext(26);
|
|
176
|
+
i0.ɵɵelementEnd()();
|
|
177
|
+
i0.ɵɵelementStart(27, "div", 16);
|
|
178
|
+
i0.ɵɵelement(28, "i", 4);
|
|
179
|
+
i0.ɵɵelementStart(29, "span", 18);
|
|
180
|
+
i0.ɵɵtext(30, "Total Permissions:");
|
|
181
|
+
i0.ɵɵelementEnd();
|
|
182
|
+
i0.ɵɵelementStart(31, "span", 19);
|
|
183
|
+
i0.ɵɵtext(32);
|
|
184
|
+
i0.ɵɵelementEnd()();
|
|
185
|
+
i0.ɵɵelementStart(33, "div", 16);
|
|
186
|
+
i0.ɵɵelement(34, "i", 20);
|
|
187
|
+
i0.ɵɵelementStart(35, "span", 18);
|
|
188
|
+
i0.ɵɵtext(36, "Last Updated:");
|
|
189
|
+
i0.ɵɵelementEnd();
|
|
190
|
+
i0.ɵɵelementStart(37, "span", 19);
|
|
191
|
+
i0.ɵɵtext(38);
|
|
192
|
+
i0.ɵɵpipe(39, "date");
|
|
193
|
+
i0.ɵɵelementEnd()()()()()();
|
|
194
|
+
i0.ɵɵelementStart(40, "div", 8)(41, "div", 9)(42, "div", 10)(43, "h3", 11);
|
|
195
|
+
i0.ɵɵelement(44, "i", 21);
|
|
196
|
+
i0.ɵɵtext(45, " Role Permissions ");
|
|
197
|
+
i0.ɵɵelementEnd();
|
|
198
|
+
i0.ɵɵelementStart(46, "p", 13);
|
|
199
|
+
i0.ɵɵtext(47, "Configure CRUD permissions for each role");
|
|
200
|
+
i0.ɵɵelementEnd()();
|
|
201
|
+
i0.ɵɵelementStart(48, "div", 22)(49, "table", 23)(50, "thead")(51, "tr")(52, "th", 24);
|
|
202
|
+
i0.ɵɵtext(53, "Role");
|
|
203
|
+
i0.ɵɵelementEnd();
|
|
204
|
+
i0.ɵɵelementStart(54, "th", 25);
|
|
205
|
+
i0.ɵɵelement(55, "i", 26);
|
|
206
|
+
i0.ɵɵtext(56, " Create ");
|
|
207
|
+
i0.ɵɵelementEnd();
|
|
208
|
+
i0.ɵɵelementStart(57, "th", 25);
|
|
209
|
+
i0.ɵɵelement(58, "i", 27);
|
|
210
|
+
i0.ɵɵtext(59, " Read ");
|
|
211
|
+
i0.ɵɵelementEnd();
|
|
212
|
+
i0.ɵɵelementStart(60, "th", 25);
|
|
213
|
+
i0.ɵɵelement(61, "i", 28);
|
|
214
|
+
i0.ɵɵtext(62, " Update ");
|
|
215
|
+
i0.ɵɵelementEnd();
|
|
216
|
+
i0.ɵɵelementStart(63, "th", 25);
|
|
217
|
+
i0.ɵɵelement(64, "i", 29);
|
|
218
|
+
i0.ɵɵtext(65, " Delete ");
|
|
219
|
+
i0.ɵɵelementEnd();
|
|
220
|
+
i0.ɵɵelementStart(66, "th", 30);
|
|
221
|
+
i0.ɵɵtext(67, "Actions");
|
|
222
|
+
i0.ɵɵelementEnd()()();
|
|
223
|
+
i0.ɵɵelementStart(68, "tbody");
|
|
224
|
+
i0.ɵɵrepeaterCreate(69, PermissionDialogComponent_kendo_window_0_For_70_Template, 31, 27, "tr", 31, _forTrack0);
|
|
225
|
+
i0.ɵɵelementEnd()();
|
|
226
|
+
i0.ɵɵtemplate(71, PermissionDialogComponent_kendo_window_0_Conditional_71_Template, 6, 0, "div", 32);
|
|
227
|
+
i0.ɵɵelementEnd();
|
|
228
|
+
i0.ɵɵelementStart(72, "div", 33)(73, "div", 34)(74, "h4");
|
|
229
|
+
i0.ɵɵtext(75, "Add Role Permissions");
|
|
230
|
+
i0.ɵɵelementEnd();
|
|
231
|
+
i0.ɵɵelementStart(76, "p");
|
|
232
|
+
i0.ɵɵtext(77, "Select roles to configure permissions for this entity");
|
|
233
|
+
i0.ɵɵelementEnd()();
|
|
234
|
+
i0.ɵɵelementStart(78, "div", 35);
|
|
235
|
+
i0.ɵɵrepeaterCreate(79, PermissionDialogComponent_kendo_window_0_For_80_Template, 3, 3, "button", 36, _forTrack1);
|
|
236
|
+
i0.ɵɵtemplate(81, PermissionDialogComponent_kendo_window_0_Conditional_81_Template, 2, 0, "p", 37);
|
|
237
|
+
i0.ɵɵelementEnd()()()();
|
|
238
|
+
i0.ɵɵelementStart(82, "div", 38)(83, "div", 39);
|
|
239
|
+
i0.ɵɵtemplate(84, PermissionDialogComponent_kendo_window_0_Conditional_84_Template, 3, 0, "span", 40);
|
|
240
|
+
i0.ɵɵelementEnd();
|
|
241
|
+
i0.ɵɵelementStart(85, "div", 41)(86, "button", 42);
|
|
242
|
+
i0.ɵɵlistener("click", function PermissionDialogComponent_kendo_window_0_Template_button_click_86_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
|
|
243
|
+
i0.ɵɵelement(87, "i", 43);
|
|
244
|
+
i0.ɵɵtext(88, " Cancel ");
|
|
245
|
+
i0.ɵɵelementEnd();
|
|
246
|
+
i0.ɵɵelementStart(89, "button", 44);
|
|
247
|
+
i0.ɵɵtemplate(90, PermissionDialogComponent_kendo_window_0_Conditional_90_Template, 2, 0)(91, PermissionDialogComponent_kendo_window_0_Conditional_91_Template, 2, 0);
|
|
248
|
+
i0.ɵɵelementEnd()()()()()();
|
|
249
|
+
} if (rf & 2) {
|
|
250
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
251
|
+
i0.ɵɵproperty("width", 900)("height", 700)("resizable", false)("draggable", true)("keepContent", true);
|
|
252
|
+
i0.ɵɵadvance(7);
|
|
253
|
+
i0.ɵɵtextInterpolate1(" Configure role-based permissions for ", ctx_r1.data == null ? null : ctx_r1.data.entity == null ? null : ctx_r1.data.entity.Name, " ");
|
|
254
|
+
i0.ɵɵadvance(2);
|
|
255
|
+
i0.ɵɵproperty("formGroup", ctx_r1.permissionForm);
|
|
256
|
+
i0.ɵɵadvance();
|
|
257
|
+
i0.ɵɵconditional(ctx_r1.error ? 10 : -1);
|
|
258
|
+
i0.ɵɵadvance(8);
|
|
259
|
+
i0.ɵɵtextInterpolate((ctx_r1.data == null ? null : ctx_r1.data.entity == null ? null : ctx_r1.data.entity.Description) || "Entity permissions configuration");
|
|
260
|
+
i0.ɵɵadvance(8);
|
|
261
|
+
i0.ɵɵtextInterpolate(ctx_r1.data == null ? null : ctx_r1.data.entity == null ? null : ctx_r1.data.entity.Name);
|
|
262
|
+
i0.ɵɵadvance(6);
|
|
263
|
+
i0.ɵɵtextInterpolate(ctx_r1.rolePermissions.length);
|
|
264
|
+
i0.ɵɵadvance(6);
|
|
265
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(39, 17, ctx_r1.data == null ? null : ctx_r1.data.entity == null ? null : ctx_r1.data.entity.__mj_UpdatedAt, "medium"));
|
|
266
|
+
i0.ɵɵadvance(31);
|
|
267
|
+
i0.ɵɵrepeater(ctx_r1.rolePermissions);
|
|
268
|
+
i0.ɵɵadvance(2);
|
|
269
|
+
i0.ɵɵconditional(ctx_r1.rolePermissions.length === 0 ? 71 : -1);
|
|
270
|
+
i0.ɵɵadvance(8);
|
|
271
|
+
i0.ɵɵrepeater(ctx_r1.availableRoles);
|
|
272
|
+
i0.ɵɵadvance(2);
|
|
273
|
+
i0.ɵɵconditional(ctx_r1.availableRoles.length === 0 ? 81 : -1);
|
|
274
|
+
i0.ɵɵadvance(3);
|
|
275
|
+
i0.ɵɵconditional(ctx_r1.hasChanges ? 84 : -1);
|
|
276
|
+
i0.ɵɵadvance(5);
|
|
277
|
+
i0.ɵɵproperty("disabled", !ctx_r1.hasChanges || ctx_r1.isLoading);
|
|
278
|
+
i0.ɵɵadvance();
|
|
279
|
+
i0.ɵɵconditional(ctx_r1.isLoading ? 90 : 91);
|
|
280
|
+
} }
|
|
281
|
+
export class PermissionDialogComponent {
|
|
282
|
+
data = null;
|
|
283
|
+
visible = false;
|
|
284
|
+
result = new EventEmitter();
|
|
285
|
+
fb = inject(FormBuilder);
|
|
286
|
+
cdr = inject(ChangeDetectorRef);
|
|
287
|
+
metadata = new Metadata();
|
|
288
|
+
permissionForm;
|
|
289
|
+
isLoading = false;
|
|
290
|
+
error = null;
|
|
291
|
+
rolePermissions = [];
|
|
292
|
+
availableRoles = [];
|
|
293
|
+
constructor() {
|
|
294
|
+
this.permissionForm = this.fb.group({});
|
|
295
|
+
}
|
|
296
|
+
ngOnInit() {
|
|
297
|
+
// Initial setup
|
|
298
|
+
}
|
|
299
|
+
ngOnChanges(changes) {
|
|
300
|
+
console.log('Permission dialog ngOnChanges called:', changes);
|
|
301
|
+
if (changes['visible'] && this.visible) {
|
|
302
|
+
this.resetDialog();
|
|
303
|
+
// Load data when dialog becomes visible and we have data
|
|
304
|
+
if (this.data) {
|
|
305
|
+
console.log('Dialog became visible, loading permission data');
|
|
306
|
+
this.loadPermissionData();
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (changes['data'] && this.data && this.visible) {
|
|
310
|
+
console.log('Data changed while dialog is visible, reloading permission data');
|
|
311
|
+
this.loadPermissionData();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
ngOnDestroy() {
|
|
315
|
+
// Cleanup if needed
|
|
316
|
+
}
|
|
317
|
+
resetDialog() {
|
|
318
|
+
this.error = null;
|
|
319
|
+
this.isLoading = false;
|
|
320
|
+
}
|
|
321
|
+
onEscapeKey(event) {
|
|
322
|
+
if (this.visible) {
|
|
323
|
+
this.onCancel();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
get hasChanges() {
|
|
327
|
+
return this.rolePermissions.some(rp => rp.isNew || rp.entityPermission.Dirty);
|
|
328
|
+
}
|
|
329
|
+
hasEntityChanges(rolePermission) {
|
|
330
|
+
return rolePermission.isNew || rolePermission.entityPermission.Dirty;
|
|
331
|
+
}
|
|
332
|
+
loadPermissionData() {
|
|
333
|
+
if (!this.data)
|
|
334
|
+
return;
|
|
335
|
+
console.log('Loading permission data for entity:', this.data.entity.Name);
|
|
336
|
+
console.log('Existing permissions:', this.data.existingPermissions);
|
|
337
|
+
console.log('Available roles:', this.data.roles);
|
|
338
|
+
// Initialize role permissions from existing data
|
|
339
|
+
this.rolePermissions = [];
|
|
340
|
+
const existingRoleIds = new Set();
|
|
341
|
+
// Process existing permissions
|
|
342
|
+
for (const permission of this.data.existingPermissions) {
|
|
343
|
+
const role = this.data.roles.find(r => r.ID === permission.RoleID);
|
|
344
|
+
if (role) {
|
|
345
|
+
console.log(`Processing permission for role ${role.Name}:`, {
|
|
346
|
+
canCreate: permission.CanCreate,
|
|
347
|
+
canRead: permission.CanRead,
|
|
348
|
+
canUpdate: permission.CanUpdate,
|
|
349
|
+
canDelete: permission.CanDelete
|
|
350
|
+
});
|
|
351
|
+
this.rolePermissions.push({
|
|
352
|
+
roleId: role.ID,
|
|
353
|
+
roleName: role.Name || '',
|
|
354
|
+
entityPermission: permission,
|
|
355
|
+
isNew: false
|
|
356
|
+
});
|
|
357
|
+
existingRoleIds.add(role.ID);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
console.log('Loaded role permissions:', this.rolePermissions);
|
|
361
|
+
// Set available roles (those not already configured)
|
|
362
|
+
this.availableRoles = this.data.roles.filter(role => !existingRoleIds.has(role.ID));
|
|
363
|
+
console.log('Available roles for adding:', this.availableRoles.map(r => r.Name));
|
|
364
|
+
// Trigger change detection to update the UI
|
|
365
|
+
this.cdr.detectChanges();
|
|
366
|
+
}
|
|
367
|
+
async addRolePermission(role) {
|
|
368
|
+
// Create new EntityPermission entity
|
|
369
|
+
const entityPermission = await this.metadata.GetEntityObject('Entity Permissions');
|
|
370
|
+
entityPermission.NewRecord();
|
|
371
|
+
entityPermission.EntityID = this.data.entity.ID;
|
|
372
|
+
entityPermission.RoleID = role.ID;
|
|
373
|
+
entityPermission.CanCreate = false;
|
|
374
|
+
entityPermission.CanRead = true; // Default to read access
|
|
375
|
+
entityPermission.CanUpdate = false;
|
|
376
|
+
entityPermission.CanDelete = false;
|
|
377
|
+
// Add new role permission
|
|
378
|
+
this.rolePermissions.push({
|
|
379
|
+
roleId: role.ID,
|
|
380
|
+
roleName: role.Name || '',
|
|
381
|
+
entityPermission: entityPermission,
|
|
382
|
+
isNew: true
|
|
383
|
+
});
|
|
384
|
+
// Remove from available roles
|
|
385
|
+
this.availableRoles = this.availableRoles.filter(r => r.ID !== role.ID);
|
|
386
|
+
this.cdr.detectChanges();
|
|
387
|
+
}
|
|
388
|
+
removeRolePermission(rolePermission) {
|
|
389
|
+
// Add back to available roles if not new
|
|
390
|
+
if (!rolePermission.isNew) {
|
|
391
|
+
const role = this.data?.roles.find(r => r.ID === rolePermission.roleId);
|
|
392
|
+
if (role) {
|
|
393
|
+
this.availableRoles.push(role);
|
|
394
|
+
this.availableRoles.sort((a, b) => (a.Name || '').localeCompare(b.Name || ''));
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
// Add back to available roles
|
|
399
|
+
const role = this.data?.roles.find(r => r.ID === rolePermission.roleId);
|
|
400
|
+
if (role) {
|
|
401
|
+
this.availableRoles.push(role);
|
|
402
|
+
this.availableRoles.sort((a, b) => (a.Name || '').localeCompare(b.Name || ''));
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
// Remove from role permissions
|
|
406
|
+
this.rolePermissions = this.rolePermissions.filter(rp => rp.roleId !== rolePermission.roleId);
|
|
407
|
+
this.cdr.detectChanges();
|
|
408
|
+
}
|
|
409
|
+
async onSubmit() {
|
|
410
|
+
if (!this.data || !this.hasChanges)
|
|
411
|
+
return;
|
|
412
|
+
this.isLoading = true;
|
|
413
|
+
this.error = null;
|
|
414
|
+
try {
|
|
415
|
+
// Process each role permission
|
|
416
|
+
for (const rolePermission of this.rolePermissions) {
|
|
417
|
+
if (rolePermission.isNew || rolePermission.entityPermission.Dirty) {
|
|
418
|
+
await this.saveRolePermission(rolePermission);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
this.result.emit({ action: 'save', entity: this.data.entity });
|
|
422
|
+
}
|
|
423
|
+
catch (error) {
|
|
424
|
+
console.error('Error saving permissions:', error);
|
|
425
|
+
this.error = error.message || 'An unexpected error occurred while saving permissions';
|
|
426
|
+
}
|
|
427
|
+
finally {
|
|
428
|
+
this.isLoading = false;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
async saveRolePermission(rolePermission) {
|
|
432
|
+
// Save the entity directly - it already has all the values bound
|
|
433
|
+
const saveResult = await rolePermission.entityPermission.Save();
|
|
434
|
+
if (!saveResult) {
|
|
435
|
+
throw new Error(rolePermission.entityPermission.LatestResult?.Message || `Failed to save permissions for role ${rolePermission.roleName}`);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
onCancel() {
|
|
439
|
+
this.result.emit({ action: 'cancel' });
|
|
440
|
+
}
|
|
441
|
+
static ɵfac = function PermissionDialogComponent_Factory(t) { return new (t || PermissionDialogComponent)(); };
|
|
442
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PermissionDialogComponent, selectors: [["mj-permission-dialog"]], hostBindings: function PermissionDialogComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
443
|
+
i0.ɵɵlistener("keydown.escape", function PermissionDialogComponent_keydown_escape_HostBindingHandler($event) { return ctx.onEscapeKey($event); }, false, i0.ɵɵresolveDocument);
|
|
444
|
+
} }, inputs: { data: "data", visible: "visible" }, outputs: { result: "result" }, standalone: true, features: [i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature], decls: 1, vars: 1, consts: [["kendoWindowContainer", "", 3, "width", "height", "resizable", "draggable", "keepContent", "close", 4, "ngIf"], ["kendoWindowContainer", "", 3, "close", "width", "height", "resizable", "draggable", "keepContent"], [1, "dialog-header"], [1, "dialog-title"], [1, "fa-solid", "fa-key"], [1, "dialog-subtitle"], [1, "dialog-content"], [3, "ngSubmit", "formGroup"], [1, "content-section"], [1, "form-section"], [1, "section-header"], [1, "section-title"], [1, "fa-solid", "fa-database"], [1, "section-description"], [1, "entity-info-card"], [1, "entity-meta"], [1, "meta-item"], [1, "fa-solid", "fa-table"], [1, "meta-label"], [1, "meta-value"], [1, "fa-solid", "fa-clock"], [1, "fa-solid", "fa-users-cog"], [1, "permissions-table-container"], [1, "permissions-table"], [1, "role-column"], [1, "permission-column"], [1, "fa-solid", "fa-plus"], [1, "fa-solid", "fa-eye"], [1, "fa-solid", "fa-edit"], [1, "fa-solid", "fa-trash"], [1, "actions-column"], [1, "permission-row", 3, "has-changes", "is-new"], [1, "empty-permissions"], [1, "add-role-section"], [1, "add-role-header"], [1, "available-roles"], ["type", "button", 1, "role-chip", 3, "title"], [1, "no-available-roles"], [1, "dialog-footer"], [1, "footer-info"], [1, "changes-indicator"], [1, "footer-actions"], ["type", "button", 1, "btn", "btn-secondary", 3, "click"], [1, "fa-solid", "fa-times"], ["type", "submit", 1, "btn", "btn-primary", 3, "disabled"], [1, "alert", "alert-error"], [1, "fa-solid", "fa-exclamation-triangle"], [1, "permission-row"], [1, "role-name"], [1, "role-info"], [1, "fa-solid", "fa-shield-halved"], [1, "new-badge"], [1, "changed-badge"], [1, "permission-cell"], [1, "permission-toggle"], ["type", "checkbox", 1, "permission-checkbox", 3, "ngModelChange", "id", "ngModel", "ngModelOptions"], [1, "permission-label", 3, "for"], [1, "checkbox-indicator"], [1, "actions-cell"], ["type", "button", "title", "Remove permissions for this role", 1, "btn-icon", "btn-danger", 3, "click"], [1, "empty-subtext"], ["type", "button", 1, "role-chip", 3, "click", "title"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-save"]], template: function PermissionDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
445
|
+
i0.ɵɵtemplate(0, PermissionDialogComponent_kendo_window_0_Template, 92, 20, "kendo-window", 0);
|
|
446
|
+
} if (rf & 2) {
|
|
447
|
+
i0.ɵɵproperty("ngIf", ctx.visible);
|
|
448
|
+
} }, dependencies: [CommonModule, i1.NgIf, i1.DatePipe, FormsModule, i2.ɵNgNoValidate, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.NgModel, ReactiveFormsModule, i2.FormGroupDirective, WindowModule, i3.WindowComponent, i3.WindowTitleBarComponent, i3.WindowContainerDirective], styles: ["/* Modern Dialog Styling - Matching Dashboard Design */\n:host ::ng-deep .k-window {\n border: none;\n border-radius: 12px;\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.30), 0 15px 12px rgba(0, 0, 0, 0.22);\n background: #ffffff;\n overflow: hidden;\n}\n\n:host ::ng-deep .k-window-titlebar {\n background: linear-gradient(135deg, #ffc107 0%, #e6a704 100%);\n border: none;\n padding: 24px 32px;\n min-height: 70px;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-title {\n display: none; /* Hide default title */\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions {\n position: absolute;\n top: 24px;\n right: 24px;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions .k-button {\n background: rgba(255, 255, 255, 0.1);\n border: 1px solid rgba(255, 255, 255, 0.2);\n color: #ffffff;\n border-radius: 6px;\n width: 32px;\n height: 32px;\n min-width: auto;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions .k-button:hover {\n background: rgba(255, 255, 255, 0.2);\n border-color: rgba(255, 255, 255, 0.3);\n}\n\n:host ::ng-deep .k-window-content {\n padding: 0;\n background: #ffffff;\n}\n\n/* Custom Title Bar */\n.dialog-header {\n position: relative;\n color: #ffffff;\n}\n\n.dialog-header .dialog-title {\n font-size: 18px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 16px;\n margin: 0;\n}\n\n.dialog-header .dialog-title i {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(255, 255, 255, 0.15);\n border-radius: 6px;\n font-size: 14px;\n}\n\n.dialog-header .dialog-subtitle {\n margin: 4px 0 0 0;\n font-size: 12px;\n opacity: 0.85;\n font-weight: 400;\n}\n\n/* Modal Content Areas */\n.dialog-content {\n padding: 0;\n background: #ffffff;\n}\n\n.dialog-content .content-section {\n padding: 32px;\n}\n\n.dialog-content .content-section:not(:last-child) {\n border-bottom: 1px solid #e0e0e0;\n}\n\n.dialog-footer {\n padding: 24px 32px;\n background: #fafafa;\n border-top: 1px solid #e0e0e0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n}\n\n.dialog-footer .footer-info .changes-indicator {\n color: #ffc107;\n font-size: 12px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.dialog-footer .footer-info .changes-indicator i {\n font-size: 14px;\n}\n\n.dialog-footer .footer-actions {\n display: flex;\n gap: 16px;\n}\n\n/* Form Sections */\n.form-section .section-header {\n margin-bottom: 24px;\n}\n\n.form-section .section-header .section-title {\n font-size: 16px;\n font-weight: 600;\n color: #212121;\n margin: 0 0 4px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.form-section .section-header .section-title i {\n color: #ffc107;\n font-size: 14px;\n}\n\n.form-section .section-header .section-description {\n font-size: 12px;\n color: #666666;\n margin: 0;\n}\n\n/* Entity Info Card */\n.entity-info-card {\n background: #fafafa;\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n padding: 24px;\n}\n\n.entity-info-card .entity-meta {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 16px;\n}\n\n@media (max-width: 640px) {\n .entity-info-card .entity-meta {\n grid-template-columns: 1fr;\n }\n}\n\n.entity-info-card .entity-meta .meta-item {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-info-card .entity-meta .meta-item i {\n color: #ffc107;\n width: 16px;\n font-size: 14px;\n}\n\n.entity-info-card .entity-meta .meta-item .meta-label {\n font-size: 12px;\n color: #666666;\n font-weight: 500;\n}\n\n.entity-info-card .entity-meta .meta-item .meta-value {\n font-size: 12px;\n color: #212121;\n font-weight: 500;\n}\n\n/* Permissions Table */\n.permissions-table-container {\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n overflow: hidden;\n background: #ffffff;\n}\n\n.permissions-table-container .permissions-table {\n width: 100%;\n border-collapse: collapse;\n}\n\n.permissions-table-container .permissions-table thead {\n background: #fafafa;\n}\n\n.permissions-table-container .permissions-table thead th {\n padding: 16px 24px;\n text-align: left;\n font-size: 12px;\n font-weight: 600;\n color: #212121;\n border-bottom: 1px solid #e0e0e0;\n white-space: nowrap;\n}\n\n.permissions-table-container .permissions-table thead th.role-column {\n width: 25%;\n min-width: 200px;\n}\n\n.permissions-table-container .permissions-table thead th.permission-column {\n width: 15%;\n text-align: center;\n}\n\n.permissions-table-container .permissions-table thead th.permission-column i {\n color: #ffc107;\n margin-right: 4px;\n}\n\n.permissions-table-container .permissions-table thead th.actions-column {\n width: 10%;\n text-align: center;\n}\n\n.permissions-table-container .permissions-table tbody tr {\n transition: all 0.15s ease;\n}\n\n.permissions-table-container .permissions-table tbody tr:hover {\n background: rgba(255, 193, 7, 0.05);\n}\n\n.permissions-table-container .permissions-table tbody tr.has-changes {\n background: rgba(0, 188, 212, 0.05);\n border-left: 3px solid #00bcd4;\n}\n\n.permissions-table-container .permissions-table tbody tr.is-new {\n background: rgba(76, 175, 80, 0.05);\n border-left: 3px solid #4caf50;\n}\n\n.permissions-table-container .permissions-table tbody tr td {\n padding: 16px 24px;\n border-bottom: 1px solid #fafafa;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info i {\n color: #ffc107;\n width: 16px;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info .new-badge,\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info .changed-badge {\n font-size: 11px;\n padding: 2px 4px;\n border-radius: 4px;\n font-weight: 500;\n margin-left: 8px;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info .new-badge {\n background: rgba(76, 175, 80, 0.1);\n color: #4caf50;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info .changed-badge {\n background: rgba(0, 188, 212, 0.1);\n color: #00bcd4;\n}\n\n.permissions-table-container .permissions-table tbody tr td.permission-cell,\n.permissions-table-container .permissions-table tbody tr td.actions-cell {\n text-align: center;\n}\n\n/* Permission Toggle */\n.permission-toggle {\n display: flex;\n justify-content: center;\n}\n\n.permission-toggle .permission-checkbox {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n}\n\n.permission-toggle .permission-checkbox:checked + .permission-label .checkbox-indicator {\n background: #ffc107;\n border-color: #ffc107;\n}\n\n.permission-toggle .permission-checkbox:checked + .permission-label .checkbox-indicator::after {\n opacity: 1;\n transform: rotate(45deg) scale(1);\n}\n\n.permission-toggle .permission-checkbox:focus + .permission-label .checkbox-indicator {\n box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);\n}\n\n.permission-toggle .permission-label {\n display: flex;\n align-items: center;\n cursor: pointer;\n margin: 0;\n}\n\n.permission-toggle .checkbox-indicator {\n width: 20px;\n height: 20px;\n border: 2px solid #bdbdbd;\n border-radius: 4px;\n background: #ffffff;\n position: relative;\n transition: all 0.15s ease;\n}\n\n.permission-toggle .checkbox-indicator::after {\n content: '';\n position: absolute;\n left: 6px;\n top: 2px;\n width: 4px;\n height: 8px;\n border: solid #ffffff;\n border-width: 0 2px 2px 0;\n opacity: 0;\n transform: rotate(45deg) scale(0.8);\n transition: all 0.15s ease;\n}\n\n/* Action Buttons */\n.btn-icon {\n width: 32px;\n height: 32px;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.15s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n}\n\n.btn-icon.btn-danger {\n background: rgba(244, 67, 54, 0.1);\n color: #f44336;\n}\n\n.btn-icon.btn-danger:hover {\n background: rgba(244, 67, 54, 0.2);\n transform: scale(1.05);\n}\n\n/* Empty Permissions */\n.empty-permissions {\n text-align: center;\n padding: 32px;\n color: #666666;\n}\n\n.empty-permissions i {\n font-size: 2rem;\n color: #bdbdbd;\n margin-bottom: 16px;\n}\n\n.empty-permissions p {\n margin: 0 0 4px 0;\n font-weight: 500;\n}\n\n.empty-permissions .empty-subtext {\n font-size: 12px;\n color: #9e9e9e;\n margin: 0;\n}\n\n/* Add Role Section */\n.add-role-section {\n margin-top: 32px;\n padding-top: 24px;\n border-top: 1px solid #e0e0e0;\n}\n\n.add-role-section .add-role-header {\n margin-bottom: 24px;\n}\n\n.add-role-section .add-role-header h4 {\n font-size: 14px;\n font-weight: 600;\n color: #212121;\n margin: 0 0 4px 0;\n}\n\n.add-role-section .add-role-header p {\n font-size: 12px;\n color: #666666;\n margin: 0;\n}\n\n.add-role-section .available-roles {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.add-role-section .available-roles .role-chip {\n padding: 8px 16px;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n background: #ffffff;\n color: #212121;\n font-size: 12px;\n cursor: pointer;\n transition: all 0.15s ease;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.add-role-section .available-roles .role-chip i {\n font-size: 12px;\n color: #ffc107;\n}\n\n.add-role-section .available-roles .role-chip:hover {\n border-color: #ffc107;\n background: rgba(255, 193, 7, 0.05);\n transform: translateY(-1px);\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.add-role-section .available-roles .no-available-roles {\n color: #9e9e9e;\n font-style: italic;\n margin: 0;\n}\n\n/* Alert Messages */\n.alert {\n padding: 16px 24px;\n border-radius: 8px;\n margin-bottom: 24px;\n display: flex;\n align-items: flex-start;\n gap: 16px;\n}\n\n.alert i {\n font-size: 16px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.alert.alert-error {\n background: rgba(244, 67, 54, 0.1);\n border: 1px solid rgba(244, 67, 54, 0.2);\n color: #c62828;\n}\n\n.alert.alert-error i {\n color: #f44336;\n}\n\n/* Button Styles */\n.dialog-footer .btn {\n padding: 8px 24px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n border: 1px solid transparent;\n cursor: pointer;\n transition: all 0.15s ease;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-height: 36px;\n}\n\n.dialog-footer .btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.dialog-footer .btn:disabled i.fa-spinner {\n animation: spin 1s linear infinite;\n}\n\n.dialog-footer .btn.btn-secondary {\n background: #ffffff;\n color: #666666;\n border-color: #bdbdbd;\n}\n\n.dialog-footer .btn.btn-secondary:hover:not(:disabled) {\n background: #f8f9fa;\n border-color: #757575;\n color: #212121;\n}\n\n.dialog-footer .btn.btn-primary {\n background: #ffc107;\n color: #ffffff;\n}\n\n.dialog-footer .btn.btn-primary:hover:not(:disabled) {\n background: #ffb300;\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);\n transform: translateY(-1px);\n}\n\n@keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n :host ::ng-deep .k-window {\n margin: 16px;\n max-width: none;\n width: calc(100vw - 24px) !important;\n height: calc(100vh - 24px) !important;\n }\n \n :host ::ng-deep .k-window-titlebar {\n padding: 16px 24px;\n min-height: 60px;\n }\n \n .dialog-content .content-section {\n padding: 24px 16px;\n }\n \n .dialog-footer {\n padding: 16px 24px;\n flex-direction: column;\n }\n \n .dialog-footer .footer-info,\n .dialog-footer .footer-actions {\n width: 100%;\n }\n \n .dialog-footer .footer-actions {\n display: flex;\n gap: 16px;\n }\n \n .dialog-footer .footer-actions .btn {\n flex: 1;\n justify-content: center;\n }\n \n .permissions-table-container {\n overflow-x: auto;\n }\n \n .permissions-table-container .permissions-table {\n min-width: 600px;\n }\n \n .available-roles .role-chip {\n flex: 1;\n min-width: 120px;\n justify-content: center;\n }\n}"], encapsulation: 2 });
|
|
449
|
+
}
|
|
450
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PermissionDialogComponent, [{
|
|
451
|
+
type: Component,
|
|
452
|
+
args: [{ selector: 'mj-permission-dialog', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule, WindowModule], encapsulation: ViewEncapsulation.None, template: "<kendo-window\n *ngIf=\"visible\"\n [width]=\"900\"\n [height]=\"700\"\n [resizable]=\"false\"\n [draggable]=\"true\"\n [keepContent]=\"true\"\n (close)=\"onCancel()\"\n kendoWindowContainer>\n \n <kendo-window-titlebar>\n <div class=\"dialog-header\">\n <h2 class=\"dialog-title\">\n <i class=\"fa-solid fa-key\"></i>\n Edit Entity Permissions\n </h2>\n <p class=\"dialog-subtitle\">\n Configure role-based permissions for {{ data?.entity?.Name }}\n </p>\n </div>\n </kendo-window-titlebar>\n\n <div class=\"dialog-content\">\n <form [formGroup]=\"permissionForm\" (ngSubmit)=\"onSubmit()\">\n \n @if (error) {\n <div class=\"content-section\">\n <div class=\"alert alert-error\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <div>{{ error }}</div>\n </div>\n </div>\n }\n\n <!-- Entity Information Section -->\n <div class=\"content-section\">\n <div class=\"form-section\">\n <div class=\"section-header\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-database\"></i>\n Entity Information\n </h3>\n <p class=\"section-description\">{{ data?.entity?.Description || 'Entity permissions configuration' }}</p>\n </div>\n \n <div class=\"entity-info-card\">\n <div class=\"entity-meta\">\n <div class=\"meta-item\">\n <i class=\"fa-solid fa-table\"></i>\n <span class=\"meta-label\">Entity:</span>\n <span class=\"meta-value\">{{ data?.entity?.Name }}</span>\n </div>\n <div class=\"meta-item\">\n <i class=\"fa-solid fa-key\"></i>\n <span class=\"meta-label\">Total Permissions:</span>\n <span class=\"meta-value\">{{ rolePermissions.length }}</span>\n </div>\n <div class=\"meta-item\">\n <i class=\"fa-solid fa-clock\"></i>\n <span class=\"meta-label\">Last Updated:</span>\n <span class=\"meta-value\">{{ data?.entity?.__mj_UpdatedAt | date:'medium' }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Permissions Configuration Section -->\n <div class=\"content-section\">\n <div class=\"form-section\">\n <div class=\"section-header\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-users-cog\"></i>\n Role Permissions\n </h3>\n <p class=\"section-description\">Configure CRUD permissions for each role</p>\n </div>\n \n <div class=\"permissions-table-container\">\n <table class=\"permissions-table\">\n <thead>\n <tr>\n <th class=\"role-column\">Role</th>\n <th class=\"permission-column\">\n <i class=\"fa-solid fa-plus\"></i>\n Create\n </th>\n <th class=\"permission-column\">\n <i class=\"fa-solid fa-eye\"></i>\n Read\n </th>\n <th class=\"permission-column\">\n <i class=\"fa-solid fa-edit\"></i>\n Update\n </th>\n <th class=\"permission-column\">\n <i class=\"fa-solid fa-trash\"></i>\n Delete\n </th>\n <th class=\"actions-column\">Actions</th>\n </tr>\n </thead>\n <tbody>\n @for (rolePermission of rolePermissions; track rolePermission.roleId) {\n <tr class=\"permission-row\" [class.has-changes]=\"hasEntityChanges(rolePermission)\" [class.is-new]=\"rolePermission.isNew\">\n <td class=\"role-name\">\n <div class=\"role-info\">\n <i class=\"fa-solid fa-shield-halved\"></i>\n <span>{{ rolePermission.roleName }}</span>\n @if (rolePermission.isNew) {\n <span class=\"new-badge\">New</span>\n }\n @if (hasEntityChanges(rolePermission) && !rolePermission.isNew) {\n <span class=\"changed-badge\">Modified</span>\n }\n </div>\n </td>\n <td class=\"permission-cell\">\n <div class=\"permission-toggle\">\n <input \n type=\"checkbox\" \n [id]=\"'create-' + rolePermission.roleId\"\n [(ngModel)]=\"rolePermission.entityPermission.CanCreate\"\n [ngModelOptions]=\"{standalone: true}\"\n class=\"permission-checkbox\"\n />\n <label [for]=\"'create-' + rolePermission.roleId\" class=\"permission-label\">\n <div class=\"checkbox-indicator\"></div>\n </label>\n </div>\n </td>\n <td class=\"permission-cell\">\n <div class=\"permission-toggle\">\n <input \n type=\"checkbox\" \n [id]=\"'read-' + rolePermission.roleId\"\n [(ngModel)]=\"rolePermission.entityPermission.CanRead\"\n [ngModelOptions]=\"{standalone: true}\"\n class=\"permission-checkbox\"\n />\n <label [for]=\"'read-' + rolePermission.roleId\" class=\"permission-label\">\n <div class=\"checkbox-indicator\"></div>\n </label>\n </div>\n </td>\n <td class=\"permission-cell\">\n <div class=\"permission-toggle\">\n <input \n type=\"checkbox\" \n [id]=\"'update-' + rolePermission.roleId\"\n [(ngModel)]=\"rolePermission.entityPermission.CanUpdate\"\n [ngModelOptions]=\"{standalone: true}\"\n class=\"permission-checkbox\"\n />\n <label [for]=\"'update-' + rolePermission.roleId\" class=\"permission-label\">\n <div class=\"checkbox-indicator\"></div>\n </label>\n </div>\n </td>\n <td class=\"permission-cell\">\n <div class=\"permission-toggle\">\n <input \n type=\"checkbox\" \n [id]=\"'delete-' + rolePermission.roleId\"\n [(ngModel)]=\"rolePermission.entityPermission.CanDelete\"\n [ngModelOptions]=\"{standalone: true}\"\n class=\"permission-checkbox\"\n />\n <label [for]=\"'delete-' + rolePermission.roleId\" class=\"permission-label\">\n <div class=\"checkbox-indicator\"></div>\n </label>\n </div>\n </td>\n <td class=\"actions-cell\">\n <button \n type=\"button\" \n class=\"btn-icon btn-danger\"\n (click)=\"removeRolePermission(rolePermission)\"\n title=\"Remove permissions for this role\"\n >\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </table>\n \n @if (rolePermissions.length === 0) {\n <div class=\"empty-permissions\">\n <i class=\"fa-solid fa-shield-halved\"></i>\n <p>No role permissions configured</p>\n <p class=\"empty-subtext\">Add permissions for specific roles to control access to this entity</p>\n </div>\n }\n </div>\n \n <!-- Add Role Permissions -->\n <div class=\"add-role-section\">\n <div class=\"add-role-header\">\n <h4>Add Role Permissions</h4>\n <p>Select roles to configure permissions for this entity</p>\n </div>\n <div class=\"available-roles\">\n @for (role of availableRoles; track role.ID) {\n <button \n type=\"button\" \n class=\"role-chip\"\n (click)=\"addRolePermission(role)\"\n title=\"Add permissions for {{ role.Name }}\"\n >\n <i class=\"fa-solid fa-plus\"></i>\n {{ role.Name }}\n </button>\n }\n @if (availableRoles.length === 0) {\n <p class=\"no-available-roles\">All roles have been configured</p>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"dialog-footer\">\n <div class=\"footer-info\">\n @if (hasChanges) {\n <span class=\"changes-indicator\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n You have unsaved changes\n </span>\n }\n </div>\n <div class=\"footer-actions\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n Cancel\n </button>\n <button \n type=\"submit\" \n class=\"btn btn-primary\" \n [disabled]=\"!hasChanges || isLoading\"\n >\n @if (isLoading) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Saving...\n } @else {\n <i class=\"fa-solid fa-save\"></i>\n Save Permissions\n }\n </button>\n </div>\n </div>\n </form>\n </div>\n</kendo-window>", styles: ["/* Modern Dialog Styling - Matching Dashboard Design */\n:host ::ng-deep .k-window {\n border: none;\n border-radius: 12px;\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.30), 0 15px 12px rgba(0, 0, 0, 0.22);\n background: #ffffff;\n overflow: hidden;\n}\n\n:host ::ng-deep .k-window-titlebar {\n background: linear-gradient(135deg, #ffc107 0%, #e6a704 100%);\n border: none;\n padding: 24px 32px;\n min-height: 70px;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-title {\n display: none; /* Hide default title */\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions {\n position: absolute;\n top: 24px;\n right: 24px;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions .k-button {\n background: rgba(255, 255, 255, 0.1);\n border: 1px solid rgba(255, 255, 255, 0.2);\n color: #ffffff;\n border-radius: 6px;\n width: 32px;\n height: 32px;\n min-width: auto;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions .k-button:hover {\n background: rgba(255, 255, 255, 0.2);\n border-color: rgba(255, 255, 255, 0.3);\n}\n\n:host ::ng-deep .k-window-content {\n padding: 0;\n background: #ffffff;\n}\n\n/* Custom Title Bar */\n.dialog-header {\n position: relative;\n color: #ffffff;\n}\n\n.dialog-header .dialog-title {\n font-size: 18px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 16px;\n margin: 0;\n}\n\n.dialog-header .dialog-title i {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(255, 255, 255, 0.15);\n border-radius: 6px;\n font-size: 14px;\n}\n\n.dialog-header .dialog-subtitle {\n margin: 4px 0 0 0;\n font-size: 12px;\n opacity: 0.85;\n font-weight: 400;\n}\n\n/* Modal Content Areas */\n.dialog-content {\n padding: 0;\n background: #ffffff;\n}\n\n.dialog-content .content-section {\n padding: 32px;\n}\n\n.dialog-content .content-section:not(:last-child) {\n border-bottom: 1px solid #e0e0e0;\n}\n\n.dialog-footer {\n padding: 24px 32px;\n background: #fafafa;\n border-top: 1px solid #e0e0e0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n}\n\n.dialog-footer .footer-info .changes-indicator {\n color: #ffc107;\n font-size: 12px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.dialog-footer .footer-info .changes-indicator i {\n font-size: 14px;\n}\n\n.dialog-footer .footer-actions {\n display: flex;\n gap: 16px;\n}\n\n/* Form Sections */\n.form-section .section-header {\n margin-bottom: 24px;\n}\n\n.form-section .section-header .section-title {\n font-size: 16px;\n font-weight: 600;\n color: #212121;\n margin: 0 0 4px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.form-section .section-header .section-title i {\n color: #ffc107;\n font-size: 14px;\n}\n\n.form-section .section-header .section-description {\n font-size: 12px;\n color: #666666;\n margin: 0;\n}\n\n/* Entity Info Card */\n.entity-info-card {\n background: #fafafa;\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n padding: 24px;\n}\n\n.entity-info-card .entity-meta {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 16px;\n}\n\n@media (max-width: 640px) {\n .entity-info-card .entity-meta {\n grid-template-columns: 1fr;\n }\n}\n\n.entity-info-card .entity-meta .meta-item {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-info-card .entity-meta .meta-item i {\n color: #ffc107;\n width: 16px;\n font-size: 14px;\n}\n\n.entity-info-card .entity-meta .meta-item .meta-label {\n font-size: 12px;\n color: #666666;\n font-weight: 500;\n}\n\n.entity-info-card .entity-meta .meta-item .meta-value {\n font-size: 12px;\n color: #212121;\n font-weight: 500;\n}\n\n/* Permissions Table */\n.permissions-table-container {\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n overflow: hidden;\n background: #ffffff;\n}\n\n.permissions-table-container .permissions-table {\n width: 100%;\n border-collapse: collapse;\n}\n\n.permissions-table-container .permissions-table thead {\n background: #fafafa;\n}\n\n.permissions-table-container .permissions-table thead th {\n padding: 16px 24px;\n text-align: left;\n font-size: 12px;\n font-weight: 600;\n color: #212121;\n border-bottom: 1px solid #e0e0e0;\n white-space: nowrap;\n}\n\n.permissions-table-container .permissions-table thead th.role-column {\n width: 25%;\n min-width: 200px;\n}\n\n.permissions-table-container .permissions-table thead th.permission-column {\n width: 15%;\n text-align: center;\n}\n\n.permissions-table-container .permissions-table thead th.permission-column i {\n color: #ffc107;\n margin-right: 4px;\n}\n\n.permissions-table-container .permissions-table thead th.actions-column {\n width: 10%;\n text-align: center;\n}\n\n.permissions-table-container .permissions-table tbody tr {\n transition: all 0.15s ease;\n}\n\n.permissions-table-container .permissions-table tbody tr:hover {\n background: rgba(255, 193, 7, 0.05);\n}\n\n.permissions-table-container .permissions-table tbody tr.has-changes {\n background: rgba(0, 188, 212, 0.05);\n border-left: 3px solid #00bcd4;\n}\n\n.permissions-table-container .permissions-table tbody tr.is-new {\n background: rgba(76, 175, 80, 0.05);\n border-left: 3px solid #4caf50;\n}\n\n.permissions-table-container .permissions-table tbody tr td {\n padding: 16px 24px;\n border-bottom: 1px solid #fafafa;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info i {\n color: #ffc107;\n width: 16px;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info .new-badge,\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info .changed-badge {\n font-size: 11px;\n padding: 2px 4px;\n border-radius: 4px;\n font-weight: 500;\n margin-left: 8px;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info .new-badge {\n background: rgba(76, 175, 80, 0.1);\n color: #4caf50;\n}\n\n.permissions-table-container .permissions-table tbody tr td.role-name .role-info .changed-badge {\n background: rgba(0, 188, 212, 0.1);\n color: #00bcd4;\n}\n\n.permissions-table-container .permissions-table tbody tr td.permission-cell,\n.permissions-table-container .permissions-table tbody tr td.actions-cell {\n text-align: center;\n}\n\n/* Permission Toggle */\n.permission-toggle {\n display: flex;\n justify-content: center;\n}\n\n.permission-toggle .permission-checkbox {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n}\n\n.permission-toggle .permission-checkbox:checked + .permission-label .checkbox-indicator {\n background: #ffc107;\n border-color: #ffc107;\n}\n\n.permission-toggle .permission-checkbox:checked + .permission-label .checkbox-indicator::after {\n opacity: 1;\n transform: rotate(45deg) scale(1);\n}\n\n.permission-toggle .permission-checkbox:focus + .permission-label .checkbox-indicator {\n box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);\n}\n\n.permission-toggle .permission-label {\n display: flex;\n align-items: center;\n cursor: pointer;\n margin: 0;\n}\n\n.permission-toggle .checkbox-indicator {\n width: 20px;\n height: 20px;\n border: 2px solid #bdbdbd;\n border-radius: 4px;\n background: #ffffff;\n position: relative;\n transition: all 0.15s ease;\n}\n\n.permission-toggle .checkbox-indicator::after {\n content: '';\n position: absolute;\n left: 6px;\n top: 2px;\n width: 4px;\n height: 8px;\n border: solid #ffffff;\n border-width: 0 2px 2px 0;\n opacity: 0;\n transform: rotate(45deg) scale(0.8);\n transition: all 0.15s ease;\n}\n\n/* Action Buttons */\n.btn-icon {\n width: 32px;\n height: 32px;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.15s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n}\n\n.btn-icon.btn-danger {\n background: rgba(244, 67, 54, 0.1);\n color: #f44336;\n}\n\n.btn-icon.btn-danger:hover {\n background: rgba(244, 67, 54, 0.2);\n transform: scale(1.05);\n}\n\n/* Empty Permissions */\n.empty-permissions {\n text-align: center;\n padding: 32px;\n color: #666666;\n}\n\n.empty-permissions i {\n font-size: 2rem;\n color: #bdbdbd;\n margin-bottom: 16px;\n}\n\n.empty-permissions p {\n margin: 0 0 4px 0;\n font-weight: 500;\n}\n\n.empty-permissions .empty-subtext {\n font-size: 12px;\n color: #9e9e9e;\n margin: 0;\n}\n\n/* Add Role Section */\n.add-role-section {\n margin-top: 32px;\n padding-top: 24px;\n border-top: 1px solid #e0e0e0;\n}\n\n.add-role-section .add-role-header {\n margin-bottom: 24px;\n}\n\n.add-role-section .add-role-header h4 {\n font-size: 14px;\n font-weight: 600;\n color: #212121;\n margin: 0 0 4px 0;\n}\n\n.add-role-section .add-role-header p {\n font-size: 12px;\n color: #666666;\n margin: 0;\n}\n\n.add-role-section .available-roles {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.add-role-section .available-roles .role-chip {\n padding: 8px 16px;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n background: #ffffff;\n color: #212121;\n font-size: 12px;\n cursor: pointer;\n transition: all 0.15s ease;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.add-role-section .available-roles .role-chip i {\n font-size: 12px;\n color: #ffc107;\n}\n\n.add-role-section .available-roles .role-chip:hover {\n border-color: #ffc107;\n background: rgba(255, 193, 7, 0.05);\n transform: translateY(-1px);\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.add-role-section .available-roles .no-available-roles {\n color: #9e9e9e;\n font-style: italic;\n margin: 0;\n}\n\n/* Alert Messages */\n.alert {\n padding: 16px 24px;\n border-radius: 8px;\n margin-bottom: 24px;\n display: flex;\n align-items: flex-start;\n gap: 16px;\n}\n\n.alert i {\n font-size: 16px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.alert.alert-error {\n background: rgba(244, 67, 54, 0.1);\n border: 1px solid rgba(244, 67, 54, 0.2);\n color: #c62828;\n}\n\n.alert.alert-error i {\n color: #f44336;\n}\n\n/* Button Styles */\n.dialog-footer .btn {\n padding: 8px 24px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n border: 1px solid transparent;\n cursor: pointer;\n transition: all 0.15s ease;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-height: 36px;\n}\n\n.dialog-footer .btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.dialog-footer .btn:disabled i.fa-spinner {\n animation: spin 1s linear infinite;\n}\n\n.dialog-footer .btn.btn-secondary {\n background: #ffffff;\n color: #666666;\n border-color: #bdbdbd;\n}\n\n.dialog-footer .btn.btn-secondary:hover:not(:disabled) {\n background: #f8f9fa;\n border-color: #757575;\n color: #212121;\n}\n\n.dialog-footer .btn.btn-primary {\n background: #ffc107;\n color: #ffffff;\n}\n\n.dialog-footer .btn.btn-primary:hover:not(:disabled) {\n background: #ffb300;\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);\n transform: translateY(-1px);\n}\n\n@keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n :host ::ng-deep .k-window {\n margin: 16px;\n max-width: none;\n width: calc(100vw - 24px) !important;\n height: calc(100vh - 24px) !important;\n }\n \n :host ::ng-deep .k-window-titlebar {\n padding: 16px 24px;\n min-height: 60px;\n }\n \n .dialog-content .content-section {\n padding: 24px 16px;\n }\n \n .dialog-footer {\n padding: 16px 24px;\n flex-direction: column;\n }\n \n .dialog-footer .footer-info,\n .dialog-footer .footer-actions {\n width: 100%;\n }\n \n .dialog-footer .footer-actions {\n display: flex;\n gap: 16px;\n }\n \n .dialog-footer .footer-actions .btn {\n flex: 1;\n justify-content: center;\n }\n \n .permissions-table-container {\n overflow-x: auto;\n }\n \n .permissions-table-container .permissions-table {\n min-width: 600px;\n }\n \n .available-roles .role-chip {\n flex: 1;\n min-width: 120px;\n justify-content: center;\n }\n}"] }]
|
|
453
|
+
}], () => [], { data: [{
|
|
454
|
+
type: Input
|
|
455
|
+
}], visible: [{
|
|
456
|
+
type: Input
|
|
457
|
+
}], result: [{
|
|
458
|
+
type: Output
|
|
459
|
+
}], onEscapeKey: [{
|
|
460
|
+
type: HostListener,
|
|
461
|
+
args: ['document:keydown.escape', ['$event']]
|
|
462
|
+
}] }); })();
|
|
463
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PermissionDialogComponent, { className: "PermissionDialogComponent", filePath: "src/lib/entity-permissions/permission-dialog/permission-dialog.component.ts", lineNumber: 34 }); })();
|
|
464
|
+
//# sourceMappingURL=permission-dialog.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/entity-permissions/permission-dialog/permission-dialog.component.ts","../../../../src/lib/entity-permissions/permission-dialog/permission-dialog.component.html"],"names":[],"mappings":"AAAA,OA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MAAM,cAAc,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;QAChE,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,YAAY,EAAE,OAAO,IAAI,uCAAuC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7I,CAAC;IACH,CAAC;IAEM,QAAQ;QACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACzC,CAAC;mFA5LU,yBAAyB;6DAAzB,yBAAyB;YAAzB,sHAAA,uBAAmB,iCAAM;;YCjCtC,8FAQuB;;YAPpB,kCAAa;4BD2BJ,YAAY,wBAAE,WAAW,8GAAE,mBAAmB,yBAAE,YAAY;;iFAK3D,yBAAyB;cARrC,SAAS;2BACE,sBAAsB,cACpB,IAAI,WACP,CAAC,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,YAAY,CAAC,iBACxD,iBAAiB,CAAC,IAAI;oBAK5B,IAAI;kBAAZ,KAAK;YACG,OAAO;kBAAf,KAAK;YACI,MAAM;kBAAf,MAAM;YAgDP,WAAW;kBADV,YAAY;mBAAC,yBAAyB,EAAE,CAAC,QAAQ,CAAC;;kFAlDxC,yBAAyB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { RoleEntity } from '@memberjunction/core-entities';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface RoleDialogData {
|
|
6
|
+
role?: RoleEntity;
|
|
7
|
+
mode: 'create' | 'edit';
|
|
8
|
+
}
|
|
9
|
+
export interface RoleDialogResult {
|
|
10
|
+
action: 'save' | 'cancel';
|
|
11
|
+
role?: RoleEntity;
|
|
12
|
+
}
|
|
13
|
+
export declare class RoleDialogComponent implements OnInit, OnDestroy, OnChanges {
|
|
14
|
+
data: RoleDialogData | null;
|
|
15
|
+
visible: boolean;
|
|
16
|
+
result: EventEmitter<RoleDialogResult>;
|
|
17
|
+
private fb;
|
|
18
|
+
private metadata;
|
|
19
|
+
roleForm: FormGroup;
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
error: string | null;
|
|
22
|
+
constructor();
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
private resetForm;
|
|
27
|
+
onEscapeKey(event: KeyboardEvent): void;
|
|
28
|
+
get windowTitle(): string;
|
|
29
|
+
get isEditMode(): boolean;
|
|
30
|
+
get isSystemRole(): boolean;
|
|
31
|
+
private loadRoleData;
|
|
32
|
+
onSubmit(): Promise<void>;
|
|
33
|
+
onCancel(): void;
|
|
34
|
+
private markFormGroupTouched;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RoleDialogComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RoleDialogComponent, "mj-role-dialog", never, { "data": { "alias": "data"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; }, { "result": "result"; }, never, never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=role-dialog.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/role-management/role-dialog/role-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAA2C,MAAM,eAAe,CAAC;AAE7J,OAAO,EAAiD,SAAS,EAAc,MAAM,gBAAgB,CAAC;AAEtG,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;;AAG3D,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,I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