@cauca-911/management 22.0.3 → 22.0.4
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injector, inject, Injectable, computed, ChangeDetectionStrategy, Component, ViewChild, signal, viewChild, resource, effect, untracked, model, input, HostListener, forwardRef, ViewEncapsulation, output
|
|
2
|
+
import { InjectionToken, Injector, inject, Injectable, computed, ChangeDetectionStrategy, Component, ViewChild, signal, viewChild, resource, effect, untracked, model, input, HostListener, forwardRef, ViewEncapsulation, output } from '@angular/core';
|
|
3
3
|
import { pendingChangesGuard, DialogService, PageTitleComponent, LoadingSpinnerIndicatorComponent, LoadingErrorComponent, StrokedButtonComponent, RaisedButtonComponent, ListPaginatorComponent, IconButtonComponent, LoadingStateService, GroupContainerComponent, ConfirmationResult, SavingErrorBoxComponent, MenuItemComponent } from '@cauca-911/material';
|
|
4
4
|
import * as i1 from '@angular/material/card';
|
|
5
5
|
import { MatCardModule } from '@angular/material/card';
|
|
@@ -36,18 +36,6 @@ import * as i2$1 from '@angular/material/menu';
|
|
|
36
36
|
import { MatMenuModule } from '@angular/material/menu';
|
|
37
37
|
import { NgStyle } from '@angular/common';
|
|
38
38
|
import { MatColumnDef, MatHeaderCell, MatHeaderCellDef, MatCell, MatCellDef, MatFooterCell, MatFooterCellDef } from '@angular/material/table';
|
|
39
|
-
import * as i1$3 from '@cauca-911/devextreme';
|
|
40
|
-
import { CaucaDevextremeModule } from '@cauca-911/devextreme';
|
|
41
|
-
import * as i4$2 from 'devextreme-angular/ui/check-box';
|
|
42
|
-
import { DxCheckBoxModule } from 'devextreme-angular/ui/check-box';
|
|
43
|
-
import * as i5$1 from 'devextreme-angular/ui/list';
|
|
44
|
-
import { DxListModule } from 'devextreme-angular/ui/list';
|
|
45
|
-
import * as i6$1 from 'devextreme-angular/ui/tag-box';
|
|
46
|
-
import { DxTagBoxModule } from 'devextreme-angular/ui/tag-box';
|
|
47
|
-
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
48
|
-
import { map } from 'rxjs/operators';
|
|
49
|
-
import * as i2$2 from 'devextreme-angular/ui/nested';
|
|
50
|
-
import * as i3$2 from 'devextreme-angular/core';
|
|
51
39
|
|
|
52
40
|
const MANAGEMENT_URL_PREFIX = new InjectionToken('MANAGEMENT_URL_PREFIX');
|
|
53
41
|
const MANAGEMENT_ROUTE_SEGMENT = new InjectionToken('MANAGEMENT_ROUTE_SEGMENT');
|
|
@@ -105,7 +93,7 @@ class GroupManagementService {
|
|
|
105
93
|
}]
|
|
106
94
|
}], null, null); })();
|
|
107
95
|
|
|
108
|
-
const _c0$
|
|
96
|
+
const _c0$4 = () => ["name"];
|
|
109
97
|
class GroupListGridComponent {
|
|
110
98
|
constructor() {
|
|
111
99
|
this.columns = computed(() => this.getColumns(), /* @ts-ignore */
|
|
@@ -163,7 +151,7 @@ class GroupListGridComponent {
|
|
|
163
151
|
i0.ɵɵlistener("deleteClick", function GroupListGridComponent_Template_cauca_data_grid_commands_column_deleteClick_6_listener($event) { return ctx.deleteGroup($event); });
|
|
164
152
|
i0.ɵɵelementEnd()();
|
|
165
153
|
} if (rf & 2) {
|
|
166
|
-
i0.ɵɵproperty("showTableOptions", true)("showAddButton", true)("addButtonLabel", i0.ɵɵpipeBind1(1, 10, "groups.addButtonLabel"))("baseSort", i0.ɵɵpureFunction0(16, _c0$
|
|
154
|
+
i0.ɵɵproperty("showTableOptions", true)("showAddButton", true)("addButtonLabel", i0.ɵɵpipeBind1(1, 10, "groups.addButtonLabel"))("baseSort", i0.ɵɵpureFunction0(16, _c0$4))("filterPredicate", ctx.filterPredicate)("displayedColumns", ctx.columns());
|
|
167
155
|
i0.ɵɵadvance(2);
|
|
168
156
|
i0.ɵɵproperty("label", i0.ɵɵpipeBind1(3, 12, "groups.groupNameColumnLabel"));
|
|
169
157
|
i0.ɵɵadvance(2);
|
|
@@ -367,7 +355,7 @@ class UserSearchService {
|
|
|
367
355
|
}]
|
|
368
356
|
}], null, null); })();
|
|
369
357
|
|
|
370
|
-
const _c0$
|
|
358
|
+
const _c0$3 = ["resultPaginator"];
|
|
371
359
|
const _forTrack0$4 = ($index, $item) => $item.id;
|
|
372
360
|
function GroupUserSelectionDialogComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
373
361
|
i0.ɵɵelementStart(0, "div", 8);
|
|
@@ -521,7 +509,7 @@ class GroupUserSelectionDialogComponent {
|
|
|
521
509
|
}
|
|
522
510
|
static { this.ɵfac = function GroupUserSelectionDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GroupUserSelectionDialogComponent)(); }; }
|
|
523
511
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GroupUserSelectionDialogComponent, selectors: [["cauca-group-user-selection-dialog"]], viewQuery: function GroupUserSelectionDialogComponent_Query(rf, ctx) { if (rf & 1) {
|
|
524
|
-
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$
|
|
512
|
+
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$3, 5);
|
|
525
513
|
} if (rf & 2) {
|
|
526
514
|
i0.ɵɵqueryAdvance();
|
|
527
515
|
} }, features: [i0.ɵɵProvidersFeature([UserSearchService, LoadingStateService])], decls: 28, vars: 15, consts: [["resultPaginator", ""], ["mat-dialog-title", ""], [1, "h6"], ["id", "closeButton", "icon", "close", 3, "buttonClick"], [1, "dialog-content"], ["subscriptSizing", "dynamic", 1, "search-field"], ["matInput", "", "type", "text", 3, "input", "value"], ["matSuffix", ""], [1, "search-hint", "body2"], [1, "results-region"], [3, "retryRequest"], [1, "no-results", "body2"], [1, "dialog-actions"], [1, "selected-users-panel"], [1, "selected-users-label", "caption"], [1, "selected-users-names", "body2", 3, "matTooltip"], ["color", "primary", "label", "cancel", 3, "buttonClick"], ["color", "primary", "label", "ok", 3, "buttonClick", "isDisabled"], [1, "results-list", 3, "selectionChange", "compareWith"], ["color", "primary", 1, "result-item", 3, "value", "selected", "result-item--even"], [3, "itemsCount", "pageSize"], ["color", "primary", 1, "result-item", 3, "value", "selected"], ["matListItemTitle", ""], ["matListItemSubtitle", ""], [3, "pageChange", "itemsCount", "pageSize"]], template: function GroupUserSelectionDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -610,7 +598,7 @@ class GroupUserSelectionDialogComponent {
|
|
|
610
598
|
}], () => [], { paginator: [{ type: i0.ViewChild, args: ['resultPaginator', { isSignal: true }] }] }); })();
|
|
611
599
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GroupUserSelectionDialogComponent, { className: "GroupUserSelectionDialogComponent", filePath: "lib/components/group-user-selection-dialog/group-user-selection-dialog.component.ts", lineNumber: 46 }); })();
|
|
612
600
|
|
|
613
|
-
const _c0$
|
|
601
|
+
const _c0$2 = ["paginator"];
|
|
614
602
|
const _forTrack0$3 = ($index, $item) => $item.id;
|
|
615
603
|
function GroupUserEditionListComponent_For_10_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
616
604
|
i0.ɵɵelementStart(0, "div", 11);
|
|
@@ -746,7 +734,7 @@ class GroupUserEditionListComponent {
|
|
|
746
734
|
}
|
|
747
735
|
static { this.ɵfac = function GroupUserEditionListComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GroupUserEditionListComponent)(); }; }
|
|
748
736
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GroupUserEditionListComponent, selectors: [["cauca-group-user-edition-list"]], viewQuery: function GroupUserEditionListComponent_Query(rf, ctx) { if (rf & 1) {
|
|
749
|
-
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$
|
|
737
|
+
i0.ɵɵviewQuerySignal(ctx.paginator, _c0$2, 5);
|
|
750
738
|
} if (rf & 2) {
|
|
751
739
|
i0.ɵɵqueryAdvance();
|
|
752
740
|
} }, features: [i0.ɵɵProvidersFeature([DialogService])], decls: 14, vars: 6, consts: [["paginator", ""], [1, "user-edition-list"], ["subscriptSizing", "dynamic", 1, "filter-field"], ["matInput", "", "type", "text", 3, "input", "value"], ["matSuffix", ""], [1, "users-list"], [1, "user-item"], [3, "itemsCount", "pageSize"], ["color", "primary", "label", "groupEdition.addUsersButton", 1, "add-users-button", 3, "buttonClick"], ["matListItemIcon", ""], ["matListItemTitle", "", 1, "user-name"], ["matListItemLine", "", 1, "user-additional-information"], ["matListItemMeta", "", "icon", "delete", "color", "error", 1, "delete-button", 3, "buttonClick"], [1, "no-users", "body2"], [3, "pageChange", "itemsCount", "pageSize"]], template: function GroupUserEditionListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -1396,14 +1384,14 @@ class UserPermissionsDialogComponent {
|
|
|
1396
1384
|
}], null, null); })();
|
|
1397
1385
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserPermissionsDialogComponent, { className: "UserPermissionsDialogComponent", filePath: "lib/components/user-permissions-dialog/user-permissions-dialog.component.ts", lineNumber: 31 }); })();
|
|
1398
1386
|
|
|
1399
|
-
const _c0$
|
|
1387
|
+
const _c0$1 = a0 => ({ "width": a0 });
|
|
1400
1388
|
function ScopeListGridColumnComponent_th_1_Template(rf, ctx) { if (rf & 1) {
|
|
1401
1389
|
i0.ɵɵelementStart(0, "th", 4);
|
|
1402
1390
|
i0.ɵɵtext(1);
|
|
1403
1391
|
i0.ɵɵelementEnd();
|
|
1404
1392
|
} if (rf & 2) {
|
|
1405
1393
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
1406
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c0$
|
|
1394
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c0$1, ctx_r0.width()));
|
|
1407
1395
|
i0.ɵɵadvance();
|
|
1408
1396
|
i0.ɵɵtextInterpolate1(" ", ctx_r0.label() ?? ctx_r0.capitalize(ctx_r0.prop()), " ");
|
|
1409
1397
|
} }
|
|
@@ -1489,7 +1477,7 @@ class ScopeListGridColumnComponent extends BaseGridColumnComponent {
|
|
|
1489
1477
|
}], () => [], { allLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "allLabel", required: true }] }] }); })();
|
|
1490
1478
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ScopeListGridColumnComponent, { className: "ScopeListGridColumnComponent", filePath: "lib/components/scope-list-grid-column/scope-list-grid-column.component.ts", lineNumber: 28 }); })();
|
|
1491
1479
|
|
|
1492
|
-
const _c0
|
|
1480
|
+
const _c0 = () => ["userName"];
|
|
1493
1481
|
const _forTrack0 = ($index, $item) => $item.prop;
|
|
1494
1482
|
function UserListGridComponent_For_9_Case_0_Template(rf, ctx) { if (rf & 1) {
|
|
1495
1483
|
i0.ɵɵelement(0, "cauca-scope-list-grid-column", 6);
|
|
@@ -1549,8 +1537,12 @@ const SharedSearchedColumns = ['searchableUserName', 'searchableFirstName', 'sea
|
|
|
1549
1537
|
class UserListGridComponent {
|
|
1550
1538
|
constructor() {
|
|
1551
1539
|
/**
|
|
1552
|
-
* Read when the grid registers its columns, in `ngAfterContentInit`.
|
|
1553
|
-
*
|
|
1540
|
+
* Read when the grid registers its columns, in `ngAfterContentInit`. Changing it afterwards
|
|
1541
|
+
* recomputes `columns()` but does not re-run `applyColumns()`, so the MatTable is asked to
|
|
1542
|
+
* render a column id it never registered and throws `Could not find column with id "X"`.
|
|
1543
|
+
* `showPermissions`, `canEdit` and `canDelete` gate the row-action column the same way and
|
|
1544
|
+
* carry the same constraint — and are the more likely one to hit, since a consumer binds them
|
|
1545
|
+
* to an async permission signal more readily than it replaces the column list.
|
|
1554
1546
|
*/
|
|
1555
1547
|
this.extraColumns = input([], /* @ts-ignore */
|
|
1556
1548
|
...(ngDevMode ? [{ debugName: "extraColumns" }] : /* istanbul ignore next */ []));
|
|
@@ -1614,7 +1606,7 @@ class UserListGridComponent {
|
|
|
1614
1606
|
i0.ɵɵviewQuerySignal(ctx.grid, OdataGridComponent, 5)(ctx.sort, MatSort, 5);
|
|
1615
1607
|
} if (rf & 2) {
|
|
1616
1608
|
i0.ɵɵqueryAdvance(2);
|
|
1617
|
-
} }, inputs: { extraColumns: [1, "extraColumns"], showAddButton: [1, "showAddButton"], addButtonLabel: [1, "addButtonLabel"], canEdit: [1, "canEdit"], canDelete: [1, "canDelete"], editLinkField: [1, "editLinkField"], showPermissions: [1, "showPermissions"], persistState: [1, "persistState"] }, outputs: { addClick: "addClick", deleteClick: "deleteClick" }, decls: 11, vars: 24, consts: [["menuTemplate", ""], ["matSort", "", "matSortActive", "userName", "matSortDirection", "asc", "aria-
|
|
1609
|
+
} }, inputs: { extraColumns: [1, "extraColumns"], showAddButton: [1, "showAddButton"], addButtonLabel: [1, "addButtonLabel"], canEdit: [1, "canEdit"], canDelete: [1, "canDelete"], editLinkField: [1, "editLinkField"], showPermissions: [1, "showPermissions"], persistState: [1, "persistState"] }, outputs: { addClick: "addClick", deleteClick: "deleteClick" }, decls: 11, vars: 24, consts: [["menuTemplate", ""], ["matSort", "", "matSortActive", "userName", "matSortDirection", "asc", "aria-label", "Users table", "resourceName", "UserList", 3, "addButtonClick", "persistState", "showTableOptions", "showRefreshButton", "showAddButton", "addButtonLabel", "baseSort", "filterPredicate", "displayedColumns"], ["id", "userName", "prop", "userName", 3, "showToolTip", "label"], ["id", "firstName", "prop", "firstName", 3, "showToolTip", "label"], ["id", "lastName", "prop", "lastName", 3, "showToolTip", "label"], ["id", "buttons", "prop", "menu", 3, "canEdit", "canDelete", "editLinkField"], [3, "id", "prop", "width", "showToolTip", "allLabel", "label"], [3, "id", "prop", "width", "label"], [3, "id", "prop", "width", "showToolTip", "label"], ["id", "buttons", "prop", "menu", 3, "deleteClick", "canEdit", "canDelete", "editLinkField"], ["icon", "list", "label", "userList.viewPermissions", 3, "translateLabel"], ["icon", "list", "label", "userList.viewPermissions", 3, "buttonClick", "translateLabel"]], template: function UserListGridComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1618
1610
|
i0.ɵɵelementStart(0, "cauca-odata-grid", 1);
|
|
1619
1611
|
i0.ɵɵpipe(1, "translate");
|
|
1620
1612
|
i0.ɵɵlistener("addButtonClick", function UserListGridComponent_Template_cauca_odata_grid_addButtonClick_0_listener() { return ctx.addClick.emit(); });
|
|
@@ -1628,7 +1620,7 @@ class UserListGridComponent {
|
|
|
1628
1620
|
i0.ɵɵconditionalCreate(10, UserListGridComponent_Conditional_10_Template, 3, 3, "cauca-data-grid-menu-column", 5);
|
|
1629
1621
|
i0.ɵɵelementEnd();
|
|
1630
1622
|
} if (rf & 2) {
|
|
1631
|
-
i0.ɵɵproperty("persistState", ctx.persistState())("showTableOptions", true)("showRefreshButton", true)("showAddButton", ctx.showAddButton())("addButtonLabel", i0.ɵɵpipeBind1(1, 15, ctx.addButtonLabel()))("baseSort", i0.ɵɵpureFunction0(23, _c0
|
|
1623
|
+
i0.ɵɵproperty("persistState", ctx.persistState())("showTableOptions", true)("showRefreshButton", true)("showAddButton", ctx.showAddButton())("addButtonLabel", i0.ɵɵpipeBind1(1, 15, ctx.addButtonLabel()))("baseSort", i0.ɵɵpureFunction0(23, _c0))("filterPredicate", ctx.filterPredicate)("displayedColumns", ctx.columns());
|
|
1632
1624
|
i0.ɵɵadvance(2);
|
|
1633
1625
|
i0.ɵɵproperty("showToolTip", true)("label", i0.ɵɵpipeBind1(3, 17, "userList.column.userName"));
|
|
1634
1626
|
i0.ɵɵadvance(2);
|
|
@@ -1647,7 +1639,7 @@ class UserListGridComponent {
|
|
|
1647
1639
|
args: [{ selector: 'cauca-user-list-grid', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1648
1640
|
MatSort, OdataGridComponent, SortableDataGridColumnComponent, SortableDataGridCheckColumnComponent,
|
|
1649
1641
|
ScopeListGridColumnComponent, DataGridMenuColumnComponent, MenuItemComponent, TranslatePipe,
|
|
1650
|
-
], template: "<cauca-odata-grid\n matSort\n matSortActive=\"userName\"\n matSortDirection=\"asc\"\n
|
|
1642
|
+
], template: "<cauca-odata-grid\n matSort\n matSortActive=\"userName\"\n matSortDirection=\"asc\"\n aria-label=\"Users table\"\n resourceName=\"UserList\"\n [persistState]=\"persistState()\"\n [showTableOptions]=\"true\"\n [showRefreshButton]=\"true\"\n [showAddButton]=\"showAddButton()\"\n [addButtonLabel]=\"addButtonLabel() | translate\"\n (addButtonClick)=\"addClick.emit()\"\n [baseSort]=\"['userName']\"\n [filterPredicate]=\"filterPredicate\"\n [displayedColumns]=\"columns()\">\n\n <cauca-sortable-data-grid-column id=\"userName\" prop=\"userName\" [showToolTip]=\"true\"\n [label]=\"'userList.column.userName' | translate\"/>\n <cauca-sortable-data-grid-column id=\"firstName\" prop=\"firstName\" [showToolTip]=\"true\"\n [label]=\"'userList.column.firstName' | translate\"/>\n <cauca-sortable-data-grid-column id=\"lastName\" prop=\"lastName\" [showToolTip]=\"true\"\n [label]=\"'userList.column.lastName' | translate\"/>\n\n @for (column of extraColumns(); track column.prop) {\n @switch (column.kind) {\n @case ('scope') {\n <cauca-scope-list-grid-column [id]=\"column.prop\" [prop]=\"column.prop\"\n [width]=\"column.width ?? ''\"\n [showToolTip]=\"column.showToolTip ?? true\"\n [allLabel]=\"column.allLabel ?? ''\"\n [label]=\"column.label | translate\"/>\n }\n @case ('check') {\n <cauca-sortable-data-grid-check-column [id]=\"column.prop\" [prop]=\"column.prop\"\n [width]=\"column.width ?? ''\"\n [label]=\"column.label | translate\"/>\n }\n @default {\n <cauca-sortable-data-grid-column [id]=\"column.prop\" [prop]=\"column.prop\"\n [width]=\"column.width ?? ''\"\n [showToolTip]=\"column.showToolTip ?? true\"\n [label]=\"column.label | translate\"/>\n }\n }\n }\n\n @if (hasRowActions()) {\n <cauca-data-grid-menu-column id=\"buttons\" prop=\"menu\"\n [canEdit]=\"canEdit()\"\n [canDelete]=\"canDelete()\"\n [editLinkField]=\"editLinkField()\"\n (deleteClick)=\"onDelete($event)\">\n <ng-template #menuTemplate let-row=\"row\">\n @if (showPermissions()) {\n <cauca-menu-item icon=\"list\" label=\"userList.viewPermissions\" [translateLabel]=\"true\"\n (buttonClick)=\"openPermissions(row)\"/>\n }\n </ng-template>\n </cauca-data-grid-menu-column>\n }\n\n</cauca-odata-grid>\n" }]
|
|
1651
1643
|
}], null, { extraColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraColumns", required: false }] }], showAddButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAddButton", required: false }] }], addButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "addButtonLabel", required: false }] }], canEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEdit", required: false }] }], canDelete: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDelete", required: false }] }], editLinkField: [{ type: i0.Input, args: [{ isSignal: true, alias: "editLinkField", required: false }] }], showPermissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPermissions", required: false }] }], persistState: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistState", required: false }] }], addClick: [{ type: i0.Output, args: ["addClick"] }], deleteClick: [{ type: i0.Output, args: ["deleteClick"] }], grid: [{ type: i0.ViewChild, args: [i0.forwardRef(() => OdataGridComponent), { isSignal: true }] }], sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }] }); })();
|
|
1652
1644
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserListGridComponent, { className: "UserListGridComponent", filePath: "lib/components/user-list-grid/user-list-grid.component.ts", lineNumber: 27 }); })();
|
|
1653
1645
|
|
|
@@ -1706,615 +1698,6 @@ class UsersPageComponent {
|
|
|
1706
1698
|
}], null, { caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], baseCrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseCrumb", required: false }] }], breadcrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumb", required: false }] }], extraColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraColumns", required: false }] }], showAddButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAddButton", required: false }] }], addButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "addButtonLabel", required: false }] }], canEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEdit", required: false }] }], canDelete: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDelete", required: false }] }], editLinkField: [{ type: i0.Input, args: [{ isSignal: true, alias: "editLinkField", required: false }] }], showPermissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPermissions", required: false }] }], persistState: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistState", required: false }] }], addClick: [{ type: i0.Output, args: ["addClick"] }], deleteClick: [{ type: i0.Output, args: ["deleteClick"] }], grid: [{ type: i0.ViewChild, args: [i0.forwardRef(() => UserListGridComponent), { isSignal: true }] }] }); })();
|
|
1707
1699
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UsersPageComponent, { className: "UsersPageComponent", filePath: "lib/pages/users-page/users-page.component.ts", lineNumber: 14 }); })();
|
|
1708
1700
|
|
|
1709
|
-
class CaucaManagementService {
|
|
1710
|
-
static { this.ɵfac = function CaucaManagementService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementService)(); }; }
|
|
1711
|
-
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaucaManagementService, factory: CaucaManagementService.ɵfac, providedIn: 'root' }); }
|
|
1712
|
-
}
|
|
1713
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementService, [{
|
|
1714
|
-
type: Injectable,
|
|
1715
|
-
args: [{
|
|
1716
|
-
providedIn: 'root'
|
|
1717
|
-
}]
|
|
1718
|
-
}], null, null); })();
|
|
1719
|
-
|
|
1720
|
-
class CaucaManagementComponent {
|
|
1721
|
-
static { this.ɵfac = function CaucaManagementComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementComponent)(); }; }
|
|
1722
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementComponent, selectors: [["cauca-management"]], decls: 3, vars: 3, template: function CaucaManagementComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1723
|
-
i0.ɵɵdomElementStart(0, "div");
|
|
1724
|
-
i0.ɵɵtext(1);
|
|
1725
|
-
i0.ɵɵpipe(2, "translate");
|
|
1726
|
-
i0.ɵɵdomElementEnd();
|
|
1727
|
-
} if (rf & 2) {
|
|
1728
|
-
i0.ɵɵadvance();
|
|
1729
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "core.noGenericComponentOnThisLibrary"));
|
|
1730
|
-
} }, dependencies: [TranslatePipe], encapsulation: 2 }); }
|
|
1731
|
-
}
|
|
1732
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementComponent, [{
|
|
1733
|
-
type: Component,
|
|
1734
|
-
args: [{ selector: 'cauca-management', imports: [TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>{{'core.noGenericComponentOnThisLibrary' | translate}}</div>" }]
|
|
1735
|
-
}], null, null); })();
|
|
1736
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaManagementComponent, { className: "CaucaManagementComponent", filePath: "lib/cauca-management.component.ts", lineNumber: 11 }); })();
|
|
1737
|
-
|
|
1738
|
-
/**
|
|
1739
|
-
* @deprecated This service is obsolete and should not be used.
|
|
1740
|
-
*/
|
|
1741
|
-
class ManagementGroupService {
|
|
1742
|
-
constructor() {
|
|
1743
|
-
this.http = inject(HttpClient);
|
|
1744
|
-
this.baseUrl = inject(CaucaCoreService).getConfig().apiUrl;
|
|
1745
|
-
this.baseUrlToUse = this.baseUrl.endsWith('api/') ? this.baseUrl : this.baseUrl + 'api/';
|
|
1746
|
-
}
|
|
1747
|
-
getAll() {
|
|
1748
|
-
return this.http.get(`${this.baseUrlToUse}GroupManagement`);
|
|
1749
|
-
}
|
|
1750
|
-
get(idGroup) {
|
|
1751
|
-
return this.http.get(`${this.baseUrlToUse}GroupManagement/${idGroup}`);
|
|
1752
|
-
}
|
|
1753
|
-
save(group) {
|
|
1754
|
-
return this.http.post(`${this.baseUrlToUse}GroupManagement`, group);
|
|
1755
|
-
}
|
|
1756
|
-
delete(idGroup) {
|
|
1757
|
-
return this.http.delete(`${this.baseUrlToUse}GroupManagement/${idGroup}`);
|
|
1758
|
-
}
|
|
1759
|
-
hasExistingGroupName(group) {
|
|
1760
|
-
return this.http.post(`${this.baseUrlToUse}GroupManagement/GroupNameAlreadyExist`, group);
|
|
1761
|
-
}
|
|
1762
|
-
static { this.ɵfac = function ManagementGroupService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ManagementGroupService)(); }; }
|
|
1763
|
-
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ManagementGroupService, factory: ManagementGroupService.ɵfac, providedIn: 'root' }); }
|
|
1764
|
-
}
|
|
1765
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManagementGroupService, [{
|
|
1766
|
-
type: Injectable,
|
|
1767
|
-
args: [{
|
|
1768
|
-
providedIn: 'root'
|
|
1769
|
-
}]
|
|
1770
|
-
}], null, null); })();
|
|
1771
|
-
|
|
1772
|
-
/**
|
|
1773
|
-
* @deprecated This service is obsolete and should not be used.
|
|
1774
|
-
*/
|
|
1775
|
-
class ManagementUserService {
|
|
1776
|
-
constructor() {
|
|
1777
|
-
this.http = inject(HttpClient);
|
|
1778
|
-
this.baseUrl = inject(CaucaCoreService).getConfig().apiUrl;
|
|
1779
|
-
this.baseUrlToUse = this.baseUrl.endsWith('api/') ? this.baseUrl : this.baseUrl + 'api/';
|
|
1780
|
-
}
|
|
1781
|
-
getAll() {
|
|
1782
|
-
return this.http.get(`${this.baseUrlToUse}UserManagement`);
|
|
1783
|
-
}
|
|
1784
|
-
get(idUser) {
|
|
1785
|
-
return this.http.get(`${this.baseUrlToUse}UserManagement/${idUser}`);
|
|
1786
|
-
}
|
|
1787
|
-
getGroup(idUser) {
|
|
1788
|
-
return this.http.get(`${this.baseUrlToUse}UserManagement/${idUser}/groups`);
|
|
1789
|
-
}
|
|
1790
|
-
addGroup(userGroup) {
|
|
1791
|
-
return this.http.post(`${this.baseUrlToUse}UserManagement/group`, userGroup);
|
|
1792
|
-
}
|
|
1793
|
-
deleteGroup(idUserGroup) {
|
|
1794
|
-
return this.http.delete(`${this.baseUrlToUse}UserManagement/groups/${idUserGroup}`);
|
|
1795
|
-
}
|
|
1796
|
-
addPermission(userPermission) {
|
|
1797
|
-
return this.http.post(`${this.baseUrlToUse}UserManagement/permission`, userPermission);
|
|
1798
|
-
}
|
|
1799
|
-
deletePermission(idUserPermission) {
|
|
1800
|
-
return this.http.delete(`${this.baseUrlToUse}UserManagement/groups/${idUserPermission}`);
|
|
1801
|
-
}
|
|
1802
|
-
save(user) {
|
|
1803
|
-
return this.http.post(`${this.baseUrlToUse}UserManagement`, user);
|
|
1804
|
-
}
|
|
1805
|
-
delete(idUser) {
|
|
1806
|
-
return this.http.delete(`${this.baseUrlToUse}UserManagement/${idUser}`);
|
|
1807
|
-
}
|
|
1808
|
-
hasExistingUserName(user) {
|
|
1809
|
-
return this.http.post(`${this.baseUrlToUse}UserManagement/UserNameAlreadyExist`, user);
|
|
1810
|
-
}
|
|
1811
|
-
static { this.ɵfac = function ManagementUserService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ManagementUserService)(); }; }
|
|
1812
|
-
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ManagementUserService, factory: ManagementUserService.ɵfac, providedIn: 'root' }); }
|
|
1813
|
-
}
|
|
1814
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManagementUserService, [{
|
|
1815
|
-
type: Injectable,
|
|
1816
|
-
args: [{
|
|
1817
|
-
providedIn: 'root'
|
|
1818
|
-
}]
|
|
1819
|
-
}], null, null); })();
|
|
1820
|
-
|
|
1821
|
-
/**
|
|
1822
|
-
* @deprecated This service is obsolete and should not be used.
|
|
1823
|
-
*/
|
|
1824
|
-
class ManagementPermissionService {
|
|
1825
|
-
constructor() {
|
|
1826
|
-
this.http = inject(HttpClient);
|
|
1827
|
-
this.baseUrl = inject(CaucaCoreService).getConfig().apiUrl;
|
|
1828
|
-
this.baseUrlToUse = this.baseUrl.endsWith('api/') ? this.baseUrl : this.baseUrl + 'api/';
|
|
1829
|
-
}
|
|
1830
|
-
getAll() {
|
|
1831
|
-
return this.http.get(`${this.baseUrlToUse}PermissionManagement`);
|
|
1832
|
-
}
|
|
1833
|
-
get(idPermission) {
|
|
1834
|
-
return this.http.get(`${this.baseUrlToUse}PermissionManagement/${idPermission}`);
|
|
1835
|
-
}
|
|
1836
|
-
save(permission) {
|
|
1837
|
-
return this.http.post(`${this.baseUrlToUse}PermissionManagement`, permission);
|
|
1838
|
-
}
|
|
1839
|
-
delete(idPermission) {
|
|
1840
|
-
return this.http.delete(`${this.baseUrlToUse}PermissionManagement/${idPermission}`);
|
|
1841
|
-
}
|
|
1842
|
-
static { this.ɵfac = function ManagementPermissionService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ManagementPermissionService)(); }; }
|
|
1843
|
-
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ManagementPermissionService, factory: ManagementPermissionService.ɵfac, providedIn: 'root' }); }
|
|
1844
|
-
}
|
|
1845
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManagementPermissionService, [{
|
|
1846
|
-
type: Injectable,
|
|
1847
|
-
args: [{
|
|
1848
|
-
providedIn: 'root'
|
|
1849
|
-
}]
|
|
1850
|
-
}], null, null); })();
|
|
1851
|
-
|
|
1852
|
-
const _c0 = () => ["name", "tag"];
|
|
1853
|
-
function CaucaManagementGroupComponent_div_20_Template(rf, ctx) { if (rf & 1) {
|
|
1854
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
1855
|
-
i0.ɵɵelementStart(0, "div")(1, "dx-tag-box", 15);
|
|
1856
|
-
i0.ɵɵlistener("onInitialized", function CaucaManagementGroupComponent_div_20_Template_dx_tag_box_onInitialized_1_listener($event) { const field_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.getGroupUser(field_r2, $event)); })("onValueChanged", function CaucaManagementGroupComponent_div_20_Template_dx_tag_box_onValueChanged_1_listener($event) { const field_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.setGroupUser(field_r2, $event)); });
|
|
1857
|
-
i0.ɵɵelementEnd()();
|
|
1858
|
-
} if (rf & 2) {
|
|
1859
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
1860
|
-
i0.ɵɵadvance();
|
|
1861
|
-
i0.ɵɵproperty("displayExpr", ctx_r2.fullName)("dataSource", ctx_r2.users)("searchEnabled", true)("searchExpr", ctx_r2.fullName);
|
|
1862
|
-
} }
|
|
1863
|
-
function CaucaManagementGroupComponent_div_21_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
1864
|
-
const _r4 = i0.ɵɵgetCurrentView();
|
|
1865
|
-
i0.ɵɵelementStart(0, "div")(1, "dx-check-box", 17);
|
|
1866
|
-
i0.ɵɵlistener("onInitialized", function CaucaManagementGroupComponent_div_21_div_2_Template_dx_check_box_onInitialized_1_listener($event) { const permission_r5 = i0.ɵɵrestoreView(_r4).$implicit; const field_r6 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.getPermissionStatus(field_r6, permission_r5, $event)); })("onValueChanged", function CaucaManagementGroupComponent_div_21_div_2_Template_dx_check_box_onValueChanged_1_listener($event) { const permission_r5 = i0.ɵɵrestoreView(_r4).$implicit; const field_r6 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.checkBoxToggled(field_r6, permission_r5, $event)); });
|
|
1867
|
-
i0.ɵɵelementEnd()();
|
|
1868
|
-
} if (rf & 2) {
|
|
1869
|
-
const permission_r5 = ctx.$implicit;
|
|
1870
|
-
i0.ɵɵadvance();
|
|
1871
|
-
i0.ɵɵproperty("text", permission_r5.name);
|
|
1872
|
-
} }
|
|
1873
|
-
function CaucaManagementGroupComponent_div_21_Template(rf, ctx) { if (rf & 1) {
|
|
1874
|
-
i0.ɵɵelementStart(0, "div")(1, "dx-list", 16);
|
|
1875
|
-
i0.ɵɵtemplate(2, CaucaManagementGroupComponent_div_21_div_2_Template, 2, 1, "div", 14);
|
|
1876
|
-
i0.ɵɵelementEnd()();
|
|
1877
|
-
} if (rf & 2) {
|
|
1878
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
1879
|
-
i0.ɵɵadvance();
|
|
1880
|
-
i0.ɵɵproperty("dataSource", ctx_r2.permissions)("searchEnabled", true)("searchExpr", i0.ɵɵpureFunction0(5, _c0))("hoverStateEnabled", ctx_r2.hoverStatePermission());
|
|
1881
|
-
i0.ɵɵadvance();
|
|
1882
|
-
i0.ɵɵproperty("dxTemplateOf", "rowTemplate");
|
|
1883
|
-
} }
|
|
1884
|
-
/**
|
|
1885
|
-
* @deprecated This component is obsolete and should not be used.
|
|
1886
|
-
*/
|
|
1887
|
-
class CaucaManagementGroupComponent {
|
|
1888
|
-
constructor() {
|
|
1889
|
-
this.showPrintButton = input(true, /* @ts-ignore */
|
|
1890
|
-
...(ngDevMode ? [{ debugName: "showPrintButton" }] : /* istanbul ignore next */ []));
|
|
1891
|
-
this.hoverStatePermission = input(true, /* @ts-ignore */
|
|
1892
|
-
...(ngDevMode ? [{ debugName: "hoverStatePermission" }] : /* istanbul ignore next */ []));
|
|
1893
|
-
this.showAssignableByAllUsers = input(true, /* @ts-ignore */
|
|
1894
|
-
...(ngDevMode ? [{ debugName: "showAssignableByAllUsers" }] : /* istanbul ignore next */ []));
|
|
1895
|
-
this.groups = [];
|
|
1896
|
-
this.users = [];
|
|
1897
|
-
this.permissions = [];
|
|
1898
|
-
this.userFullName = {};
|
|
1899
|
-
this.showColumn = true;
|
|
1900
|
-
this.showColumnXS = true;
|
|
1901
|
-
this.translations = [];
|
|
1902
|
-
this.managementGroupService = inject(ManagementGroupService);
|
|
1903
|
-
this.managementUserService = inject(ManagementUserService);
|
|
1904
|
-
this.managementPermissionService = inject(ManagementPermissionService);
|
|
1905
|
-
this.calculateUsersCellValue = (e) => {
|
|
1906
|
-
const users = (e.users ? e.users : []);
|
|
1907
|
-
let usersNames = [];
|
|
1908
|
-
users.forEach((user) => {
|
|
1909
|
-
const userGroup = this.users.filter((u) => u.id === user.idUser);
|
|
1910
|
-
if (userGroup && userGroup[0]) {
|
|
1911
|
-
usersNames.push(userGroup[0].firstName + ' ' + userGroup[0].lastName);
|
|
1912
|
-
}
|
|
1913
|
-
});
|
|
1914
|
-
usersNames = usersNames.sort((one, two) => (one < two ? -1 : 1));
|
|
1915
|
-
return usersNames.join(', ');
|
|
1916
|
-
};
|
|
1917
|
-
this.groupNameAlreadyUsedValidation = (e) => this.managementGroupService.hasExistingGroupName(e.data).pipe(map((exist) => !exist)).toPromise();
|
|
1918
|
-
const breakpointObserver = inject(BreakpointObserver);
|
|
1919
|
-
breakpointObserver.observe(['(max-width: 1000px)']).subscribe((result) => {
|
|
1920
|
-
this.showColumn = !result.matches;
|
|
1921
|
-
});
|
|
1922
|
-
breakpointObserver.observe(['(max-width: 600px)']).subscribe((result) => {
|
|
1923
|
-
this.showColumnXS = !result.matches;
|
|
1924
|
-
});
|
|
1925
|
-
}
|
|
1926
|
-
ngOnInit() {
|
|
1927
|
-
this.managementUserService.getAll().subscribe((data) => {
|
|
1928
|
-
this.users = data;
|
|
1929
|
-
this.users.forEach((user) => {
|
|
1930
|
-
if (user.isActive) {
|
|
1931
|
-
if (user.firstName !== '' && user.lastName !== '') {
|
|
1932
|
-
this.userFullName[user.id] = `${user.firstName} ${user.lastName}`;
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
});
|
|
1936
|
-
});
|
|
1937
|
-
this.managementPermissionService.getAll().subscribe((permissions) => {
|
|
1938
|
-
const permissionIndex = permissions.findIndex((c) => c.tag === 'CanAccessPermissions');
|
|
1939
|
-
if (permissionIndex !== -1) {
|
|
1940
|
-
permissions.splice(permissionIndex, 1);
|
|
1941
|
-
}
|
|
1942
|
-
permissions.sort((a, b) => {
|
|
1943
|
-
if (a.name < b.name) {
|
|
1944
|
-
return -1;
|
|
1945
|
-
}
|
|
1946
|
-
if (a.name > b.name) {
|
|
1947
|
-
return 1;
|
|
1948
|
-
}
|
|
1949
|
-
return 0;
|
|
1950
|
-
});
|
|
1951
|
-
this.permissions = permissions;
|
|
1952
|
-
});
|
|
1953
|
-
this.getGroups();
|
|
1954
|
-
}
|
|
1955
|
-
fullName(data) {
|
|
1956
|
-
if (!data) {
|
|
1957
|
-
return '';
|
|
1958
|
-
}
|
|
1959
|
-
return `${data.firstName} ${data.lastName}`;
|
|
1960
|
-
}
|
|
1961
|
-
getGroupUser(field, e) {
|
|
1962
|
-
const users = [];
|
|
1963
|
-
if (this.groupUsers) {
|
|
1964
|
-
this.groupUsers.forEach((user) => {
|
|
1965
|
-
users.push(user.idUser);
|
|
1966
|
-
});
|
|
1967
|
-
}
|
|
1968
|
-
e.component.option('value', users);
|
|
1969
|
-
}
|
|
1970
|
-
setGroupUser(field, e) {
|
|
1971
|
-
const groupUser = [];
|
|
1972
|
-
e.value.forEach((idUser) => {
|
|
1973
|
-
const groupIndex = (field.data.users || []).findIndex((g) => g.idUser === idUser);
|
|
1974
|
-
if (groupIndex === -1) {
|
|
1975
|
-
groupUser.push({ idUser, });
|
|
1976
|
-
}
|
|
1977
|
-
else {
|
|
1978
|
-
groupUser.push(field.data.users[groupIndex]);
|
|
1979
|
-
}
|
|
1980
|
-
});
|
|
1981
|
-
field.setValue(JSON.parse(JSON.stringify(groupUser)));
|
|
1982
|
-
}
|
|
1983
|
-
setGroupPermission(field, e) {
|
|
1984
|
-
const groupUser = [];
|
|
1985
|
-
e.value.forEach((idUser) => {
|
|
1986
|
-
groupUser.push({
|
|
1987
|
-
idUser,
|
|
1988
|
-
});
|
|
1989
|
-
});
|
|
1990
|
-
field.setValue(JSON.parse(JSON.stringify(groupUser)));
|
|
1991
|
-
}
|
|
1992
|
-
getPermissionStatus(field, permission, e) {
|
|
1993
|
-
const groupPermission = (field.value || []).find((p) => p.idModulePermission === permission.id);
|
|
1994
|
-
if (groupPermission) {
|
|
1995
|
-
e.component.option('value', groupPermission.isAllowed);
|
|
1996
|
-
}
|
|
1997
|
-
else {
|
|
1998
|
-
e.component.option('value', undefined);
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
checkBoxToggled(field, permission, e) {
|
|
2002
|
-
if (e.component.skipOnValueChanged) {
|
|
2003
|
-
e.component.skipOnValueChanged = false;
|
|
2004
|
-
return;
|
|
2005
|
-
}
|
|
2006
|
-
if (e.component.setUndefinedNextTime) {
|
|
2007
|
-
e.component.setUndefinedNextTime = false;
|
|
2008
|
-
e.component.skipOnValueChanged = true;
|
|
2009
|
-
e.component.option('value', undefined);
|
|
2010
|
-
this.setPermissionStatus(field, permission, undefined);
|
|
2011
|
-
return;
|
|
2012
|
-
}
|
|
2013
|
-
if (e.value === false) {
|
|
2014
|
-
e.component.setUndefinedNextTime = true;
|
|
2015
|
-
}
|
|
2016
|
-
this.setPermissionStatus(field, permission, e.value);
|
|
2017
|
-
}
|
|
2018
|
-
onRowInserted(e) {
|
|
2019
|
-
this.saveGroup(e.data);
|
|
2020
|
-
}
|
|
2021
|
-
onRowUpdated(e) {
|
|
2022
|
-
this.saveGroup(e.data);
|
|
2023
|
-
}
|
|
2024
|
-
onRowRemoved(e) {
|
|
2025
|
-
const group = e.data;
|
|
2026
|
-
this.managementGroupService.delete(group.id).subscribe(() => {
|
|
2027
|
-
this.getGroups();
|
|
2028
|
-
});
|
|
2029
|
-
}
|
|
2030
|
-
onEditingStart(e) {
|
|
2031
|
-
this.groupUsers = e.data.users;
|
|
2032
|
-
}
|
|
2033
|
-
onInitNewRow() {
|
|
2034
|
-
this.groupUsers = [];
|
|
2035
|
-
}
|
|
2036
|
-
setPermissionStatus(field, permission, value) {
|
|
2037
|
-
const groupPermissions = field.value || [];
|
|
2038
|
-
const groupIndex = groupPermissions.findIndex((p) => p.idModulePermission === permission.id);
|
|
2039
|
-
if (groupIndex > -1) {
|
|
2040
|
-
groupPermissions[groupIndex].isAllowed = value;
|
|
2041
|
-
}
|
|
2042
|
-
else {
|
|
2043
|
-
groupPermissions.push({
|
|
2044
|
-
idModulePermission: permission.id,
|
|
2045
|
-
isAllowed: value,
|
|
2046
|
-
});
|
|
2047
|
-
}
|
|
2048
|
-
field.setValue(JSON.parse(JSON.stringify(groupPermissions)));
|
|
2049
|
-
}
|
|
2050
|
-
saveGroup(group) {
|
|
2051
|
-
this.removePermissionUndefined(group);
|
|
2052
|
-
if (group.users) {
|
|
2053
|
-
group.users.forEach((userGroup) => {
|
|
2054
|
-
userGroup.idGroup = group.id;
|
|
2055
|
-
});
|
|
2056
|
-
}
|
|
2057
|
-
if (group.permissions) {
|
|
2058
|
-
group.permissions.forEach((groupPermission) => {
|
|
2059
|
-
groupPermission.idGroup = group.id;
|
|
2060
|
-
});
|
|
2061
|
-
}
|
|
2062
|
-
this.managementGroupService.save(group).subscribe(() => {
|
|
2063
|
-
this.getGroups();
|
|
2064
|
-
});
|
|
2065
|
-
this.groupUsers = [];
|
|
2066
|
-
}
|
|
2067
|
-
removePermissionUndefined(group) {
|
|
2068
|
-
group.permissions = group.permissions.filter((permission) => permission.isAllowed !== undefined);
|
|
2069
|
-
}
|
|
2070
|
-
getGroups() {
|
|
2071
|
-
this.managementGroupService.getAll().subscribe((data) => this.groups = data);
|
|
2072
|
-
}
|
|
2073
|
-
static { this.ɵfac = function CaucaManagementGroupComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementGroupComponent)(); }; }
|
|
2074
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementGroupComponent, selectors: [["cauca-management-group"]], inputs: { showPrintButton: [1, "showPrintButton"], hoverStatePermission: [1, "hoverStatePermission"], showAssignableByAllUsers: [1, "showAssignableByAllUsers"] }, decls: 22, vars: 36, consts: [["keyExpr", "id", 3, "onRowInserted", "onInitNewRow", "onRowUpdated", "onEditingStart", "onRowRemoved", "allowPrint", "dataSource"], ["dataField", "name", 3, "caption"], ["type", "async", 3, "message", "validationCallback"], ["dataField", "assignableByAllUsers", "dataType", "boolean", 3, "caption", "visible"], ["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"], ["dataField", "assignableByAllUsers", 3, "visible"], [4, "dxTemplate", "dxTemplateOf"], ["valueExpr", "id", 3, "onInitialized", "onValueChanged", "displayExpr", "dataSource", "searchEnabled", "searchExpr"], ["itemTemplate", "rowTemplate", 3, "dataSource", "searchEnabled", "searchExpr", "hoverStateEnabled"], [3, "onInitialized", "onValueChanged", "text"]], template: function CaucaManagementGroupComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2075
|
-
i0.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
|
|
2076
|
-
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); });
|
|
2077
|
-
i0.ɵɵelementStart(1, "dxi-column", 1);
|
|
2078
|
-
i0.ɵɵpipe(2, "translate");
|
|
2079
|
-
i0.ɵɵelement(3, "dxi-validation-rule", 2);
|
|
2080
|
-
i0.ɵɵpipe(4, "translate");
|
|
2081
|
-
i0.ɵɵelementEnd();
|
|
2082
|
-
i0.ɵɵelement(5, "dxi-column", 3);
|
|
2083
|
-
i0.ɵɵpipe(6, "translate");
|
|
2084
|
-
i0.ɵɵelement(7, "dxi-column", 4);
|
|
2085
|
-
i0.ɵɵpipe(8, "translate");
|
|
2086
|
-
i0.ɵɵelement(9, "dxi-column", 5);
|
|
2087
|
-
i0.ɵɵpipe(10, "translate");
|
|
2088
|
-
i0.ɵɵelement(11, "dxo-export", 6);
|
|
2089
|
-
i0.ɵɵelementStart(12, "dxo-editing", 7);
|
|
2090
|
-
i0.ɵɵelement(13, "dxo-popup", 8);
|
|
2091
|
-
i0.ɵɵpipe(14, "translate");
|
|
2092
|
-
i0.ɵɵelementStart(15, "dxo-form", 9);
|
|
2093
|
-
i0.ɵɵelement(16, "dxi-item", 10)(17, "dxi-item", 11)(18, "dxi-item", 12)(19, "dxi-item", 13);
|
|
2094
|
-
i0.ɵɵelementEnd()();
|
|
2095
|
-
i0.ɵɵtemplate(20, CaucaManagementGroupComponent_div_20_Template, 2, 4, "div", 14)(21, CaucaManagementGroupComponent_div_21_Template, 3, 6, "div", 14);
|
|
2096
|
-
i0.ɵɵelementEnd();
|
|
2097
|
-
} if (rf & 2) {
|
|
2098
|
-
i0.ɵɵproperty("allowPrint", ctx.showPrintButton())("dataSource", ctx.groups);
|
|
2099
|
-
i0.ɵɵadvance();
|
|
2100
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(2, 24, "management.name"));
|
|
2101
|
-
i0.ɵɵadvance(2);
|
|
2102
|
-
i0.ɵɵproperty("message", i0.ɵɵpipeBind1(4, 26, "management.groupNameAlreadyUsed"))("validationCallback", ctx.groupNameAlreadyUsedValidation);
|
|
2103
|
-
i0.ɵɵadvance(2);
|
|
2104
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(6, 28, "management.assignableByAllUsers"))("visible", ctx.showAssignableByAllUsers());
|
|
2105
|
-
i0.ɵɵadvance(2);
|
|
2106
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(8, 30, "management.users"))("calculateCellValue", ctx.calculateUsersCellValue);
|
|
2107
|
-
i0.ɵɵadvance(2);
|
|
2108
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(10, 32, "management.permissions"))("visible", false);
|
|
2109
|
-
i0.ɵɵadvance(2);
|
|
2110
|
-
i0.ɵɵproperty("enabled", false);
|
|
2111
|
-
i0.ɵɵadvance();
|
|
2112
|
-
i0.ɵɵproperty("allowAdding", true)("allowUpdating", true)("allowDeleting", true)("useIcons", true);
|
|
2113
|
-
i0.ɵɵadvance();
|
|
2114
|
-
i0.ɵɵproperty("showTitle", true)("title", i0.ɵɵpipeBind1(14, 34, "management.group"))("fullScreen", !ctx.showColumn);
|
|
2115
|
-
i0.ɵɵadvance(2);
|
|
2116
|
-
i0.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
|
|
2117
|
-
i0.ɵɵadvance();
|
|
2118
|
-
i0.ɵɵproperty("isRequired", true);
|
|
2119
|
-
i0.ɵɵadvance(3);
|
|
2120
|
-
i0.ɵɵproperty("visible", ctx.showAssignableByAllUsers());
|
|
2121
|
-
i0.ɵɵadvance();
|
|
2122
|
-
i0.ɵɵproperty("dxTemplateOf", "usersEditTemplate");
|
|
2123
|
-
i0.ɵɵadvance();
|
|
2124
|
-
i0.ɵɵproperty("dxTemplateOf", "permissionsEditTemplate");
|
|
2125
|
-
} }, dependencies: [CaucaDevextremeModule, i1$3.CaucaDataGridComponent, i2$2.DxiColumnComponent, i2$2.DxiValidationRuleComponent, i2$2.DxoEditingComponent, i2$2.DxoFormComponent, i2$2.DxiItemComponent, i2$2.DxoPopupComponent, i2$2.DxoExportComponent, i3$2.DxTemplateDirective, DxCheckBoxModule, i4$2.DxCheckBoxComponent, DxListModule, i5$1.DxListComponent, DxTagBoxModule, i6$1.DxTagBoxComponent, TranslatePipe], encapsulation: 2 }); }
|
|
2126
|
-
}
|
|
2127
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementGroupComponent, [{
|
|
2128
|
-
type: Component,
|
|
2129
|
-
args: [{ selector: 'cauca-management-group', imports: [CaucaDevextremeModule, DxCheckBoxModule, DxListModule, DxTagBoxModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, 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=\"assignableByAllUsers\" [caption]=\"'management.assignableByAllUsers' | translate\"\n dataType=\"boolean\" [visible]=\"showAssignableByAllUsers()\">\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 <dxi-item dataField=\"assignableByAllUsers\" [visible]=\"showAssignableByAllUsers()\"></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>" }]
|
|
2130
|
-
}], () => [], { showPrintButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPrintButton", required: false }] }], hoverStatePermission: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverStatePermission", required: false }] }], showAssignableByAllUsers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAssignableByAllUsers", required: false }] }] }); })();
|
|
2131
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaManagementGroupComponent, { className: "CaucaManagementGroupComponent", filePath: "lib/cauca-management-group/cauca-management-group.component.ts", lineNumber: 28 }); })();
|
|
2132
|
-
|
|
2133
|
-
/**
|
|
2134
|
-
* @deprecated This model is obsolete and should not be used.
|
|
2135
|
-
*/
|
|
2136
|
-
class UserModel {
|
|
2137
|
-
constructor() {
|
|
2138
|
-
this.userName = '';
|
|
2139
|
-
this.firstName = '';
|
|
2140
|
-
this.lastName = '';
|
|
2141
|
-
this.password = '';
|
|
2142
|
-
this.email = '';
|
|
2143
|
-
this.isActive = true;
|
|
2144
|
-
this.twoFactorAuthenticatorEnabled = false;
|
|
2145
|
-
}
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
/**
|
|
2149
|
-
* @deprecated This component is obsolete and should not be used.
|
|
2150
|
-
*/
|
|
2151
|
-
class CaucaManagementUserComponent {
|
|
2152
|
-
constructor() {
|
|
2153
|
-
this.users = [
|
|
2154
|
-
new UserModel()
|
|
2155
|
-
];
|
|
2156
|
-
this.showColumnXS = true;
|
|
2157
|
-
this.managementUserService = inject(ManagementUserService);
|
|
2158
|
-
this.userNameAlreadyUsedValidation = (e) => this.managementUserService.hasExistingUserName(e.data).pipe(map((exist) => !exist)).toPromise();
|
|
2159
|
-
const breakpointObserver = inject(BreakpointObserver);
|
|
2160
|
-
breakpointObserver.observe(['(max-width: 600px)']).subscribe((result) => {
|
|
2161
|
-
this.showColumnXS = !result.matches;
|
|
2162
|
-
});
|
|
2163
|
-
}
|
|
2164
|
-
ngOnInit() {
|
|
2165
|
-
this.getUsers();
|
|
2166
|
-
}
|
|
2167
|
-
onRowInserted(e) {
|
|
2168
|
-
this.saveGroup(e.data);
|
|
2169
|
-
}
|
|
2170
|
-
onRowUpdated(e) {
|
|
2171
|
-
this.saveGroup(e.key);
|
|
2172
|
-
}
|
|
2173
|
-
onRowRemoved(e) {
|
|
2174
|
-
const user = e.data;
|
|
2175
|
-
this.managementUserService.delete(user.id).subscribe((_data) => {
|
|
2176
|
-
this.getUsers();
|
|
2177
|
-
});
|
|
2178
|
-
}
|
|
2179
|
-
saveGroup(user) {
|
|
2180
|
-
this.managementUserService.save(user).subscribe(() => {
|
|
2181
|
-
this.getUsers();
|
|
2182
|
-
});
|
|
2183
|
-
}
|
|
2184
|
-
getUsers() {
|
|
2185
|
-
this.managementUserService.getAll().subscribe((data) => this.users = data);
|
|
2186
|
-
}
|
|
2187
|
-
static { this.ɵfac = function CaucaManagementUserComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementUserComponent)(); }; }
|
|
2188
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaManagementUserComponent, selectors: [["cauca-management-user"]], decls: 22, vars: 31, consts: [["keyExpr", "id", 3, "onRowInserted", "onRowUpdated", "onRowRemoved", "dataSource"], ["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) {
|
|
2189
|
-
i0.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
|
|
2190
|
-
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); });
|
|
2191
|
-
i0.ɵɵelementStart(1, "dxi-column", 1);
|
|
2192
|
-
i0.ɵɵpipe(2, "translate");
|
|
2193
|
-
i0.ɵɵelement(3, "dxi-validation-rule", 2);
|
|
2194
|
-
i0.ɵɵpipe(4, "translate");
|
|
2195
|
-
i0.ɵɵelementEnd();
|
|
2196
|
-
i0.ɵɵelement(5, "dxi-column", 3);
|
|
2197
|
-
i0.ɵɵpipe(6, "translate");
|
|
2198
|
-
i0.ɵɵelement(7, "dxi-column", 4);
|
|
2199
|
-
i0.ɵɵpipe(8, "translate");
|
|
2200
|
-
i0.ɵɵelement(9, "dxi-column", 5);
|
|
2201
|
-
i0.ɵɵpipe(10, "translate");
|
|
2202
|
-
i0.ɵɵelement(11, "dxi-column", 6);
|
|
2203
|
-
i0.ɵɵpipe(12, "translate");
|
|
2204
|
-
i0.ɵɵelementStart(13, "dxo-editing", 7);
|
|
2205
|
-
i0.ɵɵelement(14, "dxo-popup", 8);
|
|
2206
|
-
i0.ɵɵpipe(15, "translate");
|
|
2207
|
-
i0.ɵɵelementStart(16, "dxo-form", 9);
|
|
2208
|
-
i0.ɵɵelement(17, "dxi-item", 10)(18, "dxi-item", 11)(19, "dxi-item", 12)(20, "dxi-item", 13)(21, "dxi-item", 14);
|
|
2209
|
-
i0.ɵɵelementEnd()()();
|
|
2210
|
-
} if (rf & 2) {
|
|
2211
|
-
i0.ɵɵproperty("dataSource", ctx.users);
|
|
2212
|
-
i0.ɵɵadvance();
|
|
2213
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(2, 17, "management.userName"));
|
|
2214
|
-
i0.ɵɵadvance(2);
|
|
2215
|
-
i0.ɵɵproperty("message", i0.ɵɵpipeBind1(4, 19, "management.userNameAlreadyUsed"))("validationCallback", ctx.userNameAlreadyUsedValidation);
|
|
2216
|
-
i0.ɵɵadvance(2);
|
|
2217
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(6, 21, "management.isActive"))("visible", false);
|
|
2218
|
-
i0.ɵɵadvance(2);
|
|
2219
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(8, 23, "management.firstName"));
|
|
2220
|
-
i0.ɵɵadvance(2);
|
|
2221
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(10, 25, "management.lastName"));
|
|
2222
|
-
i0.ɵɵadvance(2);
|
|
2223
|
-
i0.ɵɵproperty("caption", i0.ɵɵpipeBind1(12, 27, "management.group"));
|
|
2224
|
-
i0.ɵɵadvance(2);
|
|
2225
|
-
i0.ɵɵproperty("allowAdding", true)("allowUpdating", true)("allowDeleting", true)("useIcons", true);
|
|
2226
|
-
i0.ɵɵadvance();
|
|
2227
|
-
i0.ɵɵproperty("showTitle", true)("title", i0.ɵɵpipeBind1(15, 29, "management.group"));
|
|
2228
|
-
i0.ɵɵadvance(2);
|
|
2229
|
-
i0.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
|
|
2230
|
-
i0.ɵɵadvance();
|
|
2231
|
-
i0.ɵɵproperty("isRequired", true);
|
|
2232
|
-
} }, dependencies: [CaucaDevextremeModule, i1$3.CaucaDataGridComponent, i2$2.DxiColumnComponent, i2$2.DxiValidationRuleComponent, i2$2.DxoEditingComponent, i2$2.DxoFormComponent, i2$2.DxiItemComponent, i2$2.DxoPopupComponent, TranslatePipe], encapsulation: 2 }); }
|
|
2233
|
-
}
|
|
2234
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementUserComponent, [{
|
|
2235
|
-
type: Component,
|
|
2236
|
-
args: [{ selector: 'cauca-management-user', imports: [CaucaDevextremeModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
2237
|
-
}], () => [], null); })();
|
|
2238
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaManagementUserComponent, { className: "CaucaManagementUserComponent", filePath: "lib/cauca-management-user/cauca-management-user.component.ts", lineNumber: 20 }); })();
|
|
2239
|
-
|
|
2240
|
-
/**
|
|
2241
|
-
* @deprecated Import CaucaManagementComponent, CaucaManagementUserComponent and
|
|
2242
|
-
* CaucaManagementGroupComponent directly in your standalone components. Kept as a re-export
|
|
2243
|
-
* so existing consumers keep compiling.
|
|
2244
|
-
*/
|
|
2245
|
-
class CaucaManagementModule {
|
|
2246
|
-
static { this.ɵfac = function CaucaManagementModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaucaManagementModule)(); }; }
|
|
2247
|
-
static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CaucaManagementModule }); }
|
|
2248
|
-
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CaucaManagementGroupComponent,
|
|
2249
|
-
CaucaManagementUserComponent] }); }
|
|
2250
|
-
}
|
|
2251
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaManagementModule, [{
|
|
2252
|
-
type: NgModule,
|
|
2253
|
-
args: [{
|
|
2254
|
-
imports: [
|
|
2255
|
-
CaucaManagementComponent,
|
|
2256
|
-
CaucaManagementGroupComponent,
|
|
2257
|
-
CaucaManagementUserComponent,
|
|
2258
|
-
],
|
|
2259
|
-
exports: [
|
|
2260
|
-
CaucaManagementComponent,
|
|
2261
|
-
CaucaManagementUserComponent,
|
|
2262
|
-
CaucaManagementGroupComponent,
|
|
2263
|
-
]
|
|
2264
|
-
}]
|
|
2265
|
-
}], null, null); })();
|
|
2266
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CaucaManagementModule, { imports: [CaucaManagementComponent,
|
|
2267
|
-
CaucaManagementGroupComponent,
|
|
2268
|
-
CaucaManagementUserComponent], exports: [CaucaManagementComponent,
|
|
2269
|
-
CaucaManagementUserComponent,
|
|
2270
|
-
CaucaManagementGroupComponent] }); })();
|
|
2271
|
-
|
|
2272
|
-
/**
|
|
2273
|
-
* @deprecated This model is obsolete and should not be used.
|
|
2274
|
-
*/
|
|
2275
|
-
class UserGroupModel {
|
|
2276
|
-
constructor() {
|
|
2277
|
-
this.idUserGroup = '';
|
|
2278
|
-
this.idGroup = '';
|
|
2279
|
-
this.idUser = '';
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
/**
|
|
2284
|
-
* @deprecated This model is obsolete and should not be used.
|
|
2285
|
-
*/
|
|
2286
|
-
class UserPermissionModel {
|
|
2287
|
-
constructor() {
|
|
2288
|
-
this.idUserPermission = '';
|
|
2289
|
-
this.isAllowed = false;
|
|
2290
|
-
this.idUser = '';
|
|
2291
|
-
this.idModulePermission = '';
|
|
2292
|
-
}
|
|
2293
|
-
}
|
|
2294
|
-
|
|
2295
|
-
/**
|
|
2296
|
-
* @deprecated This model is obsolete and should not be used.
|
|
2297
|
-
*/
|
|
2298
|
-
class GroupModel {
|
|
2299
|
-
constructor() {
|
|
2300
|
-
this.name = '';
|
|
2301
|
-
this.users = [];
|
|
2302
|
-
this.permissions = [];
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
|
-
|
|
2306
|
-
/**
|
|
2307
|
-
* @deprecated This model is obsolete and should not be used.
|
|
2308
|
-
*/
|
|
2309
|
-
class GroupPermissionModel {
|
|
2310
|
-
constructor() {
|
|
2311
|
-
this.idGroupPermission = '';
|
|
2312
|
-
this.isAllowed = false;
|
|
2313
|
-
this.idGroup = '';
|
|
2314
|
-
this.idModulePermission = '';
|
|
2315
|
-
}
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
1701
|
/*
|
|
2319
1702
|
* Public API Surface of cauca-management
|
|
2320
1703
|
*/
|
|
@@ -2323,5 +1706,5 @@ class GroupPermissionModel {
|
|
|
2323
1706
|
* Generated bundle index. Do not edit.
|
|
2324
1707
|
*/
|
|
2325
1708
|
|
|
2326
|
-
export { AllScopeToken,
|
|
1709
|
+
export { AllScopeToken, GroupEditionPageComponent, GroupsPageComponent, MANAGEMENT_ROUTE_SEGMENT, MANAGEMENT_URL_PREFIX, REFRESHABLE_PERMISSION_STATE_TOKEN, ScopeListGridColumnComponent, UserListGridComponent, UserPermissionsDialogComponent, UsersPageComponent, managementGroupRoutes, provideCaucaManagement };
|
|
2327
1710
|
//# sourceMappingURL=cauca-911-management.mjs.map
|