@volo/abp.ng.identity 7.4.0-rc.2 → 7.4.0-rc.3
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/esm2022/lib/components/index.mjs +7 -1
- package/esm2022/lib/components/organization-units/abstract-organization-unit/abstract-organization-unit.component.mjs +23 -17
- package/esm2022/lib/components/organization-units/delete-organization-unit/delete-organization-unit.component.mjs +80 -0
- package/esm2022/lib/components/organization-units/delete-organization-unit/organization-unit-delete.validator.mjs +14 -0
- package/esm2022/lib/components/organization-units/move-all-users-of-unit/move-all-users-of-unit.component.mjs +52 -0
- package/esm2022/lib/components/organization-units/organization-units.component.mjs +52 -52
- package/esm2022/lib/components/roles/roles.component.mjs +1 -2
- package/esm2022/lib/defaults/organization-unit/default-organization-members-entity-actions.mjs +3 -3
- package/esm2022/lib/defaults/roles/default-roles-entity-actions.mjs +2 -2
- package/esm2022/lib/defaults/users/default-users-entity-actions.mjs +6 -2
- package/esm2022/lib/defaults/users/default-users-form-props.mjs +16 -3
- package/esm2022/lib/identity.module.mjs +37 -37
- package/esm2022/lib/models/identity.mjs +1 -1
- package/esm2022/lib/services/delete-organization-unit-modal.service.mjs +62 -0
- package/esm2022/lib/services/index.mjs +3 -1
- package/esm2022/lib/services/move-all-users-of-unit-modal.service.mjs +68 -0
- package/esm2022/lib/services/organization-units-state.service.mjs +4 -1
- package/fesm2022/volo-abp.ng.identity.mjs +392 -135
- package/fesm2022/volo-abp.ng.identity.mjs.map +1 -1
- package/lib/components/index.d.ts +6 -0
- package/lib/components/organization-units/abstract-organization-unit/abstract-organization-unit.component.d.ts +10 -8
- package/lib/components/organization-units/delete-organization-unit/delete-organization-unit.component.d.ts +22 -0
- package/lib/components/organization-units/delete-organization-unit/organization-unit-delete.validator.d.ts +2 -0
- package/lib/components/organization-units/move-all-users-of-unit/move-all-users-of-unit.component.d.ts +18 -0
- package/lib/components/organization-units/organization-units.component.d.ts +16 -11
- package/lib/identity.module.d.ts +3 -1
- package/lib/models/identity.d.ts +4 -0
- package/lib/services/delete-organization-unit-modal.service.d.ts +21 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/move-all-users-of-unit-modal.service.d.ts +20 -0
- package/lib/services/organization-units-state.service.d.ts +1 -0
- package/package.json +7 -7
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, Output, Input, ChangeDetectionStrategy, inject, ViewChild, Inject, InjectionToken, Injectable, signal, computed, LOCALE_ID, NgModule } from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Output, Input, ChangeDetectionStrategy, inject, ViewChild, Inject, InjectionToken, DestroyRef, Injectable, signal, computed, Injector, LOCALE_ID, NgModule } from '@angular/core';
|
|
3
3
|
import * as i7 from '@abp/ng.theme.shared/extensions';
|
|
4
4
|
import { FormPropData, generateFormFromProps, FormProp, EXTENSIONS_IDENTIFIER, EXTENSIONS_ACTION_DATA, DateAdapter, EntityAction, EntityProp, ToolbarAction, ToolbarComponent, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps, UiExtensionsModule } from '@abp/ng.theme.shared/extensions';
|
|
5
5
|
import * as i2 from '@angular/forms';
|
|
6
|
-
import { Validators,
|
|
6
|
+
import { Validators, FormBuilder, ReactiveFormsModule, UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
|
7
7
|
import * as i2$1 from '@volo/abp.ng.identity/proxy';
|
|
8
8
|
import { OrganizationUnitService, IdentityRoleService } from '@volo/abp.ng.identity/proxy';
|
|
9
9
|
import * as i2$2 from '@abp/ng.theme.shared';
|
|
10
|
-
import { getPasswordValidators, Confirmation, ConfirmationService, ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
11
|
-
import { finalize, take, tap, switchMap, map, mapTo } from 'rxjs/operators';
|
|
10
|
+
import { getPasswordValidators, Confirmation, ConfirmationService, ThemeSharedModule, ToasterService } from '@abp/ng.theme.shared';
|
|
11
|
+
import { finalize, take, tap, switchMap, filter, map, mapTo } from 'rxjs/operators';
|
|
12
12
|
import * as i1 from '@angular/common';
|
|
13
13
|
import { formatDate } from '@angular/common';
|
|
14
14
|
import * as i1$1 from '@abp/ng.core';
|
|
15
|
-
import { mapEnumToOptions, SubscriptionService, generatePassword, ListService, InternalStore, TrackByService, LocalizationService, escapeHtmlChars, ConfigStateService, getShortDateShortTimeFormat, RouterOutletComponent, AuthGuard, PermissionGuard, ReplaceableRouteContainerComponent, LazyModuleFactory
|
|
16
|
-
import * as
|
|
15
|
+
import { mapEnumToOptions, SubscriptionService, generatePassword, ListService, InternalStore, TrackByService, CoreModule, LocalizationModule, LocalizationService, escapeHtmlChars, ConfigStateService, getShortDateShortTimeFormat, RouterOutletComponent, AuthGuard, PermissionGuard, ReplaceableRouteContainerComponent, LazyModuleFactory } from '@abp/ng.core';
|
|
16
|
+
import * as i8 from '@abp/ng.components/tree';
|
|
17
17
|
import { TreeAdapter, TreeModule } from '@abp/ng.components/tree';
|
|
18
|
-
import { BehaviorSubject,
|
|
18
|
+
import { BehaviorSubject, of, filter as filter$1, tap as tap$1, firstValueFrom, finalize as finalize$1 } from 'rxjs';
|
|
19
19
|
import * as i6 from '@volo/abp.commercial.ng.ui';
|
|
20
20
|
import { SHOW_ENTITY_HISTORY, CommercialUiModule, AdvancedEntityFiltersModule } from '@volo/abp.commercial.ng.ui';
|
|
21
|
-
import * as
|
|
21
|
+
import * as i5 from '@ng-bootstrap/ng-bootstrap';
|
|
22
22
|
import { NgbDateAdapter, NgbNavModule, NgbDropdownModule, NgbTooltipModule, NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
|
|
23
|
-
import * as
|
|
23
|
+
import * as i4 from '@ngx-validate/core';
|
|
24
24
|
import { NgxValidateCoreModule } from '@ngx-validate/core';
|
|
25
25
|
import * as i10 from '@abp/ng.permission-management';
|
|
26
26
|
import { PermissionManagementModule } from '@abp/ng.permission-management';
|
|
27
27
|
import * as i12 from '@abp/ng.components/page';
|
|
28
28
|
import { PageModule } from '@abp/ng.components/page';
|
|
29
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
29
|
+
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
30
30
|
import { ImpersonationService } from '@volo/abp.commercial.ng.ui/config';
|
|
31
31
|
import * as i1$2 from '@angular/router';
|
|
32
32
|
import { RouterModule } from '@angular/router';
|
|
@@ -224,7 +224,7 @@ class ClaimModalComponent {
|
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
226
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ClaimModalComponent, deps: [{ token: i2$1.IdentityRoleService }, { token: i2$1.IdentityUserService }, { token: i1$1.SubscriptionService }, { token: i2.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
227
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: ClaimModalComponent, selector: "abp-claim-modal", inputs: { subject: "subject", visible: "visible" }, outputs: { visibleChange: "visibleChange" }, providers: [SubscriptionService], usesOnChanges: true, ngImport: i0, template: "<abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">{{ 'AbpIdentity::Claims' | abpLocalization }}</h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <form\r\n (ngSubmit)=\"addClaim(ngForm)\"\r\n #ngForm=\"ngForm\"\r\n [formGroup]=\"form\"\r\n validateOnSubmit\r\n [markAsDirtyWhenSubmit]=\"false\"\r\n >\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"claimTypeSelect\">{{\r\n 'AbpIdentity::Type' | abpLocalization\r\n }}</label\r\n ><select\r\n autofocus\r\n id=\"claimTypeSelect\"\r\n class=\"form-select form-control\"\r\n formControlName=\"claimType\"\r\n (change)=\"claimTypeChange()\"\r\n >\r\n <option *ngFor=\"let type of claimTypes\" [ngValue]=\"type.name\">\r\n {{ type.name }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"newClaimValue\">\r\n {{ 'AbpIdentity::ClaimValue' | abpLocalization }}\r\n </label>\r\n\r\n <select\r\n *ngIf=\"inputType == 'Boolean'; else otherInput\"\r\n autofocus\r\n id=\"newClaimValueBool\"\r\n class=\"form-select form-control\"\r\n formControlName=\"claimValue\"\r\n >\r\n <option ngValue=\"true\">{{ 'AbpIdentity::True' | abpLocalization }}</option>\r\n <option ngValue=\"false\">{{ 'AbpIdentity::False' | abpLocalization }}</option>\r\n </select>\r\n <ng-template #otherInput>\r\n <input\r\n required\r\n id=\"newClaimValue\"\r\n [type]=\"inputType\"\r\n class=\"form-control\"\r\n formControlName=\"claimValue\"\r\n />\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 align-self-center d-grid\">\r\n <button class=\"btn btn-success\" type=\"submit\">\r\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\r\n {{ 'AbpIdentity::AddClaim' | abpLocalization }}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n\r\n <div class=\"willBeHidden mt-3\" *ngIf=\"subjectClaims && subjectClaims.length\">\r\n <div class=\"input-group mb-3\" *ngFor=\"let claim of subjectClaims; let i = index\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text mw-100 h-100 fs-9\">{{ claim.claimType }}</label>\r\n </div>\r\n\r\n <select\r\n *ngIf=\"subjectClaims[i].inputType == 'Boolean'; else otherSubjectInput\"\r\n autofocus\r\n class=\"form-control\"\r\n [(ngModel)]=\"subjectClaims[i].claimValue\"\r\n >\r\n <option ngValue=\"true\">{{ 'AbpIdentity::True' | abpLocalization }}</option>\r\n <option ngValue=\"false\">{{ 'AbpIdentity::False' | abpLocalization }}</option>\r\n </select>\r\n\r\n <ng-template #otherSubjectInput>\r\n <input\r\n [type]=\"subjectClaims[i].inputType\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"subjectClaims[i].claimValue\"\r\n required\r\n />\r\n </ng-template>\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-danger deleteClaim\" (click)=\"removeClaim(i)\">\r\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type:
|
|
227
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: ClaimModalComponent, selector: "abp-claim-modal", inputs: { subject: "subject", visible: "visible" }, outputs: { visibleChange: "visibleChange" }, providers: [SubscriptionService], usesOnChanges: true, ngImport: i0, template: "<abp-modal [(visible)]=\"visible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">{{ 'AbpIdentity::Claims' | abpLocalization }}</h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <form\r\n (ngSubmit)=\"addClaim(ngForm)\"\r\n #ngForm=\"ngForm\"\r\n [formGroup]=\"form\"\r\n validateOnSubmit\r\n [markAsDirtyWhenSubmit]=\"false\"\r\n >\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"claimTypeSelect\">{{\r\n 'AbpIdentity::Type' | abpLocalization\r\n }}</label\r\n ><select\r\n autofocus\r\n id=\"claimTypeSelect\"\r\n class=\"form-select form-control\"\r\n formControlName=\"claimType\"\r\n (change)=\"claimTypeChange()\"\r\n >\r\n <option *ngFor=\"let type of claimTypes\" [ngValue]=\"type.name\">\r\n {{ type.name }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"newClaimValue\">\r\n {{ 'AbpIdentity::ClaimValue' | abpLocalization }}\r\n </label>\r\n\r\n <select\r\n *ngIf=\"inputType == 'Boolean'; else otherInput\"\r\n autofocus\r\n id=\"newClaimValueBool\"\r\n class=\"form-select form-control\"\r\n formControlName=\"claimValue\"\r\n >\r\n <option ngValue=\"true\">{{ 'AbpIdentity::True' | abpLocalization }}</option>\r\n <option ngValue=\"false\">{{ 'AbpIdentity::False' | abpLocalization }}</option>\r\n </select>\r\n <ng-template #otherInput>\r\n <input\r\n required\r\n id=\"newClaimValue\"\r\n [type]=\"inputType\"\r\n class=\"form-control\"\r\n formControlName=\"claimValue\"\r\n />\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 align-self-center d-grid\">\r\n <button class=\"btn btn-success\" type=\"submit\">\r\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\r\n {{ 'AbpIdentity::AddClaim' | abpLocalization }}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n\r\n <div class=\"willBeHidden mt-3\" *ngIf=\"subjectClaims && subjectClaims.length\">\r\n <div class=\"input-group mb-3\" *ngFor=\"let claim of subjectClaims; let i = index\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text mw-100 h-100 fs-9\">{{ claim.claimType }}</label>\r\n </div>\r\n\r\n <select\r\n *ngIf=\"subjectClaims[i].inputType == 'Boolean'; else otherSubjectInput\"\r\n autofocus\r\n class=\"form-control\"\r\n [(ngModel)]=\"subjectClaims[i].claimValue\"\r\n >\r\n <option ngValue=\"true\">{{ 'AbpIdentity::True' | abpLocalization }}</option>\r\n <option ngValue=\"false\">{{ 'AbpIdentity::False' | abpLocalization }}</option>\r\n </select>\r\n\r\n <ng-template #otherSubjectInput>\r\n <input\r\n [type]=\"subjectClaims[i].inputType\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"subjectClaims[i].claimValue\"\r\n required\r\n />\r\n </ng-template>\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-danger deleteClaim\" (click)=\"removeClaim(i)\">\r\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
228
228
|
}
|
|
229
229
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ClaimModalComponent, decorators: [{
|
|
230
230
|
type: Component,
|
|
@@ -467,7 +467,7 @@ class UsersComponent {
|
|
|
467
467
|
provide: EXTENSIONS_IDENTIFIER,
|
|
468
468
|
useValue: "Identity.UsersComponent" /* eIdentityComponents.Users */,
|
|
469
469
|
},
|
|
470
|
-
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'AbpIdentity::Users' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-users-wrapper\">\r\n <abp-advanced-entity-filters [list]=\"list\" localizationSourceName=\"AbpIdentity\">\r\n <abp-advanced-entity-filters-form>\r\n <form #filterForm (keyup.enter)=\"list.get()\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"roleIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::Role' | abpLocalization }}\r\n </label>\r\n <abp-lookup-select\r\n cid=\"roleIdFilter\"\r\n lookupNameProp=\"name\"\r\n [getFn]=\"roleService.getList\"\r\n [(ngModel)]=\"filters.roleId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n ></abp-lookup-select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::OrganizationUnit' | abpLocalization }}\r\n </label>\r\n <abp-lookup-select\r\n cid=\"organizationUnitIdFilter\"\r\n [getFn]=\"organizationUnitService.getList\"\r\n [(ngModel)]=\"filters.organizationUnitId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n ></abp-lookup-select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::UserName' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"UserName\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.userName\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::Name' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"name\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.name\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::Surname' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"surname\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.surname\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::CreationDate' | abpLocalization }}\r\n </label>\r\n <abp-date-range-picker\r\n startDateProp=\"minCreationTime\"\r\n endDateProp=\"maxCreationTime\"\r\n [(ngModel)]=\"filters\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n >\r\n </abp-date-range-picker>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::ModificationDate' | abpLocalization }}\r\n </label>\r\n <abp-date-range-picker\r\n startDateProp=\"minModifitionTime\"\r\n endDateProp=\"maxModifitionTime\"\r\n [(ngModel)]=\"filters\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n >\r\n </abp-date-range-picker>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"PhoneNumber\" class=\"form-label\">\r\n {{ 'AbpIdentity::PhoneNumber' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"PhoneNumber\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.phoneNumber\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"EmailAddress\" class=\"form-label\">\r\n {{ 'AbpIdentity::EmailAddress' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"EmailAddress\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.emailAddress\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::NotActive' | abpLocalization }}\r\n </label>\r\n <select name=\"notActive\" class=\"form-select form-control\" [(ngModel)]=\"filters.notActive\">\r\n <option [ngValue]=\"undefined\">{{ 'AbpIdentity::Dash' | abpLocalization}}</option>\r\n <option [ngValue]=\"true\">{{ 'AbpUi::Yes' | abpLocalization}}</option>\r\n <option [ngValue]=\"false\">{{ 'AbpUi::No' | abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::EmailConfirmed' | abpLocalization }}\r\n </label>\r\n <select name=\"emailConfirmed\" class=\"form-select form-control\" [(ngModel)]=\"filters.emailConfirmed\">\r\n <option [ngValue]=\"undefined\">{{ 'AbpIdentity::Dash' | abpLocalization}}</option>\r\n <option [ngValue]=\"true\">{{ 'AbpUi::Yes' | abpLocalization}}</option>\r\n <option [ngValue]=\"false\">{{ 'AbpUi::No' | abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::Lock' | abpLocalization }}\r\n </label>\r\n <select name=\"isLockedOut\" class=\"form-select form-control\" [(ngModel)]=\"filters.isLockedOut\">\r\n <option [ngValue]=\"undefined\">{{ 'AbpIdentity::Dash' | abpLocalization}}</option>\r\n <option [ngValue]=\"true\">{{ 'AbpUi::Yes' | abpLocalization}}</option>\r\n <option [ngValue]=\"false\">{{ 'AbpUi::No' | abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::External' | abpLocalization }}\r\n </label>\r\n <select name=\"isExternal\" class=\"form-select form-control\" [(ngModel)]=\"filters.isExternal\">\r\n <option [ngValue]=\"undefined\">{{ 'AbpIdentity::Dash' | abpLocalization}}</option>\r\n <option [ngValue]=\"true\">{{ 'AbpUi::Yes' | abpLocalization}}</option>\r\n <option [ngValue]=\"false\">{{ 'AbpUi::No' | abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-auto align-self-end mb-3\">\r\n <div class=\"row\">\r\n <div class=\"col-6 col-sm-auto d-grid\">\r\n <button type=\"button\" class=\"btn btn-outline-primary\" (click)=\"clearFilters()\">\r\n <span>{{ 'AbpUi::Clear' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n <div class=\"col-6 col-sm-auto d-grid\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"list.get()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </abp-advanced-entity-filters-form>\r\n </abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\" (disappear)=\"form = null\">\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewUser') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form *ngIf=\"form\" [formGroup]=\"form\" id=\"userForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <ul id=\"user-nav-tabs\" ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li id=\"user-informations\" ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::UserInformations' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </ng-template>\r\n </li>\r\n <li id=\"user-roles\" *abpPermission=\"'AbpIdentity.Users.Update.ManageRoles'\" ngbNavItem>\r\n <a ngbNavLink\r\n >{{ 'AbpIdentity::Roles' | abpLocalization }}\r\n <span *ngIf=\"roleCount$ | async as roleCount\">({{ roleCount }})</span>\r\n </a>\r\n <ng-template ngbNavContent>\r\n <div\r\n *ngFor=\"let roleGroup of roleGroups; let i = index; trackBy: trackByFn\"\r\n class=\"form-check mb-2\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n [attr.id]=\"'roles-' + i\"\r\n [formControl]=\"roleGroup.controls[roles[i].name]\"\r\n [abpDisabled]=\"isFromOrgUnit(roles[i].id)\"\r\n />\r\n <label class=\"form-check-label\" [attr.for]=\"'roles-' + i\">\r\n {{ roles[i].name }}\r\n <span *ngIf=\"isFromOrgUnit(roles[i].id)\">({{ 'OU' | abpLocalization }})</span>\r\n </label>\r\n </div>\r\n </ng-template>\r\n </li>\r\n <li\r\n id=\"user-organization-units\"\r\n *abpPermission=\"'AbpIdentity.Users.Update.ManageOU'\"\r\n ngbNavItem\r\n >\r\n <a ngbNavLink\r\n >{{ 'AbpIdentity::OrganizationUnits' | abpLocalization }}\r\n <ng-container *ngIf=\"!!organization.checkedKeys.length\">\r\n <span>({{ organization.checkedKeys.length }})</span>\r\n </ng-container></a\r\n >\r\n\r\n <ng-template ngbNavContent>\r\n <abp-tree\r\n *ngIf=\"organization.nodes?.length; else noDataMessage\"\r\n [checkStrictly]=\"true\"\r\n [checkable]=\"true\"\r\n [nodes]=\"organization.nodes\"\r\n [changeCheckboxWithNode]=\"true\"\r\n [isNodeSelected]=\"organization.selectFn\"\r\n [(checkedKeys)]=\"organization.checkedKeys\"\r\n [(expandedKeys)]=\"organization.expandedKeys\"\r\n ></abp-tree>\r\n\r\n <ng-template #noDataMessage>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::NoOrganizationUnits' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 fade-in-top\"></div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"userForm\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'U' },\r\n providerKey: { value: providerKey },\r\n hideBadges: { value: true },\r\n visible: { value: visiblePermissions, twoWay: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent'\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n [providerKey]=\"providerKey\"\r\n [hideBadges]=\"true\"\r\n providerName=\"U\"\r\n [entityDisplayName]=\"entityDisplayName\"\r\n>\r\n</abp-permission-management>\r\n\r\n<abp-claim-modal\r\n *ngIf=\"visibleClaims\"\r\n [(visible)]=\"visibleClaims\"\r\n [subject]=\"claimSubject\"\r\n></abp-claim-modal>\r\n\r\n<abp-modal [(visible)]=\"isSetPasswordModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::SetPassword' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form\r\n [formGroup]=\"setPasswordForm\"\r\n id=\"PasswordForm\"\r\n (ngSubmit)=\"setPassword()\"\r\n validateOnSubmit\r\n >\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"new-password\">{{\r\n 'AbpIdentity::Password' | abpLocalization\r\n }}</label>\r\n <div class=\"input-group mb-3\" validationTarget>\r\n <input\r\n [type]=\"fieldTextType ? 'text' : 'password'\"\r\n id=\"new-password\"\r\n class=\"form-control\"\r\n aria-describedby=\"generate-random-password-button\"\r\n formControlName=\"newPassword\"\r\n autofocus\r\n />\r\n <button\r\n type=\"button\"\r\n id=\"toggle-visiblity-button\"\r\n class=\"btn btn-secondary\"\r\n [title]=\"'AbpIdentity::HideShow' | abpLocalization\"\r\n (click)=\"fieldTextType = !fieldTextType\"\r\n >\r\n <i class=\"fa fa-eye{{ !fieldTextType ? '-slash' : '' }}\"></i>\r\n </button>\r\n <button\r\n type=\"button\"\r\n id=\"generate-random-password-button\"\r\n class=\"btn btn-success\"\r\n [title]=\"'AbpIdentity::GenerateRandomPasswordTooltip' | abpLocalization\"\r\n (click)=\"generatePassword()\"\r\n >\r\n <i class=\"fa fa-refresh\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"PasswordForm\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </div>\r\n </form>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-modal [(visible)]=\"isLockModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::Lock' | abpLocalization }} - {{ selected.userName }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"lockForm\" (ngSubmit)=\"lock()\" validateOnSubmit>\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:LockoutEnd' | abpLocalization\r\n }}</label>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"mb-3\" [formGroup]=\"lockForm\">\r\n <abp-date-time-picker [prop]=\"dateTimePickerProps\"></abp-date-time-picker>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n (click)=\"lock()\"\r\n [disabled]=\"lockForm?.invalid || modalBusy\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-modal [(visible)]=\"twoFactor.isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::TwoFactor' | abpLocalization }} - {{ selected.userName }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n id=\"two-factor-enabled\"\r\n [(ngModel)]=\"twoFactor.checkboxValue\"\r\n />\r\n <label class=\"form-check-label\" for=\"two-factor-enabled\">{{\r\n 'AbpIdentity::DisplayName:TwoFactorEnabled' | abpLocalization\r\n }}</label>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"setTwoFactor()\" [disabled]=\"modalBusy\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1$1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i1$1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: i6.LookupSelectComponent, selector: "abp-lookup-select", inputs: ["maxResultCount", "emptyOption"] }, { kind: "component", type: i6.DateRangePickerComponent, selector: "abp-date-range-picker", inputs: ["startDateProp", "endDateProp", "labelText"] }, { kind: "component", type: i7.DateTimePickerComponent, selector: "abp-date-time-picker", inputs: ["prop", "meridian"], exportAs: ["abpDateTimePicker"] }, { kind: "component", type: i7.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: i7.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], outputs: ["tableActivate"], exportAs: ["abpExtensibleTable"] }, { kind: "directive", type: i7.DisabledDirective, selector: "[abpDisabled]", inputs: ["abpDisabled"] }, { kind: "component", type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "component", type: i6.AdvancedEntityFiltersFormComponent, selector: "abp-advanced-entity-filters-form" }, { kind: "directive", type: i8.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i8.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i8.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i8.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i8.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i8.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i8.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: i10.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "entityDisplayName", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }, { kind: "component", type: i10$1.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "changeCheckboxWithNode", "isNodeSelected", "beforeDrop"], outputs: ["checkedKeysChange", "expandedKeysChange", "selectedNodeChange", "dropOver", "nzExpandChange"] }, { kind: "component", type: i12.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: ClaimModalComponent, selector: "abp-claim-modal", inputs: ["subject", "visible"], outputs: ["visibleChange"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
470
|
+
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'AbpIdentity::Users' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-users-wrapper\">\r\n <abp-advanced-entity-filters [list]=\"list\" localizationSourceName=\"AbpIdentity\">\r\n <abp-advanced-entity-filters-form>\r\n <form #filterForm (keyup.enter)=\"list.get()\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"roleIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::Role' | abpLocalization }}\r\n </label>\r\n <abp-lookup-select\r\n cid=\"roleIdFilter\"\r\n lookupNameProp=\"name\"\r\n [getFn]=\"roleService.getList\"\r\n [(ngModel)]=\"filters.roleId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n ></abp-lookup-select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::OrganizationUnit' | abpLocalization }}\r\n </label>\r\n <abp-lookup-select\r\n cid=\"organizationUnitIdFilter\"\r\n [getFn]=\"organizationUnitService.getList\"\r\n [(ngModel)]=\"filters.organizationUnitId\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n ></abp-lookup-select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::UserName' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"UserName\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.userName\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::Name' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"name\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.name\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::Surname' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"surname\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.surname\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::CreationDate' | abpLocalization }}\r\n </label>\r\n <abp-date-range-picker\r\n startDateProp=\"minCreationTime\"\r\n endDateProp=\"maxCreationTime\"\r\n [(ngModel)]=\"filters\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n >\r\n </abp-date-range-picker>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"UserName\" class=\"form-label\">\r\n {{ 'AbpIdentity::ModificationDate' | abpLocalization }}\r\n </label>\r\n <abp-date-range-picker\r\n startDateProp=\"minModifitionTime\"\r\n endDateProp=\"maxModifitionTime\"\r\n [(ngModel)]=\"filters\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n >\r\n </abp-date-range-picker>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"PhoneNumber\" class=\"form-label\">\r\n {{ 'AbpIdentity::PhoneNumber' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"PhoneNumber\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.phoneNumber\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"form-group mb-3\">\r\n <label for=\"EmailAddress\" class=\"form-label\">\r\n {{ 'AbpIdentity::EmailAddress' | abpLocalization }}\r\n </label>\r\n <input\r\n type=\"text\"\r\n id=\"EmailAddress\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"filters.emailAddress\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::NotActive' | abpLocalization }}\r\n </label>\r\n <select name=\"notActive\" class=\"form-select form-control\" [(ngModel)]=\"filters.notActive\">\r\n <option [ngValue]=\"undefined\">{{ 'AbpIdentity::Dash' | abpLocalization}}</option>\r\n <option [ngValue]=\"true\">{{ 'AbpUi::Yes' | abpLocalization}}</option>\r\n <option [ngValue]=\"false\">{{ 'AbpUi::No' | abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::EmailConfirmed' | abpLocalization }}\r\n </label>\r\n <select name=\"emailConfirmed\" class=\"form-select form-control\" [(ngModel)]=\"filters.emailConfirmed\">\r\n <option [ngValue]=\"undefined\">{{ 'AbpIdentity::Dash' | abpLocalization}}</option>\r\n <option [ngValue]=\"true\">{{ 'AbpUi::Yes' | abpLocalization}}</option>\r\n <option [ngValue]=\"false\">{{ 'AbpUi::No' | abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::Lock' | abpLocalization }}\r\n </label>\r\n <select name=\"isLockedOut\" class=\"form-select form-control\" [(ngModel)]=\"filters.isLockedOut\">\r\n <option [ngValue]=\"undefined\">{{ 'AbpIdentity::Dash' | abpLocalization}}</option>\r\n <option [ngValue]=\"true\">{{ 'AbpUi::Yes' | abpLocalization}}</option>\r\n <option [ngValue]=\"false\">{{ 'AbpUi::No' | abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-4 col-md-3\">\r\n <div class=\"mb-3\">\r\n <label for=\"organizationUnitIdFilter\" class=\"form-label\">\r\n {{ 'AbpIdentity::External' | abpLocalization }}\r\n </label>\r\n <select name=\"isExternal\" class=\"form-select form-control\" [(ngModel)]=\"filters.isExternal\">\r\n <option [ngValue]=\"undefined\">{{ 'AbpIdentity::Dash' | abpLocalization}}</option>\r\n <option [ngValue]=\"true\">{{ 'AbpUi::Yes' | abpLocalization}}</option>\r\n <option [ngValue]=\"false\">{{ 'AbpUi::No' | abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 col-sm-auto align-self-end mb-3\">\r\n <div class=\"row\">\r\n <div class=\"col-6 col-sm-auto d-grid\">\r\n <button type=\"button\" class=\"btn btn-outline-primary\" (click)=\"clearFilters()\">\r\n <span>{{ 'AbpUi::Clear' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n <div class=\"col-6 col-sm-auto d-grid\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"list.get()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </abp-advanced-entity-filters-form>\r\n </abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\" (disappear)=\"form = null\">\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewUser') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form *ngIf=\"form\" [formGroup]=\"form\" id=\"userForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <ul id=\"user-nav-tabs\" ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li id=\"user-informations\" ngbNavItem>\r\n <a ngbNavLink>{{ 'AbpIdentity::UserInformations' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </ng-template>\r\n </li>\r\n <li id=\"user-roles\" *abpPermission=\"'AbpIdentity.Users.Update.ManageRoles'\" ngbNavItem>\r\n <a ngbNavLink\r\n >{{ 'AbpIdentity::Roles' | abpLocalization }}\r\n <span *ngIf=\"roleCount$ | async as roleCount\">({{ roleCount }})</span>\r\n </a>\r\n <ng-template ngbNavContent>\r\n <div\r\n *ngFor=\"let roleGroup of roleGroups; let i = index; trackBy: trackByFn\"\r\n class=\"form-check mb-2\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n [attr.id]=\"'roles-' + i\"\r\n [formControl]=\"roleGroup.controls[roles[i].name]\"\r\n [abpDisabled]=\"isFromOrgUnit(roles[i].id)\"\r\n />\r\n <label class=\"form-check-label\" [attr.for]=\"'roles-' + i\">\r\n {{ roles[i].name }}\r\n <span *ngIf=\"isFromOrgUnit(roles[i].id)\">({{ 'OU' | abpLocalization }})</span>\r\n </label>\r\n </div>\r\n </ng-template>\r\n </li>\r\n <li\r\n id=\"user-organization-units\"\r\n *abpPermission=\"'AbpIdentity.Users.Update.ManageOU'\"\r\n ngbNavItem\r\n >\r\n <a ngbNavLink\r\n >{{ 'AbpIdentity::OrganizationUnits' | abpLocalization }}\r\n <ng-container *ngIf=\"!!organization.checkedKeys.length\">\r\n <span>({{ organization.checkedKeys.length }})</span>\r\n </ng-container></a\r\n >\r\n\r\n <ng-template ngbNavContent>\r\n <abp-tree\r\n *ngIf=\"organization.nodes?.length; else noDataMessage\"\r\n [checkStrictly]=\"true\"\r\n [checkable]=\"true\"\r\n [nodes]=\"organization.nodes\"\r\n [changeCheckboxWithNode]=\"true\"\r\n [isNodeSelected]=\"organization.selectFn\"\r\n [(checkedKeys)]=\"organization.checkedKeys\"\r\n [(expandedKeys)]=\"organization.expandedKeys\"\r\n ></abp-tree>\r\n\r\n <ng-template #noDataMessage>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::NoOrganizationUnits' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 fade-in-top\"></div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"userForm\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'U' },\r\n providerKey: { value: providerKey },\r\n hideBadges: { value: true },\r\n visible: { value: visiblePermissions, twoWay: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent'\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n [providerKey]=\"providerKey\"\r\n [hideBadges]=\"true\"\r\n providerName=\"U\"\r\n [entityDisplayName]=\"entityDisplayName\"\r\n>\r\n</abp-permission-management>\r\n\r\n<abp-claim-modal\r\n *ngIf=\"visibleClaims\"\r\n [(visible)]=\"visibleClaims\"\r\n [subject]=\"claimSubject\"\r\n></abp-claim-modal>\r\n\r\n<abp-modal [(visible)]=\"isSetPasswordModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::SetPassword' | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form\r\n [formGroup]=\"setPasswordForm\"\r\n id=\"PasswordForm\"\r\n (ngSubmit)=\"setPassword()\"\r\n validateOnSubmit\r\n >\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"new-password\">{{\r\n 'AbpIdentity::Password' | abpLocalization\r\n }}</label>\r\n <div class=\"input-group mb-3\" validationTarget>\r\n <input\r\n [type]=\"fieldTextType ? 'text' : 'password'\"\r\n id=\"new-password\"\r\n class=\"form-control\"\r\n aria-describedby=\"generate-random-password-button\"\r\n formControlName=\"newPassword\"\r\n autofocus\r\n />\r\n <button\r\n type=\"button\"\r\n id=\"toggle-visiblity-button\"\r\n class=\"btn btn-secondary\"\r\n [title]=\"'AbpIdentity::HideShow' | abpLocalization\"\r\n (click)=\"fieldTextType = !fieldTextType\"\r\n >\r\n <i class=\"fa fa-eye{{ !fieldTextType ? '-slash' : '' }}\"></i>\r\n </button>\r\n <button\r\n type=\"button\"\r\n id=\"generate-random-password-button\"\r\n class=\"btn btn-success\"\r\n [title]=\"'AbpIdentity::GenerateRandomPasswordTooltip' | abpLocalization\"\r\n (click)=\"generatePassword()\"\r\n >\r\n <i class=\"fa fa-refresh\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"PasswordForm\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </div>\r\n </form>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-modal [(visible)]=\"isLockModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::Lock' | abpLocalization }} - {{ selected.userName }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"lockForm\" (ngSubmit)=\"lock()\" validateOnSubmit>\r\n <label class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:LockoutEnd' | abpLocalization\r\n }}</label>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"mb-3\" [formGroup]=\"lockForm\">\r\n <abp-date-time-picker [prop]=\"dateTimePickerProps\"></abp-date-time-picker>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n (click)=\"lock()\"\r\n [disabled]=\"lockForm?.invalid || modalBusy\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-modal [(visible)]=\"twoFactor.isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ 'AbpIdentity::TwoFactor' | abpLocalization }} - {{ selected.userName }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"mt-2 fade-in-top\">\r\n <div class=\"form-check mb-2\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n id=\"two-factor-enabled\"\r\n [(ngModel)]=\"twoFactor.checkboxValue\"\r\n />\r\n <label class=\"form-check-label\" for=\"two-factor-enabled\">{{\r\n 'AbpIdentity::DisplayName:TwoFactorEnabled' | abpLocalization\r\n }}</label>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"setTwoFactor()\" [disabled]=\"modalBusy\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1$1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i1$1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: i6.LookupSelectComponent, selector: "abp-lookup-select", inputs: ["maxResultCount", "emptyOption"] }, { kind: "component", type: i6.DateRangePickerComponent, selector: "abp-date-range-picker", inputs: ["startDateProp", "endDateProp", "labelText"] }, { kind: "component", type: i7.DateTimePickerComponent, selector: "abp-date-time-picker", inputs: ["prop", "meridian"], exportAs: ["abpDateTimePicker"] }, { kind: "component", type: i7.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: i7.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], outputs: ["tableActivate"], exportAs: ["abpExtensibleTable"] }, { kind: "directive", type: i7.DisabledDirective, selector: "[abpDisabled]", inputs: ["abpDisabled"] }, { kind: "component", type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "component", type: i6.AdvancedEntityFiltersFormComponent, selector: "abp-advanced-entity-filters-form" }, { kind: "directive", type: i5.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i5.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i5.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i5.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i5.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i5.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i5.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: i10.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "entityDisplayName", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }, { kind: "component", type: i8.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "changeCheckboxWithNode", "isNodeSelected", "beforeDrop"], outputs: ["checkedKeysChange", "expandedKeysChange", "selectedNodeChange", "dropOver", "nzExpandChange"] }, { kind: "component", type: i12.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: ClaimModalComponent, selector: "abp-claim-modal", inputs: ["subject", "visible"], outputs: ["visibleChange"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
471
471
|
}
|
|
472
472
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: UsersComponent, decorators: [{
|
|
473
473
|
type: Component,
|
|
@@ -497,7 +497,7 @@ class UserDropdownMenuComponent {
|
|
|
497
497
|
this.component.list.get();
|
|
498
498
|
}
|
|
499
499
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: UserDropdownMenuComponent, deps: [{ token: EXTENSIONS_ACTION_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
500
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: UserDropdownMenuComponent, selector: "abp-user-dropdown-menu", ngImport: i0, template: "<div ngbDropdown class=\"d-inline-block ngb-dropdown\">\r\n <button class=\"btn btn-primary btn-sm\" id=\"Import\" ngbDropdownToggle>\r\n {{ 'AbpIdentity::Import' | abpLocalization }}\r\n </button>\r\n\r\n <div ngbDropdownMenu id=\"options\" aria-labelledby=\"Import\">\r\n <div *ngFor=\"let option of options\">\r\n <button ngbDropdownItem on-click=\"onAddExternalLogin()\">\r\n {{ option | abpLocalization }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<abp-external-login\r\n [(visible)]=\"isExternalModalVisible\"\r\n (dataSave)=\"getList()\"\r\n></abp-external-login>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type:
|
|
500
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: UserDropdownMenuComponent, selector: "abp-user-dropdown-menu", ngImport: i0, template: "<div ngbDropdown class=\"d-inline-block ngb-dropdown\">\r\n <button class=\"btn btn-primary btn-sm\" id=\"Import\" ngbDropdownToggle>\r\n {{ 'AbpIdentity::Import' | abpLocalization }}\r\n </button>\r\n\r\n <div ngbDropdownMenu id=\"options\" aria-labelledby=\"Import\">\r\n <div *ngFor=\"let option of options\">\r\n <button ngbDropdownItem on-click=\"onAddExternalLogin()\">\r\n {{ option | abpLocalization }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<abp-external-login\r\n [(visible)]=\"isExternalModalVisible\"\r\n (dataSave)=\"getList()\"\r\n></abp-external-login>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i5.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i5.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i5.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "component", type: ExternalLoginComponent, selector: "abp-external-login", inputs: ["visible"], outputs: ["dataSave", "visibleChange"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
501
501
|
}
|
|
502
502
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: UserDropdownMenuComponent, decorators: [{
|
|
503
503
|
type: Component,
|
|
@@ -590,7 +590,7 @@ class ClaimsComponent {
|
|
|
590
590
|
provide: EXTENSIONS_IDENTIFIER,
|
|
591
591
|
useValue: "Identity.ClaimsComponent" /* eIdentityComponents.Claims */,
|
|
592
592
|
},
|
|
593
|
-
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'AbpIdentity::ClaimTypes' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-claim-types-wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpIdentity\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewClaimType') | abpLocalization }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"claimTypeForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <div class=\"mt-2 fade-in-top\">\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"claimTypeForm\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "component", type: i7.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: i7.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], outputs: ["tableActivate"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "directive", type:
|
|
593
|
+
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'AbpIdentity::ClaimTypes' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-claim-types-wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpIdentity\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewClaimType') | abpLocalization }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"claimTypeForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <div class=\"mt-2 fade-in-top\">\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </div>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"claimTypeForm\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "component", type: i7.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: i7.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], outputs: ["tableActivate"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: i12.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
594
594
|
}
|
|
595
595
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: ClaimsComponent, decorators: [{
|
|
596
596
|
type: Component,
|
|
@@ -608,18 +608,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
608
608
|
|
|
609
609
|
const ORGANIZATION_UNIT_CONFIG = new InjectionToken('ORGANIZATION_UNIT_CONFIG');
|
|
610
610
|
class AbstractOrganizationUnitComponent {
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
#destroyRef;
|
|
612
|
+
constructor() {
|
|
613
|
+
this.config = inject(ORGANIZATION_UNIT_CONFIG, { optional: true }) || {};
|
|
614
|
+
this.organizationUnitService = inject(OrganizationUnitService);
|
|
615
|
+
this.confirmation = inject(ConfirmationService);
|
|
616
|
+
this.list = inject(ListService);
|
|
617
|
+
this.#destroyRef = inject(DestroyRef);
|
|
613
618
|
this.currentOrganizationUnits = { items: [] };
|
|
614
619
|
this.checkedUnits = {};
|
|
620
|
+
this.onAdded = new EventEmitter();
|
|
621
|
+
this.onDeleted = new EventEmitter();
|
|
615
622
|
this.isCheckboxDisabled = (id) => {
|
|
616
623
|
return this.currentOrganizationUnits.items.findIndex((item) => item.id === id) > -1;
|
|
617
624
|
};
|
|
618
|
-
this.list = injector.get(ListService);
|
|
619
625
|
this.list.maxResultCount = 1000;
|
|
620
|
-
this.organizationUnitService = injector.get(OrganizationUnitService);
|
|
621
|
-
this.confirmation = injector.get(ConfirmationService);
|
|
622
|
-
this.config = injector.get(ORGANIZATION_UNIT_CONFIG, {});
|
|
623
626
|
}
|
|
624
627
|
ngOnChanges({ selectedOrganizationUnit }) {
|
|
625
628
|
if (selectedOrganizationUnit?.firstChange) {
|
|
@@ -649,6 +652,7 @@ class AbstractOrganizationUnitComponent {
|
|
|
649
652
|
.subscribe(() => {
|
|
650
653
|
this.isModalVisible = false;
|
|
651
654
|
this.list.get();
|
|
655
|
+
this.onAdded.emit();
|
|
652
656
|
});
|
|
653
657
|
}
|
|
654
658
|
delete(unitId, unitName) {
|
|
@@ -656,25 +660,289 @@ class AbstractOrganizationUnitComponent {
|
|
|
656
660
|
.warn(this.config.deletionLocalizationKey, 'AbpIdentity::AreYouSure', {
|
|
657
661
|
messageLocalizationParams: [unitName, this.selectedOrganizationUnit.displayName],
|
|
658
662
|
})
|
|
659
|
-
.
|
|
660
|
-
|
|
661
|
-
this.organizationUnitService[this.config.deleteMethodName](this.selectedOrganizationUnit.id, unitId).subscribe(() => this.list.get());
|
|
662
|
-
}
|
|
663
|
-
});
|
|
663
|
+
.pipe(filter(status => status === Confirmation.Status.confirm), switchMap(() => this.organizationUnitService[this.config.deleteMethodName](this.selectedOrganizationUnit.id, unitId)), tap(() => this.list.get()), takeUntilDestroyed(this.#destroyRef))
|
|
664
|
+
.subscribe(() => this.onDeleted.emit());
|
|
664
665
|
}
|
|
665
666
|
openModal() {
|
|
666
667
|
this.isModalVisible = true;
|
|
667
668
|
}
|
|
668
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AbstractOrganizationUnitComponent, deps: [
|
|
669
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: AbstractOrganizationUnitComponent, selector: "ng-component", inputs: { selectedOrganizationUnit: "selectedOrganizationUnit" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
|
|
669
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AbstractOrganizationUnitComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
670
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: AbstractOrganizationUnitComponent, selector: "ng-component", inputs: { selectedOrganizationUnit: "selectedOrganizationUnit" }, outputs: { onAdded: "onAdded", onDeleted: "onDeleted" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
|
|
670
671
|
}
|
|
671
672
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: AbstractOrganizationUnitComponent, decorators: [{
|
|
672
673
|
type: Component,
|
|
673
674
|
args: [{
|
|
674
675
|
template: '',
|
|
675
676
|
}]
|
|
676
|
-
}], ctorParameters: function () { return [
|
|
677
|
+
}], ctorParameters: function () { return []; }, propDecorators: { selectedOrganizationUnit: [{
|
|
677
678
|
type: Input
|
|
679
|
+
}], onAdded: [{
|
|
680
|
+
type: Output
|
|
681
|
+
}], onDeleted: [{
|
|
682
|
+
type: Output
|
|
683
|
+
}] } });
|
|
684
|
+
|
|
685
|
+
function OrganizationUnitDeleteValidator() {
|
|
686
|
+
return (control) => {
|
|
687
|
+
const assignType = control.get('assignType')?.value;
|
|
688
|
+
const organizationUnitId = control.get('organizationUnitId')?.value;
|
|
689
|
+
if (!assignType) {
|
|
690
|
+
return null;
|
|
691
|
+
}
|
|
692
|
+
if (assignType && organizationUnitId) {
|
|
693
|
+
return null;
|
|
694
|
+
}
|
|
695
|
+
return { required: true };
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
class OrganizationUnitsStateService {
|
|
700
|
+
constructor() {
|
|
701
|
+
this.store = new InternalStore({});
|
|
702
|
+
this.state$ = this.store.sliceState(state => state);
|
|
703
|
+
}
|
|
704
|
+
getSelectedNode$() {
|
|
705
|
+
return this.store.sliceState(state => state.selectedUnit);
|
|
706
|
+
}
|
|
707
|
+
getSelectedNode() {
|
|
708
|
+
return this.store.state.selectedUnit;
|
|
709
|
+
}
|
|
710
|
+
setSelectedUnit(selectedUnit) {
|
|
711
|
+
this.store.patch({ selectedUnit });
|
|
712
|
+
}
|
|
713
|
+
refreshSelectedNode() {
|
|
714
|
+
this.setSelectedUnit({ ...this.getSelectedNode() });
|
|
715
|
+
}
|
|
716
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrganizationUnitsStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
717
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrganizationUnitsStateService, providedIn: 'root' }); }
|
|
718
|
+
}
|
|
719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrganizationUnitsStateService, decorators: [{
|
|
720
|
+
type: Injectable,
|
|
721
|
+
args: [{
|
|
722
|
+
providedIn: 'root',
|
|
723
|
+
}]
|
|
724
|
+
}] });
|
|
725
|
+
|
|
726
|
+
class DeleteOrganizationUnitService {
|
|
727
|
+
constructor() {
|
|
728
|
+
this.serviceProxy = inject(OrganizationUnitService);
|
|
729
|
+
this.#organizationUnits = signal([]);
|
|
730
|
+
this.visible = signal(false);
|
|
731
|
+
this.loading = signal(false);
|
|
732
|
+
this.selected = signal(undefined);
|
|
733
|
+
this.name = computed(() => this.selected()?.displayName || '');
|
|
734
|
+
this.otherOrganizationUnits = computed(() => {
|
|
735
|
+
if (!this.selected() || !this.#organizationUnits()?.length) {
|
|
736
|
+
return [];
|
|
737
|
+
}
|
|
738
|
+
return this.#organizationUnits().filter(x => this.selected().id !== x.id);
|
|
739
|
+
});
|
|
740
|
+
this.count = computed(() => {
|
|
741
|
+
if (!this.selected()) {
|
|
742
|
+
return 0;
|
|
743
|
+
}
|
|
744
|
+
return this.selected().userCount || 0;
|
|
745
|
+
});
|
|
746
|
+
this.hasMemberOrRole = computed(() => this.count() > 0);
|
|
747
|
+
this.countText = computed(() => this.count().toString());
|
|
748
|
+
this.hasOtherUnits = computed(() => !!this.otherOrganizationUnits().length);
|
|
749
|
+
}
|
|
750
|
+
#organizationUnits;
|
|
751
|
+
openDeleteModal(v) {
|
|
752
|
+
this.selected.set(v);
|
|
753
|
+
this.visible.set(true);
|
|
754
|
+
this.loadOrganizationUnits();
|
|
755
|
+
}
|
|
756
|
+
closeDeleteModal() {
|
|
757
|
+
this.visible.set(false);
|
|
758
|
+
this.selected.set(undefined);
|
|
759
|
+
}
|
|
760
|
+
loadOrganizationUnits() {
|
|
761
|
+
this.loading.set(true);
|
|
762
|
+
this.serviceProxy
|
|
763
|
+
.getListAll()
|
|
764
|
+
.pipe(finalize(() => this.loading.set(false)))
|
|
765
|
+
.subscribe(x => {
|
|
766
|
+
this.#organizationUnits.set(x.items);
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
deleteTheUnit(newParentId) {
|
|
770
|
+
const id = this.selected().id;
|
|
771
|
+
const move$ = newParentId ? this.serviceProxy.moveAllUsers(id, newParentId) : of(void 0);
|
|
772
|
+
const delete$ = this.serviceProxy.delete(id);
|
|
773
|
+
return move$.pipe(switchMap(() => delete$));
|
|
774
|
+
}
|
|
775
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: DeleteOrganizationUnitService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
776
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: DeleteOrganizationUnitService }); }
|
|
777
|
+
}
|
|
778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: DeleteOrganizationUnitService, decorators: [{
|
|
779
|
+
type: Injectable
|
|
780
|
+
}] });
|
|
781
|
+
|
|
782
|
+
class MoveAllUsersOfUnitModalService {
|
|
783
|
+
constructor() {
|
|
784
|
+
this.organizationUnitService = inject(OrganizationUnitService);
|
|
785
|
+
this.confirmationService = inject(ConfirmationService);
|
|
786
|
+
this.#organizationUnits = signal([]);
|
|
787
|
+
this.visible = signal(false);
|
|
788
|
+
this.loading = signal(false);
|
|
789
|
+
this.selected = signal(undefined);
|
|
790
|
+
this.name = computed(() => this.selected()?.displayName || '');
|
|
791
|
+
this.otherOrganizationUnits = computed(() => {
|
|
792
|
+
if (!this.selected() || !this.#organizationUnits()?.length) {
|
|
793
|
+
return [];
|
|
794
|
+
}
|
|
795
|
+
return this.#organizationUnits().filter(x => this.selected().id !== x.id);
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
#organizationUnits;
|
|
799
|
+
showWarning() {
|
|
800
|
+
this.confirmationService
|
|
801
|
+
.warn('AbpIdentity::ThereIsNoUsersCurrentlyInThisRole', 'AbpUi::Warning', {
|
|
802
|
+
hideCancelBtn: true,
|
|
803
|
+
yesText: 'AbpUi::Ok',
|
|
804
|
+
})
|
|
805
|
+
.pipe(take(1))
|
|
806
|
+
.subscribe();
|
|
807
|
+
}
|
|
808
|
+
openMoveModal(v) {
|
|
809
|
+
if (v.userCount === 0) {
|
|
810
|
+
this.showWarning();
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
this.selected.set(v);
|
|
814
|
+
this.visible.set(true);
|
|
815
|
+
this.loadOrganizationUnits();
|
|
816
|
+
}
|
|
817
|
+
closeMoveModal() {
|
|
818
|
+
this.visible.set(false);
|
|
819
|
+
this.selected.set(undefined);
|
|
820
|
+
}
|
|
821
|
+
loadOrganizationUnits() {
|
|
822
|
+
this.loading.set(true);
|
|
823
|
+
this.organizationUnitService
|
|
824
|
+
.getListAll()
|
|
825
|
+
.pipe(finalize(() => this.loading.set(false)))
|
|
826
|
+
.subscribe(x => {
|
|
827
|
+
this.#organizationUnits.set(x.items);
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
moveTheUnit(newParentId) {
|
|
831
|
+
this.loading.set(true);
|
|
832
|
+
const id = this.selected().id;
|
|
833
|
+
return this.organizationUnitService
|
|
834
|
+
.moveAllUsers(id, newParentId)
|
|
835
|
+
.pipe(finalize(() => this.loading.set(false)));
|
|
836
|
+
}
|
|
837
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: MoveAllUsersOfUnitModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
838
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: MoveAllUsersOfUnitModalService }); }
|
|
839
|
+
}
|
|
840
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: MoveAllUsersOfUnitModalService, decorators: [{
|
|
841
|
+
type: Injectable
|
|
842
|
+
}] });
|
|
843
|
+
|
|
844
|
+
class DeleteOrganizationUnitComponent {
|
|
845
|
+
constructor() {
|
|
846
|
+
this.service = inject(DeleteOrganizationUnitService);
|
|
847
|
+
this.#destroyRef = inject(DestroyRef);
|
|
848
|
+
this.#fb = inject(FormBuilder);
|
|
849
|
+
this.#trackByService = inject(TrackByService);
|
|
850
|
+
this.#isSubmitted = signal(false);
|
|
851
|
+
this.trackByFn = this.#trackByService.by('id');
|
|
852
|
+
this.form = this.#fb.group({
|
|
853
|
+
assignType: [false],
|
|
854
|
+
organizationUnitId: [null],
|
|
855
|
+
}, { validators: [OrganizationUnitDeleteValidator()] });
|
|
856
|
+
this.orgUnitChanges = toSignal(this.form.controls.organizationUnitId.valueChanges);
|
|
857
|
+
this.orgUnitValidation = computed(() => {
|
|
858
|
+
if (!this.#isSubmitted()) {
|
|
859
|
+
return false;
|
|
860
|
+
}
|
|
861
|
+
if (!this.orgUnitChanges()) {
|
|
862
|
+
return true;
|
|
863
|
+
}
|
|
864
|
+
const { touched } = this.form.controls?.organizationUnitId || {};
|
|
865
|
+
const { required } = this.form.errors || {};
|
|
866
|
+
return (this.#isSubmitted() && required) || (required && touched);
|
|
867
|
+
});
|
|
868
|
+
this.deleted = new EventEmitter();
|
|
869
|
+
}
|
|
870
|
+
#destroyRef;
|
|
871
|
+
#fb;
|
|
872
|
+
#trackByService;
|
|
873
|
+
#isSubmitted;
|
|
874
|
+
ngOnInit() {
|
|
875
|
+
this.form.controls.assignType.valueChanges
|
|
876
|
+
.pipe(filter$1(assignType => !assignType), tap$1(() => {
|
|
877
|
+
this.form.controls.organizationUnitId.patchValue(null);
|
|
878
|
+
this.#isSubmitted.set(false);
|
|
879
|
+
}), takeUntilDestroyed(this.#destroyRef))
|
|
880
|
+
.subscribe();
|
|
881
|
+
}
|
|
882
|
+
onVisibleChange($event) {
|
|
883
|
+
if ($event) {
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
this.service.closeDeleteModal();
|
|
887
|
+
}
|
|
888
|
+
async save() {
|
|
889
|
+
this.#isSubmitted.set(true);
|
|
890
|
+
if (this.form.invalid) {
|
|
891
|
+
return;
|
|
892
|
+
}
|
|
893
|
+
const newParentId = this.form.value.organizationUnitId;
|
|
894
|
+
const del$ = this.service.deleteTheUnit(newParentId);
|
|
895
|
+
await firstValueFrom(del$);
|
|
896
|
+
this.deleted.emit();
|
|
897
|
+
this.service.closeDeleteModal();
|
|
898
|
+
}
|
|
899
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: DeleteOrganizationUnitComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
900
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: DeleteOrganizationUnitComponent, isStandalone: true, selector: "abp-delete-organization-unit", outputs: { deleted: "deleted" }, ngImport: i0, template: "<abp-modal\r\n [visible]=\"service.visible()\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n [suppressUnsavedChangesWarning]=\"true\"\r\n>\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ 'AbpUi::AreYouSure' | abpLocalization }}\r\n </h5>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <p class=\"fw-bold\">\r\n {{\r\n 'AbpIdentity::OrganizationUnitDeletionConfirmationMessage' | abpLocalization: service.name()\r\n }}\r\n </p>\r\n\r\n <form [formGroup]=\"form\" id=\"delete-form\" (ngSubmit)=\"save()\">\r\n <ng-container *ngIf=\"service.hasMemberOrRole()\">\r\n <p class=\"mt-2\">\r\n {{\r\n 'AbpIdentity::ChooseAnActionForOrganizationUnit' | abpLocalization: service.countText()\r\n }}\r\n </p>\r\n <div class=\"form-check mt-2\">\r\n <input\r\n class=\"form-check-input\"\r\n formControlName=\"assignType\"\r\n type=\"radio\"\r\n name=\"assignType\"\r\n id=\"unassign\"\r\n [value]=\"false\"\r\n />\r\n <label class=\"form-check-label\" for=\"unassign\">\r\n {{ 'AbpIdentity::UnassignOrganizationUnit' | abpLocalization }}\r\n </label>\r\n </div>\r\n <ng-container *ngIf=\"service.hasOtherUnits()\">\r\n <div class=\"form-check mt-2\">\r\n <input\r\n class=\"form-check-input\"\r\n formControlName=\"assignType\"\r\n type=\"radio\"\r\n name=\"assignType\"\r\n id=\"assign\"\r\n [value]=\"true\"\r\n />\r\n <label class=\"form-check-label\" for=\"assign\">\r\n {{ 'AbpIdentity::AssignUsersToOtherOrganizationUnit' | abpLocalization }}\r\n </label>\r\n </div>\r\n\r\n <ng-container *ngIf=\"form.value.assignType\">\r\n <select class=\"form-select mt-2\" formControlName=\"organizationUnitId\">\r\n <option [ngValue]=\"null\">\r\n {{\r\n (service.loading()\r\n ? 'AbpUi::LoadingWithThreeDot'\r\n : 'AbpIdentity::SelectAnRoleToAssign'\r\n ) | abpLocalization\r\n }}\r\n </option>\r\n <option\r\n *ngFor=\"let item of service.otherOrganizationUnits(); trackBy: trackByFn\"\r\n [ngValue]=\"item.id\"\r\n >\r\n {{ item.displayName }}\r\n </option>\r\n </select>\r\n <span *ngIf=\"orgUnitValidation()\" class=\"text-danger\">\r\n {{ 'AbpValidation::ThisFieldIsRequired.' | abpLocalization }}\r\n </span>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpUi::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n buttonType=\"submit\"\r\n buttonClass=\"btn btn-primary\"\r\n [loading]=\"service.loading()\"\r\n formName=\"delete-form\"\r\n >\r\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\r\n {{ 'AbpUi::Delete' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "ngmodule", type: ThemeSharedModule }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
901
|
+
}
|
|
902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: DeleteOrganizationUnitComponent, decorators: [{
|
|
903
|
+
type: Component,
|
|
904
|
+
args: [{ selector: 'abp-delete-organization-unit', standalone: true, imports: [CoreModule, ThemeSharedModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<abp-modal\r\n [visible]=\"service.visible()\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n [suppressUnsavedChangesWarning]=\"true\"\r\n>\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ 'AbpUi::AreYouSure' | abpLocalization }}\r\n </h5>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <p class=\"fw-bold\">\r\n {{\r\n 'AbpIdentity::OrganizationUnitDeletionConfirmationMessage' | abpLocalization: service.name()\r\n }}\r\n </p>\r\n\r\n <form [formGroup]=\"form\" id=\"delete-form\" (ngSubmit)=\"save()\">\r\n <ng-container *ngIf=\"service.hasMemberOrRole()\">\r\n <p class=\"mt-2\">\r\n {{\r\n 'AbpIdentity::ChooseAnActionForOrganizationUnit' | abpLocalization: service.countText()\r\n }}\r\n </p>\r\n <div class=\"form-check mt-2\">\r\n <input\r\n class=\"form-check-input\"\r\n formControlName=\"assignType\"\r\n type=\"radio\"\r\n name=\"assignType\"\r\n id=\"unassign\"\r\n [value]=\"false\"\r\n />\r\n <label class=\"form-check-label\" for=\"unassign\">\r\n {{ 'AbpIdentity::UnassignOrganizationUnit' | abpLocalization }}\r\n </label>\r\n </div>\r\n <ng-container *ngIf=\"service.hasOtherUnits()\">\r\n <div class=\"form-check mt-2\">\r\n <input\r\n class=\"form-check-input\"\r\n formControlName=\"assignType\"\r\n type=\"radio\"\r\n name=\"assignType\"\r\n id=\"assign\"\r\n [value]=\"true\"\r\n />\r\n <label class=\"form-check-label\" for=\"assign\">\r\n {{ 'AbpIdentity::AssignUsersToOtherOrganizationUnit' | abpLocalization }}\r\n </label>\r\n </div>\r\n\r\n <ng-container *ngIf=\"form.value.assignType\">\r\n <select class=\"form-select mt-2\" formControlName=\"organizationUnitId\">\r\n <option [ngValue]=\"null\">\r\n {{\r\n (service.loading()\r\n ? 'AbpUi::LoadingWithThreeDot'\r\n : 'AbpIdentity::SelectAnRoleToAssign'\r\n ) | abpLocalization\r\n }}\r\n </option>\r\n <option\r\n *ngFor=\"let item of service.otherOrganizationUnits(); trackBy: trackByFn\"\r\n [ngValue]=\"item.id\"\r\n >\r\n {{ item.displayName }}\r\n </option>\r\n </select>\r\n <span *ngIf=\"orgUnitValidation()\" class=\"text-danger\">\r\n {{ 'AbpValidation::ThisFieldIsRequired.' | abpLocalization }}\r\n </span>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpUi::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n buttonType=\"submit\"\r\n buttonClass=\"btn btn-primary\"\r\n [loading]=\"service.loading()\"\r\n formName=\"delete-form\"\r\n >\r\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\r\n {{ 'AbpUi::Delete' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
905
|
+
}], propDecorators: { deleted: [{
|
|
906
|
+
type: Output
|
|
907
|
+
}] } });
|
|
908
|
+
|
|
909
|
+
class MoveAllUsersOfUnitComponent {
|
|
910
|
+
constructor() {
|
|
911
|
+
this.#trackByService = inject(TrackByService);
|
|
912
|
+
this.#fb = inject(FormBuilder);
|
|
913
|
+
this.trackByFn = this.#trackByService.by('id');
|
|
914
|
+
this.form = this.#fb.group({
|
|
915
|
+
selectedOrganizationUnit: ['', [Validators.required]],
|
|
916
|
+
});
|
|
917
|
+
this.service = inject(MoveAllUsersOfUnitModalService);
|
|
918
|
+
this.moved = new EventEmitter();
|
|
919
|
+
}
|
|
920
|
+
#trackByService;
|
|
921
|
+
#fb;
|
|
922
|
+
onVisibleChange($event) {
|
|
923
|
+
if ($event) {
|
|
924
|
+
return;
|
|
925
|
+
}
|
|
926
|
+
this.service.closeMoveModal();
|
|
927
|
+
}
|
|
928
|
+
async save() {
|
|
929
|
+
if (this.form.invalid) {
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
const { selectedOrganizationUnit } = this.form.value;
|
|
933
|
+
const moved$ = this.service.moveTheUnit(selectedOrganizationUnit);
|
|
934
|
+
await firstValueFrom(moved$);
|
|
935
|
+
this.moved.emit();
|
|
936
|
+
this.service.closeMoveModal();
|
|
937
|
+
}
|
|
938
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: MoveAllUsersOfUnitComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
939
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: MoveAllUsersOfUnitComponent, isStandalone: true, selector: "abp-move-all-users-of-unit", outputs: { moved: "moved" }, ngImport: i0, template: "<abp-modal\r\n [visible]=\"service.visible()\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n [suppressUnsavedChangesWarning]=\"true\"\r\n>\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ 'AbpIdentity::MoveAllUsers' | abpLocalization }}\r\n </h5>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <p\r\n [innerHTML]=\"\r\n 'AbpIdentity::MoveAllUsersWithOrganizationUnitTo' | abpLocalization: service.name()\r\n \"\r\n ></p>\r\n <form [formGroup]=\"form\" id=\"move-users\" (ngSubmit)=\"save()\">\r\n <select class=\"form-select mt-2\" formControlName=\"selectedOrganizationUnit\">\r\n <option value=\"\" selected>\r\n {{\r\n (service.loading()\r\n ? 'AbpUi::LoadingWithThreeDot'\r\n : 'AbpIdentity::UnassignOrganizationUnit'\r\n ) | abpLocalization\r\n }}\r\n </option>\r\n <option\r\n *ngFor=\"let item of service.otherOrganizationUnits(); trackBy: trackByFn\"\r\n [value]=\"item.id\"\r\n >\r\n {{ item.displayName }}\r\n </option>\r\n </select>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpUi::Cancel' | abpLocalization }}\r\n </button>\r\n\r\n <abp-button\r\n buttonType=\"submit\"\r\n buttonClass=\"btn btn-primary\"\r\n [loading]=\"service.loading()\"\r\n formName=\"move-users\"\r\n >\r\n <i class=\"fa fa-check\" aria-hidden=\"true\"></i>\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "ngmodule", type: ThemeSharedModule }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: LocalizationModule }] }); }
|
|
940
|
+
}
|
|
941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: MoveAllUsersOfUnitComponent, decorators: [{
|
|
942
|
+
type: Component,
|
|
943
|
+
args: [{ standalone: true, selector: 'abp-move-all-users-of-unit', imports: [CoreModule, ThemeSharedModule, ReactiveFormsModule, LocalizationModule], template: "<abp-modal\r\n [visible]=\"service.visible()\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n [suppressUnsavedChangesWarning]=\"true\"\r\n>\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ 'AbpIdentity::MoveAllUsers' | abpLocalization }}\r\n </h5>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <p\r\n [innerHTML]=\"\r\n 'AbpIdentity::MoveAllUsersWithOrganizationUnitTo' | abpLocalization: service.name()\r\n \"\r\n ></p>\r\n <form [formGroup]=\"form\" id=\"move-users\" (ngSubmit)=\"save()\">\r\n <select class=\"form-select mt-2\" formControlName=\"selectedOrganizationUnit\">\r\n <option value=\"\" selected>\r\n {{\r\n (service.loading()\r\n ? 'AbpUi::LoadingWithThreeDot'\r\n : 'AbpIdentity::UnassignOrganizationUnit'\r\n ) | abpLocalization\r\n }}\r\n </option>\r\n <option\r\n *ngFor=\"let item of service.otherOrganizationUnits(); trackBy: trackByFn\"\r\n [value]=\"item.id\"\r\n >\r\n {{ item.displayName }}\r\n </option>\r\n </select>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpUi::Cancel' | abpLocalization }}\r\n </button>\r\n\r\n <abp-button\r\n buttonType=\"submit\"\r\n buttonClass=\"btn btn-primary\"\r\n [loading]=\"service.loading()\"\r\n formName=\"move-users\"\r\n >\r\n <i class=\"fa fa-check\" aria-hidden=\"true\"></i>\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
944
|
+
}], propDecorators: { moved: [{
|
|
945
|
+
type: Output
|
|
678
946
|
}] } });
|
|
679
947
|
|
|
680
948
|
class OrganizationMembersModalBodyComponent {
|
|
@@ -776,30 +1044,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
776
1044
|
type: Input
|
|
777
1045
|
}] } });
|
|
778
1046
|
|
|
779
|
-
class OrganizationUnitsStateService {
|
|
780
|
-
constructor() {
|
|
781
|
-
this.store = new InternalStore({});
|
|
782
|
-
this.state$ = this.store.sliceState(state => state);
|
|
783
|
-
}
|
|
784
|
-
getSelectedNode$() {
|
|
785
|
-
return this.store.sliceState(state => state.selectedUnit);
|
|
786
|
-
}
|
|
787
|
-
getSelectedNode() {
|
|
788
|
-
return this.store.state.selectedUnit;
|
|
789
|
-
}
|
|
790
|
-
setSelectedUnit(selectedUnit) {
|
|
791
|
-
this.store.patch({ selectedUnit });
|
|
792
|
-
}
|
|
793
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrganizationUnitsStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
794
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrganizationUnitsStateService, providedIn: 'root' }); }
|
|
795
|
-
}
|
|
796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrganizationUnitsStateService, decorators: [{
|
|
797
|
-
type: Injectable,
|
|
798
|
-
args: [{
|
|
799
|
-
providedIn: 'root',
|
|
800
|
-
}]
|
|
801
|
-
}] });
|
|
802
|
-
|
|
803
1047
|
class SelectedOrganizationUnitComponent {
|
|
804
1048
|
constructor(organizationUnitsStateService) {
|
|
805
1049
|
this.organizationUnitsStateService = organizationUnitsStateService;
|
|
@@ -976,19 +1220,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
976
1220
|
}] });
|
|
977
1221
|
|
|
978
1222
|
class OrganizationUnitsComponent {
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
this.
|
|
987
|
-
this.
|
|
988
|
-
this.fb = fb;
|
|
989
|
-
this.confirmation = confirmation;
|
|
990
|
-
this.organizationUnitsStateService = organizationUnitsStateService;
|
|
991
|
-
this.toaster = toaster;
|
|
1223
|
+
constructor() {
|
|
1224
|
+
this.injector = inject(Injector);
|
|
1225
|
+
this.service = inject(OrganizationUnitService);
|
|
1226
|
+
this.fb = inject(UntypedFormBuilder);
|
|
1227
|
+
this.confirmation = inject(ConfirmationService);
|
|
1228
|
+
this.toaster = inject(ToasterService);
|
|
1229
|
+
this.deleteOrganizationUnitService = inject(DeleteOrganizationUnitService);
|
|
1230
|
+
this.moveAllUsersOfUnitModalService = inject(MoveAllUsersOfUnitModalService);
|
|
1231
|
+
this.organizationUnitsStateService = inject(OrganizationUnitsStateService);
|
|
992
1232
|
this.organizationUnits = [];
|
|
993
1233
|
this.nodes = [];
|
|
994
1234
|
this.expandedKeys = [];
|
|
@@ -1007,6 +1247,12 @@ class OrganizationUnitsComponent {
|
|
|
1007
1247
|
});
|
|
1008
1248
|
};
|
|
1009
1249
|
}
|
|
1250
|
+
get selectedUnit() {
|
|
1251
|
+
return this.organizationUnitsStateService.getSelectedNode();
|
|
1252
|
+
}
|
|
1253
|
+
get nodeId() {
|
|
1254
|
+
return this.nodeForm.get('id')?.value;
|
|
1255
|
+
}
|
|
1010
1256
|
ngOnInit() {
|
|
1011
1257
|
this.get();
|
|
1012
1258
|
}
|
|
@@ -1050,26 +1296,8 @@ class OrganizationUnitsComponent {
|
|
|
1050
1296
|
this.toaster.success(message);
|
|
1051
1297
|
});
|
|
1052
1298
|
}
|
|
1053
|
-
delete(
|
|
1054
|
-
this.
|
|
1055
|
-
.warn('AbpIdentity::OrganizationUnitDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
|
|
1056
|
-
messageLocalizationParams: [displayName],
|
|
1057
|
-
})
|
|
1058
|
-
.subscribe((status) => {
|
|
1059
|
-
if (status === Confirmation.Status.confirm) {
|
|
1060
|
-
this.service
|
|
1061
|
-
.delete(id)
|
|
1062
|
-
.pipe(tap(() => {
|
|
1063
|
-
if (id === this.selectedUnit?.id) {
|
|
1064
|
-
this.setSelectedUnit(null);
|
|
1065
|
-
}
|
|
1066
|
-
}))
|
|
1067
|
-
.subscribe(() => {
|
|
1068
|
-
this.toaster.success('AbpIdentity::SuccessfullyDeleted');
|
|
1069
|
-
this.get();
|
|
1070
|
-
});
|
|
1071
|
-
}
|
|
1072
|
-
});
|
|
1299
|
+
delete(selected) {
|
|
1300
|
+
this.deleteOrganizationUnitService.openDeleteModal(selected);
|
|
1073
1301
|
}
|
|
1074
1302
|
getParentName(parentId) {
|
|
1075
1303
|
const parent = this.organizationUnits.find(unit => unit.id === parentId);
|
|
@@ -1092,13 +1320,27 @@ class OrganizationUnitsComponent {
|
|
|
1092
1320
|
setSelectedUnit(value) {
|
|
1093
1321
|
this.organizationUnitsStateService.setSelectedUnit(value);
|
|
1094
1322
|
}
|
|
1095
|
-
|
|
1323
|
+
onOUDeleted() {
|
|
1324
|
+
this.toaster.success('AbpIdentity::SuccessfullyDeleted');
|
|
1325
|
+
this.organizationUnitsStateService.setSelectedUnit(undefined);
|
|
1326
|
+
this.get();
|
|
1327
|
+
}
|
|
1328
|
+
onOUMoved() {
|
|
1329
|
+
this.get();
|
|
1330
|
+
this.organizationUnitsStateService.refreshSelectedNode();
|
|
1331
|
+
}
|
|
1332
|
+
moveAllUsers(selected) {
|
|
1333
|
+
this.moveAllUsersOfUnitModalService.openMoveModal(selected);
|
|
1334
|
+
}
|
|
1335
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrganizationUnitsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1096
1336
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: OrganizationUnitsComponent, selector: "abp-organization-units", providers: [
|
|
1097
1337
|
{
|
|
1098
1338
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1099
1339
|
useValue: "Identity.OrganizationUnitsComponent" /* eIdentityComponents.OrganizationUnits */,
|
|
1100
1340
|
},
|
|
1101
|
-
|
|
1341
|
+
DeleteOrganizationUnitService,
|
|
1342
|
+
MoveAllUsersOfUnitModalService,
|
|
1343
|
+
], ngImport: i0, template: "<abp-page\r\n [title]=\"'AbpIdentity::OrganizationUnits' | abpLocalization\"\r\n [toolbar]=\"organizationUnits\"\r\n>\r\n <div class=\"row\">\r\n <div *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageOU'\" class=\"col-12 col-lg-6 col-xl-5\">\r\n <div class=\"card\">\r\n <div class=\"card-header d-flex justify-content-between\">\r\n <h5>\r\n {{ 'AbpIdentity::OrganizationTree' | abpLocalization }}\r\n </h5>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"add()\">\r\n <i class=\"fas fa-plus me-1\" aria-hidden=\"true\"></i>\r\n {{ 'AbpIdentity::AddRootUnit' | abpLocalization }}\r\n </button>\r\n </div>\r\n <div class=\"card-body\" [abpLoading]=\"loading\">\r\n <abp-tree\r\n [nodes]=\"nodes\"\r\n [(expandedKeys)]=\"expandedKeys\"\r\n [selectedNode]=\"selectedUnit\"\r\n (selectedNodeChange)=\"setSelectedUnit($event)\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n >\r\n <ng-template abpTreeNodeTemplate let-node>\r\n <i class=\"fas fa-folder fs-15px text-primary me-1\" aria-hidden=\"true\"></i>\r\n {{ node.title }}\r\n </ng-template>\r\n\r\n <ng-template #menu let-node>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"edit(node.origin.entity)\">\r\n {{ 'AbpIdentity::Edit' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"addSubUnit(node.origin.entity)\">\r\n {{ 'AbpIdentity::AddSubUnit' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"moveAllUsers(node.origin.entity)\">\r\n {{ 'AbpIdentity::MoveAllUsers' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"delete(node.origin.entity)\">\r\n {{ 'AbpIdentity::Delete' | abpLocalization }}\r\n </li>\r\n </ng-template>\r\n </abp-tree>\r\n <p *ngIf=\"!loading && !nodes?.length\" class=\"text-muted\">\r\n {{ 'AbpIdentity::NoOrganizationUnits' | abpLocalization }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *abpPermission=\"\r\n 'AbpIdentity.OrganizationUnits.ManageMembers || AbpIdentity.OrganizationUnits.ManageRoles'\r\n \"\r\n class=\"col-12 col-lg-6 col-xl-7 card\"\r\n >\r\n <div class=\"card-header\">\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageMembers'\">\r\n <a ngbNavLink>{{ 'AbpIdentity::Members' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngIf=\"selectedUnit; else selectUnitMsg\">\r\n <abp-organization-members\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n selectedOrganizationUnit: { value: selectedUnit }\r\n },\r\n componentKey: organizationMembersKey\r\n }\"\r\n [selectedOrganizationUnit]=\"selectedUnit\"\r\n (onAdded)=\"get()\"\r\n (onDeleted)=\"get()\"\r\n ></abp-organization-members>\r\n </ng-container>\r\n <ng-template #selectUnitMsg>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::SelectAnOrganizationUnitToSeeMembers' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageRoles'\">\r\n <a ngbNavLink>{{ 'AbpIdentity::Roles' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngIf=\"selectedUnit; else selectUnitMsg\">\r\n <abp-organization-roles\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n selectedOrganizationUnit: { value: selectedUnit }\r\n },\r\n componentKey: organizationRolesKey\r\n }\"\r\n [selectedOrganizationUnit]=\"selectedUnit\"\r\n ></abp-organization-roles>\r\n </ng-container>\r\n <ng-template #selectUnitMsg>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::SelectAnOrganizationUnitToSeeRoles' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"card-body pt-0\">\r\n <div [ngbNavOutlet]=\"nav\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isNodeModalVisible\" [busy]=\"isModalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{\r\n (nodeId ? 'AbpIdentity::EditOrganizationUnit' : 'AbpIdentity::NewOrganizationUnit')\r\n | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"mb-3\" *ngIf=\"nodeForm.get('parentId').value as parentId\">\r\n <strong>{{\r\n 'AbpIdentity::OrganizationUnit:Parent{0}' | abpLocalization: getParentName(parentId)\r\n }}</strong>\r\n </div>\r\n <form [formGroup]=\"nodeForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selectedUnit\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"nodeForm?.invalid\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-delete-organization-unit *abpVisible=\"deleteOrganizationUnitService.visible()\" (deleted)=\"onOUDeleted()\" />\r\n<abp-move-all-users-of-unit *abpVisible=\"moveAllUsersOfUnitModalService.visible()\" (moved)=\"onOUMoved()\" />\r\n", styles: [".fs-15px{font-size:15px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1$1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i1$1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: i7.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "directive", type: i5.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i5.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i5.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i5.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i5.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i5.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i5.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.LoadingDirective, selector: "[abpLoading]", inputs: ["abpLoading", "abpLoadingTargetElement", "abpLoadingDelay"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i2$2.AbpVisibleDirective, selector: "[abpVisible]", inputs: ["abpVisible"] }, { kind: "directive", type: i5.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "directive", type: i8.TreeNodeTemplateDirective, selector: "[abpTreeNodeTemplate],[abp-tree-node-template]" }, { kind: "component", type: i8.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "changeCheckboxWithNode", "isNodeSelected", "beforeDrop"], outputs: ["checkedKeysChange", "expandedKeysChange", "selectedNodeChange", "dropOver", "nzExpandChange"] }, { kind: "component", type: i12.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: DeleteOrganizationUnitComponent, selector: "abp-delete-organization-unit", outputs: ["deleted"] }, { kind: "component", type: MoveAllUsersOfUnitComponent, selector: "abp-move-all-users-of-unit", outputs: ["moved"] }, { kind: "component", type: OrganizationMembersComponent, selector: "abp-organization-members" }, { kind: "component", type: OrganizationRolesComponent, selector: "abp-organization-roles" }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1102
1344
|
}
|
|
1103
1345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: OrganizationUnitsComponent, decorators: [{
|
|
1104
1346
|
type: Component,
|
|
@@ -1107,8 +1349,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
1107
1349
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1108
1350
|
useValue: "Identity.OrganizationUnitsComponent" /* eIdentityComponents.OrganizationUnits */,
|
|
1109
1351
|
},
|
|
1110
|
-
|
|
1111
|
-
|
|
1352
|
+
DeleteOrganizationUnitService,
|
|
1353
|
+
MoveAllUsersOfUnitModalService,
|
|
1354
|
+
], template: "<abp-page\r\n [title]=\"'AbpIdentity::OrganizationUnits' | abpLocalization\"\r\n [toolbar]=\"organizationUnits\"\r\n>\r\n <div class=\"row\">\r\n <div *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageOU'\" class=\"col-12 col-lg-6 col-xl-5\">\r\n <div class=\"card\">\r\n <div class=\"card-header d-flex justify-content-between\">\r\n <h5>\r\n {{ 'AbpIdentity::OrganizationTree' | abpLocalization }}\r\n </h5>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"add()\">\r\n <i class=\"fas fa-plus me-1\" aria-hidden=\"true\"></i>\r\n {{ 'AbpIdentity::AddRootUnit' | abpLocalization }}\r\n </button>\r\n </div>\r\n <div class=\"card-body\" [abpLoading]=\"loading\">\r\n <abp-tree\r\n [nodes]=\"nodes\"\r\n [(expandedKeys)]=\"expandedKeys\"\r\n [selectedNode]=\"selectedUnit\"\r\n (selectedNodeChange)=\"setSelectedUnit($event)\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n >\r\n <ng-template abpTreeNodeTemplate let-node>\r\n <i class=\"fas fa-folder fs-15px text-primary me-1\" aria-hidden=\"true\"></i>\r\n {{ node.title }}\r\n </ng-template>\r\n\r\n <ng-template #menu let-node>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"edit(node.origin.entity)\">\r\n {{ 'AbpIdentity::Edit' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"addSubUnit(node.origin.entity)\">\r\n {{ 'AbpIdentity::AddSubUnit' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"moveAllUsers(node.origin.entity)\">\r\n {{ 'AbpIdentity::MoveAllUsers' | abpLocalization }}\r\n </li>\r\n <li class=\"pointer\" ngbDropdownItem (click)=\"delete(node.origin.entity)\">\r\n {{ 'AbpIdentity::Delete' | abpLocalization }}\r\n </li>\r\n </ng-template>\r\n </abp-tree>\r\n <p *ngIf=\"!loading && !nodes?.length\" class=\"text-muted\">\r\n {{ 'AbpIdentity::NoOrganizationUnits' | abpLocalization }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *abpPermission=\"\r\n 'AbpIdentity.OrganizationUnits.ManageMembers || AbpIdentity.OrganizationUnits.ManageRoles'\r\n \"\r\n class=\"col-12 col-lg-6 col-xl-7 card\"\r\n >\r\n <div class=\"card-header\">\r\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\r\n <li ngbNavItem *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageMembers'\">\r\n <a ngbNavLink>{{ 'AbpIdentity::Members' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngIf=\"selectedUnit; else selectUnitMsg\">\r\n <abp-organization-members\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n selectedOrganizationUnit: { value: selectedUnit }\r\n },\r\n componentKey: organizationMembersKey\r\n }\"\r\n [selectedOrganizationUnit]=\"selectedUnit\"\r\n (onAdded)=\"get()\"\r\n (onDeleted)=\"get()\"\r\n ></abp-organization-members>\r\n </ng-container>\r\n <ng-template #selectUnitMsg>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::SelectAnOrganizationUnitToSeeMembers' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n <li ngbNavItem *abpPermission=\"'AbpIdentity.OrganizationUnits.ManageRoles'\">\r\n <a ngbNavLink>{{ 'AbpIdentity::Roles' | abpLocalization }}</a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngIf=\"selectedUnit; else selectUnitMsg\">\r\n <abp-organization-roles\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n selectedOrganizationUnit: { value: selectedUnit }\r\n },\r\n componentKey: organizationRolesKey\r\n }\"\r\n [selectedOrganizationUnit]=\"selectedUnit\"\r\n ></abp-organization-roles>\r\n </ng-container>\r\n <ng-template #selectUnitMsg>\r\n <p class=\"text-muted\">\r\n {{ 'AbpIdentity::SelectAnOrganizationUnitToSeeRoles' | abpLocalization }}\r\n </p>\r\n </ng-template>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"card-body pt-0\">\r\n <div [ngbNavOutlet]=\"nav\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isNodeModalVisible\" [busy]=\"isModalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>\r\n {{\r\n (nodeId ? 'AbpIdentity::EditOrganizationUnit' : 'AbpIdentity::NewOrganizationUnit')\r\n | abpLocalization\r\n }}\r\n </h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <div class=\"mb-3\" *ngIf=\"nodeForm.get('parentId').value as parentId\">\r\n <strong>{{\r\n 'AbpIdentity::OrganizationUnit:Parent{0}' | abpLocalization: getParentName(parentId)\r\n }}</strong>\r\n </div>\r\n <form [formGroup]=\"nodeForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selectedUnit\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" (click)=\"save()\" [disabled]=\"nodeForm?.invalid\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-delete-organization-unit *abpVisible=\"deleteOrganizationUnitService.visible()\" (deleted)=\"onOUDeleted()\" />\r\n<abp-move-all-users-of-unit *abpVisible=\"moveAllUsersOfUnitModalService.visible()\" (moved)=\"onOUMoved()\" />\r\n", styles: [".fs-15px{font-size:15px}\n"] }]
|
|
1355
|
+
}] });
|
|
1112
1356
|
|
|
1113
1357
|
class MoveAllUsersComponent {
|
|
1114
1358
|
constructor() {
|
|
@@ -1150,7 +1394,7 @@ class MoveAllUsersComponent {
|
|
|
1150
1394
|
this.visibleChange.emit({ visible: false, refresh: true });
|
|
1151
1395
|
}
|
|
1152
1396
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: MoveAllUsersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: MoveAllUsersComponent, selector: "abp-move-all-users", inputs: { visible: "visible", selected: "selected" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: "<abp-modal [visible]=\"visible\" (visibleChange)=\"onVisibleChange($event)\" [suppressUnsavedChangesWarning]=\"true\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{'AbpIdentity::MoveAllUsers' | abpLocalization}}\r\n </h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <p [innerHTML]=\"'AbpIdentity::MoveAllUsersWithRoleTo' | abpLocalization: name\"></p>\r\n <form [formGroup]=\"form\" id=\"role-move-users-form\" (ngSubmit)=\"save()\">\r\n <select class=\"form-select mt-2\" formControlName=\"role\">\r\n <option value=\"\" selected>{{ (loading() ? 'AbpUi::LoadingWithThreeDot': \"AbpIdentity::UnassignRole\") | abpLocalization}}</option>\r\n <option *ngFor=\"let item of roles(); trackBy:trackByFn\" [value]=\"item.id\">{{item.name}}</option>\r\n </select>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpUi::Cancel' | abpLocalization }}\r\n </button>\r\n <button type=\"submit\" class=\"btn btn-primary\" [loading]=\"loading()\"\r\n [disabled]=\"form.invalid && form.touched\"\r\n form=\"role-move-users-form\" >\r\n <i class=\"fa fa-check me-1\" aria-hidden=\"true\"></i>\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n</abp-modal>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type:
|
|
1397
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: MoveAllUsersComponent, selector: "abp-move-all-users", inputs: { visible: "visible", selected: "selected" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: "<abp-modal [visible]=\"visible\" (visibleChange)=\"onVisibleChange($event)\" [suppressUnsavedChangesWarning]=\"true\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{'AbpIdentity::MoveAllUsers' | abpLocalization}}\r\n </h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <p [innerHTML]=\"'AbpIdentity::MoveAllUsersWithRoleTo' | abpLocalization: name\"></p>\r\n <form [formGroup]=\"form\" id=\"role-move-users-form\" (ngSubmit)=\"save()\">\r\n <select class=\"form-select mt-2\" formControlName=\"role\">\r\n <option value=\"\" selected>{{ (loading() ? 'AbpUi::LoadingWithThreeDot': \"AbpIdentity::UnassignRole\") | abpLocalization}}</option>\r\n <option *ngFor=\"let item of roles(); trackBy:trackByFn\" [value]=\"item.id\">{{item.name}}</option>\r\n </select>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpUi::Cancel' | abpLocalization }}\r\n </button>\r\n <button type=\"submit\" class=\"btn btn-primary\" [loading]=\"loading()\"\r\n [disabled]=\"form.invalid && form.touched\"\r\n form=\"role-move-users-form\" >\r\n <i class=\"fa fa-check me-1\" aria-hidden=\"true\"></i>\r\n {{ 'AbpUi::Save' | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n</abp-modal>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1154
1398
|
}
|
|
1155
1399
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: MoveAllUsersComponent, decorators: [{
|
|
1156
1400
|
type: Component,
|
|
@@ -1232,7 +1476,7 @@ class RoleDeleteComponent {
|
|
|
1232
1476
|
this.visibleChange.emit({ visible: false, refresh: true });
|
|
1233
1477
|
}
|
|
1234
1478
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: RoleDeleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1235
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: RoleDeleteComponent, selector: "abp-role-delete", inputs: { visible: "visible", selected: "selected" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: "<abp-modal [visible]=\"visible\" (visibleChange)=\"onVisibleChange($event)\" [suppressUnsavedChangesWarning]=\"true\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ 'AbpUi::AreYouSure' | abpLocalization }}\r\n </h5>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <p class=\"fw-bold\">\r\n {{\r\n 'AbpIdentity::RoleDeletionConfirmationMessage' | abpLocalization: name\r\n }}\r\n </p>\r\n <form [formGroup]=\"form\" id=\"role-delete-form\" (ngSubmit)=\"save()\">\r\n <ng-container *ngIf=\"userCount > 0\">\r\n <p class=\"mt-2\">\r\n {{'AbpIdentity::ChooseAnActionForRole' | abpLocalization: userCount}}\r\n </p>\r\n\r\n <div class=\"form-check mt-2\">\r\n <input class=\"form-check-input\" formControlName=\"assignType\" type=\"radio\" name=\"assignType\" id=\"unassign\" [value]=\"false\" >\r\n <label class=\"form-check-label\" for=\"unassign\">{{'AbpIdentity::UnassignTheRoleFromTheUsers' |\r\n abpLocalization}}</label>\r\n </div>\r\n <ng-container *ngIf=\"roles().length > 0\">\r\n <div class=\"form-check mt-2\">\r\n <input class=\"form-check-input\" formControlName=\"assignType\" type=\"radio\" name=\"assignType\" id=\"assign\" [value]=\"true\">\r\n <label class=\"form-check-label\" for=\"assign\">{{'AbpIdentity::AssignUsersToOtherRole' |\r\n abpLocalization}}</label>\r\n </div>\r\n <select class=\"form-select mt-2\" *ngIf=\"assignType$ | async\" formControlName=\"role\">\r\n <option value=\"\" selected>{{ (loading() ? 'AbpUi::LoadingWithThreeDot': \"AbpIdentity::SelectAnRoleToAssign\") | abpLocalization}}</option>\r\n <option *ngFor=\"let item of roles(); trackBy:trackByFn\" [value]=\"item.id\">{{item.name}}</option>\r\n </select>\r\n </ng-container>\r\n </ng-container>\r\n </form>\r\n\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpUi::Cancel' | abpLocalization }}\r\n </button>\r\n <button type=\"submit\" class=\"btn btn-primary\" [loading]=\"loading()\"\r\n [disabled]=\"form.invalid && form.touched\"\r\n form=\"role-delete-form\" >\r\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\r\n {{ 'AbpUi::Delete' | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n</abp-modal>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type:
|
|
1479
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.6", type: RoleDeleteComponent, selector: "abp-role-delete", inputs: { visible: "visible", selected: "selected" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: "<abp-modal [visible]=\"visible\" (visibleChange)=\"onVisibleChange($event)\" [suppressUnsavedChangesWarning]=\"true\">\r\n <ng-template #abpHeader>\r\n <h5 class=\"modal-title\">\r\n {{ 'AbpUi::AreYouSure' | abpLocalization }}\r\n </h5>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <p class=\"fw-bold\">\r\n {{\r\n 'AbpIdentity::RoleDeletionConfirmationMessage' | abpLocalization: name\r\n }}\r\n </p>\r\n <form [formGroup]=\"form\" id=\"role-delete-form\" (ngSubmit)=\"save()\">\r\n <ng-container *ngIf=\"userCount > 0\">\r\n <p class=\"mt-2\">\r\n {{'AbpIdentity::ChooseAnActionForRole' | abpLocalization: userCount}}\r\n </p>\r\n\r\n <div class=\"form-check mt-2\">\r\n <input class=\"form-check-input\" formControlName=\"assignType\" type=\"radio\" name=\"assignType\" id=\"unassign\" [value]=\"false\" >\r\n <label class=\"form-check-label\" for=\"unassign\">{{'AbpIdentity::UnassignTheRoleFromTheUsers' |\r\n abpLocalization}}</label>\r\n </div>\r\n <ng-container *ngIf=\"roles().length > 0\">\r\n <div class=\"form-check mt-2\">\r\n <input class=\"form-check-input\" formControlName=\"assignType\" type=\"radio\" name=\"assignType\" id=\"assign\" [value]=\"true\">\r\n <label class=\"form-check-label\" for=\"assign\">{{'AbpIdentity::AssignUsersToOtherRole' |\r\n abpLocalization}}</label>\r\n </div>\r\n <select class=\"form-select mt-2\" *ngIf=\"assignType$ | async\" formControlName=\"role\">\r\n <option value=\"\" selected>{{ (loading() ? 'AbpUi::LoadingWithThreeDot': \"AbpIdentity::SelectAnRoleToAssign\") | abpLocalization}}</option>\r\n <option *ngFor=\"let item of roles(); trackBy:trackByFn\" [value]=\"item.id\">{{item.name}}</option>\r\n </select>\r\n </ng-container>\r\n </ng-container>\r\n </form>\r\n\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpUi::Cancel' | abpLocalization }}\r\n </button>\r\n <button type=\"submit\" class=\"btn btn-primary\" [loading]=\"loading()\"\r\n [disabled]=\"form.invalid && form.touched\"\r\n form=\"role-delete-form\" >\r\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\r\n {{ 'AbpUi::Delete' | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n</abp-modal>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1236
1480
|
}
|
|
1237
1481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: RoleDeleteComponent, decorators: [{
|
|
1238
1482
|
type: Component,
|
|
@@ -1288,7 +1532,6 @@ class RolesComponent {
|
|
|
1288
1532
|
.get(id)
|
|
1289
1533
|
.pipe(take(1))
|
|
1290
1534
|
.subscribe(selectedRole => {
|
|
1291
|
-
console.log(selectedRole);
|
|
1292
1535
|
this.selected = selectedRole;
|
|
1293
1536
|
this.openModal();
|
|
1294
1537
|
});
|
|
@@ -1367,7 +1610,7 @@ class RolesComponent {
|
|
|
1367
1610
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1368
1611
|
useValue: "Identity.RolesComponent" /* eIdentityComponents.Roles */,
|
|
1369
1612
|
},
|
|
1370
|
-
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'AbpIdentity::Roles' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-roles-wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpIdentity\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"roleForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"roleForm\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'R' },\r\n providerKey: { value: providerKey },\r\n hideBadges: { value: true },\r\n visible: { value: visiblePermissions, twoWay: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent'\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n [providerKey]=\"providerKey\"\r\n providerName=\"R\"\r\n [hideBadges]=\"true\"\r\n>\r\n</abp-permission-management>\r\n\r\n<abp-claim-modal [(visible)]=\"visibleClaims\" [subject]=\"claimSubject\"></abp-claim-modal>\r\n\r\n<abp-role-delete *ngIf=\"visibleRoleDelete\"\r\n[visible]=\"visibleRoleDelete\" \r\n[selected]=\"selected\"\r\n(visibleChange)=\"onVisibleDeleteChange($event)\"\r\n/>\r\n\r\n<abp-move-all-users *ngIf=\"visibleMove\"\r\n[visible]=\"visibleMove\" \r\n[selected]=\"selected\"\r\n(visibleChange)=\"onVisibleMoveChange($event)\"\r\n/>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1$1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: i7.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: i7.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], outputs: ["tableActivate"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "directive", type:
|
|
1613
|
+
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'AbpIdentity::Roles' | abpLocalization\" [toolbar]=\"data.items\">\r\n <div id=\"identity-roles-wrapper\">\r\n <abp-advanced-entity-filters\r\n localizationSourceName=\"AbpIdentity\"\r\n [list]=\"list\"\r\n ></abp-advanced-entity-filters>\r\n\r\n <div class=\"card\">\r\n <abp-extensible-table\r\n [data]=\"data.items\"\r\n [recordsTotal]=\"data.totalCount\"\r\n [list]=\"list\"\r\n ></abp-extensible-table>\r\n </div>\r\n </div>\r\n</abp-page>\r\n\r\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\r\n <ng-template #abpHeader>\r\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}</h3>\r\n </ng-template>\r\n\r\n <ng-template #abpBody>\r\n <form [formGroup]=\"form\" id=\"roleForm\" (ngSubmit)=\"save()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\r\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button iconClass=\"fa fa-check\" buttonType=\"submit\" formName=\"roleForm\">{{\r\n 'AbpIdentity::Save' | abpLocalization\r\n }}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n\r\n<abp-permission-management\r\n *abpReplaceableTemplate=\"{\r\n inputs: {\r\n providerName: { value: 'R' },\r\n providerKey: { value: providerKey },\r\n hideBadges: { value: true },\r\n visible: { value: visiblePermissions, twoWay: true }\r\n },\r\n outputs: { visibleChange: onVisiblePermissionChange },\r\n componentKey: 'PermissionManagement.PermissionManagementComponent'\r\n }\"\r\n [(visible)]=\"visiblePermissions\"\r\n [providerKey]=\"providerKey\"\r\n providerName=\"R\"\r\n [hideBadges]=\"true\"\r\n>\r\n</abp-permission-management>\r\n\r\n<abp-claim-modal [(visible)]=\"visibleClaims\" [subject]=\"claimSubject\"></abp-claim-modal>\r\n\r\n<abp-role-delete *ngIf=\"visibleRoleDelete\"\r\n[visible]=\"visibleRoleDelete\" \r\n[selected]=\"selected\"\r\n(visibleChange)=\"onVisibleDeleteChange($event)\"\r\n/>\r\n\r\n<abp-move-all-users *ngIf=\"visibleMove\"\r\n[visible]=\"visibleMove\" \r\n[selected]=\"selected\"\r\n(visibleChange)=\"onVisibleMoveChange($event)\"\r\n/>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1$1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "component", type: i7.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "component", type: i7.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], outputs: ["tableActivate"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: i6.AdvancedEntityFiltersComponent, selector: "abp-advanced-entity-filters", inputs: ["list", "localizationSourceName", "entityFilterPlaceholder"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$2.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$2.ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: i10.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "entityDisplayName", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }, { kind: "component", type: i12.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: ClaimModalComponent, selector: "abp-claim-modal", inputs: ["subject", "visible"], outputs: ["visibleChange"] }, { kind: "component", type: MoveAllUsersComponent, selector: "abp-move-all-users", inputs: ["visible", "selected"], outputs: ["visibleChange"] }, { kind: "component", type: RoleDeleteComponent, selector: "abp-role-delete", inputs: ["visible", "selected"], outputs: ["visibleChange"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1371
1614
|
}
|
|
1372
1615
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: RolesComponent, decorators: [{
|
|
1373
1616
|
type: Component,
|
|
@@ -1558,12 +1801,12 @@ const DEFAULT_CLAIMS_TOOLBAR_ACTIONS = ToolbarAction.createMany([
|
|
|
1558
1801
|
const DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
1559
1802
|
{
|
|
1560
1803
|
text: 'AbpIdentity::Delete',
|
|
1804
|
+
permission: 'AbpIdentity.OrganizationUnits.ManageMembers',
|
|
1805
|
+
btnClass: 'btn btn-danger text-center',
|
|
1561
1806
|
action: data => {
|
|
1562
1807
|
const component = data.getInjected(OrganizationMembersComponent);
|
|
1563
1808
|
component.delete(data.record.id, data.record.userName);
|
|
1564
1809
|
},
|
|
1565
|
-
permission: 'AbpIdentity.OrganizationUnits.ManageMembers',
|
|
1566
|
-
btnClass: 'btn btn-danger text-center',
|
|
1567
1810
|
},
|
|
1568
1811
|
]);
|
|
1569
1812
|
|
|
@@ -1658,7 +1901,7 @@ const DEFAULT_ROLES_ENTITY_ACTIONS = EntityAction.createMany([
|
|
|
1658
1901
|
visible: data => Boolean(data.getInjected(SHOW_ENTITY_HISTORY, null)),
|
|
1659
1902
|
},
|
|
1660
1903
|
{
|
|
1661
|
-
text: '
|
|
1904
|
+
text: 'AbpUi::Delete',
|
|
1662
1905
|
action: data => {
|
|
1663
1906
|
const component = data.getInjected(RolesComponent);
|
|
1664
1907
|
component.delete(data.record);
|
|
@@ -1894,7 +2137,11 @@ const DEFAULT_USERS_ENTITY_ACTIONS = EntityAction.createMany([
|
|
|
1894
2137
|
component.isLockModalVisible = true;
|
|
1895
2138
|
},
|
|
1896
2139
|
permission: 'AbpIdentity.Users.Update',
|
|
1897
|
-
visible: data =>
|
|
2140
|
+
visible: data => {
|
|
2141
|
+
const configState = data.getInjected(ConfigStateService);
|
|
2142
|
+
const currentUserId = configState.getDeep('currentUser.id');
|
|
2143
|
+
return (data.record.id !== currentUserId && !data.record.isLockedOut && data.record.lockoutEnabled);
|
|
2144
|
+
},
|
|
1898
2145
|
},
|
|
1899
2146
|
{
|
|
1900
2147
|
text: 'AbpIdentity::Unlock',
|
|
@@ -2169,7 +2416,19 @@ const DEFAULT_USERS_CREATE_FORM_PROPS = FormProp.createMany([
|
|
|
2169
2416
|
defaultValue: true,
|
|
2170
2417
|
},
|
|
2171
2418
|
]);
|
|
2172
|
-
const DEFAULT_USERS_EDIT_FORM_PROPS = DEFAULT_USERS_CREATE_FORM_PROPS.filter(prop => prop.name !== 'password')
|
|
2419
|
+
const DEFAULT_USERS_EDIT_FORM_PROPS = DEFAULT_USERS_CREATE_FORM_PROPS.filter(prop => prop.name !== 'password').map(prop => {
|
|
2420
|
+
if (prop.name === 'isActive') {
|
|
2421
|
+
return {
|
|
2422
|
+
...prop,
|
|
2423
|
+
visible: data => {
|
|
2424
|
+
const configState = data.getInjected(ConfigStateService);
|
|
2425
|
+
const currentUserId = configState.getDeep('currentUser.id');
|
|
2426
|
+
return data.record.id !== currentUserId;
|
|
2427
|
+
},
|
|
2428
|
+
};
|
|
2429
|
+
}
|
|
2430
|
+
return prop;
|
|
2431
|
+
});
|
|
2173
2432
|
|
|
2174
2433
|
const DEFAULT_IDENTITY_ENTITY_ACTIONS = {
|
|
2175
2434
|
["Identity.ClaimsComponent" /* eIdentityComponents.Claims */]: DEFAULT_CLAIMS_ENTITY_ACTIONS,
|
|
@@ -2323,6 +2582,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
2323
2582
|
}] });
|
|
2324
2583
|
|
|
2325
2584
|
/* tslint:disable:max-line-length */
|
|
2585
|
+
const exportAndDeclarations = [
|
|
2586
|
+
UsersComponent,
|
|
2587
|
+
ClaimsComponent,
|
|
2588
|
+
OrganizationUnitsComponent,
|
|
2589
|
+
OrganizationMembersComponent,
|
|
2590
|
+
OrganizationMembersModalBodyComponent,
|
|
2591
|
+
OrganizationRolesComponent,
|
|
2592
|
+
OrganizationRolesModalBodyComponent,
|
|
2593
|
+
AbstractOrganizationUnitComponent,
|
|
2594
|
+
SecurityLogsComponent,
|
|
2595
|
+
SelectedOrganizationUnitComponent,
|
|
2596
|
+
ExternalLoginComponent,
|
|
2597
|
+
UserDropdownMenuComponent,
|
|
2598
|
+
RolesComponent,
|
|
2599
|
+
ClaimModalComponent,
|
|
2600
|
+
MoveAllUsersComponent,
|
|
2601
|
+
RoleDeleteComponent,
|
|
2602
|
+
];
|
|
2326
2603
|
class IdentityModule {
|
|
2327
2604
|
static forChild(options = {}) {
|
|
2328
2605
|
return {
|
|
@@ -2371,7 +2648,7 @@ class IdentityModule {
|
|
|
2371
2648
|
RolesComponent,
|
|
2372
2649
|
ClaimModalComponent,
|
|
2373
2650
|
MoveAllUsersComponent,
|
|
2374
|
-
RoleDeleteComponent], imports: [CoreModule,
|
|
2651
|
+
RoleDeleteComponent, MoveAllUsersComponent], imports: [CoreModule,
|
|
2375
2652
|
CommercialUiModule,
|
|
2376
2653
|
IdentityRoutingModule,
|
|
2377
2654
|
NgbNavModule,
|
|
@@ -2384,7 +2661,9 @@ class IdentityModule {
|
|
|
2384
2661
|
TreeModule,
|
|
2385
2662
|
PageModule,
|
|
2386
2663
|
AdvancedEntityFiltersModule,
|
|
2387
|
-
UiExtensionsModule
|
|
2664
|
+
UiExtensionsModule,
|
|
2665
|
+
DeleteOrganizationUnitComponent,
|
|
2666
|
+
MoveAllUsersOfUnitComponent], exports: [UsersComponent,
|
|
2388
2667
|
ClaimsComponent,
|
|
2389
2668
|
OrganizationUnitsComponent,
|
|
2390
2669
|
OrganizationMembersComponent,
|
|
@@ -2395,7 +2674,11 @@ class IdentityModule {
|
|
|
2395
2674
|
SecurityLogsComponent,
|
|
2396
2675
|
SelectedOrganizationUnitComponent,
|
|
2397
2676
|
ExternalLoginComponent,
|
|
2398
|
-
UserDropdownMenuComponent
|
|
2677
|
+
UserDropdownMenuComponent,
|
|
2678
|
+
RolesComponent,
|
|
2679
|
+
ClaimModalComponent,
|
|
2680
|
+
MoveAllUsersComponent,
|
|
2681
|
+
RoleDeleteComponent] }); }
|
|
2399
2682
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: IdentityModule, imports: [CoreModule,
|
|
2400
2683
|
CommercialUiModule,
|
|
2401
2684
|
IdentityRoutingModule,
|
|
@@ -2409,43 +2692,15 @@ class IdentityModule {
|
|
|
2409
2692
|
TreeModule,
|
|
2410
2693
|
PageModule,
|
|
2411
2694
|
AdvancedEntityFiltersModule,
|
|
2412
|
-
UiExtensionsModule
|
|
2695
|
+
UiExtensionsModule,
|
|
2696
|
+
DeleteOrganizationUnitComponent,
|
|
2697
|
+
MoveAllUsersOfUnitComponent] }); }
|
|
2413
2698
|
}
|
|
2414
2699
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImport: i0, type: IdentityModule, decorators: [{
|
|
2415
2700
|
type: NgModule,
|
|
2416
2701
|
args: [{
|
|
2417
|
-
declarations: [
|
|
2418
|
-
|
|
2419
|
-
ClaimsComponent,
|
|
2420
|
-
OrganizationUnitsComponent,
|
|
2421
|
-
OrganizationMembersComponent,
|
|
2422
|
-
OrganizationMembersModalBodyComponent,
|
|
2423
|
-
OrganizationRolesComponent,
|
|
2424
|
-
OrganizationRolesModalBodyComponent,
|
|
2425
|
-
AbstractOrganizationUnitComponent,
|
|
2426
|
-
SecurityLogsComponent,
|
|
2427
|
-
SelectedOrganizationUnitComponent,
|
|
2428
|
-
ExternalLoginComponent,
|
|
2429
|
-
UserDropdownMenuComponent,
|
|
2430
|
-
RolesComponent,
|
|
2431
|
-
ClaimModalComponent,
|
|
2432
|
-
MoveAllUsersComponent,
|
|
2433
|
-
RoleDeleteComponent
|
|
2434
|
-
],
|
|
2435
|
-
exports: [
|
|
2436
|
-
UsersComponent,
|
|
2437
|
-
ClaimsComponent,
|
|
2438
|
-
OrganizationUnitsComponent,
|
|
2439
|
-
OrganizationMembersComponent,
|
|
2440
|
-
OrganizationMembersModalBodyComponent,
|
|
2441
|
-
OrganizationRolesComponent,
|
|
2442
|
-
OrganizationRolesModalBodyComponent,
|
|
2443
|
-
AbstractOrganizationUnitComponent,
|
|
2444
|
-
SecurityLogsComponent,
|
|
2445
|
-
SelectedOrganizationUnitComponent,
|
|
2446
|
-
ExternalLoginComponent,
|
|
2447
|
-
UserDropdownMenuComponent,
|
|
2448
|
-
],
|
|
2702
|
+
declarations: [...exportAndDeclarations, MoveAllUsersComponent],
|
|
2703
|
+
exports: [...exportAndDeclarations],
|
|
2449
2704
|
imports: [
|
|
2450
2705
|
CoreModule,
|
|
2451
2706
|
CommercialUiModule,
|
|
@@ -2461,6 +2716,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
2461
2716
|
PageModule,
|
|
2462
2717
|
AdvancedEntityFiltersModule,
|
|
2463
2718
|
UiExtensionsModule,
|
|
2719
|
+
DeleteOrganizationUnitComponent,
|
|
2720
|
+
MoveAllUsersOfUnitComponent,
|
|
2464
2721
|
],
|
|
2465
2722
|
}]
|
|
2466
2723
|
}] });
|
|
@@ -2469,5 +2726,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.6", ngImpor
|
|
|
2469
2726
|
* Generated bundle index. Do not edit.
|
|
2470
2727
|
*/
|
|
2471
2728
|
|
|
2472
|
-
export { AbstractOrganizationUnitComponent, ClaimModalComponent, ClaimsComponent, DEFAULT_CLAIMS_CREATE_FORM_PROPS, DEFAULT_CLAIMS_EDIT_FORM_PROPS, DEFAULT_CLAIMS_ENTITY_ACTIONS, DEFAULT_CLAIMS_ENTITY_PROPS, DEFAULT_CLAIMS_TOOLBAR_ACTIONS, DEFAULT_IDENTITY_CREATE_FORM_PROPS, DEFAULT_IDENTITY_EDIT_FORM_PROPS, DEFAULT_IDENTITY_ENTITY_ACTIONS, DEFAULT_IDENTITY_ENTITY_PROPS, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS, DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS, DEFAULT_ORGANIZATION_UNITS_CREATE_FORM_PROPS, DEFAULT_ORGANIZATION_UNITS_EDIT_FORM_PROPS, DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS, DEFAULT_ROLES_CREATE_FORM_PROPS, DEFAULT_ROLES_EDIT_FORM_PROPS, DEFAULT_ROLES_ENTITY_ACTIONS, DEFAULT_ROLES_ENTITY_PROPS, DEFAULT_ROLES_TOOLBAR_ACTIONS, DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS, DEFAULT_SECURITY_LOGS_ENTITY_PROPS, DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS, DEFAULT_USERS_CREATE_FORM_PROPS, DEFAULT_USERS_EDIT_FORM_PROPS, DEFAULT_USERS_ENTITY_ACTIONS, DEFAULT_USERS_ENTITY_PROPS, DEFAULT_USERS_TOOLBAR_ACTIONS, DEFAULT_USERS_TOOLBAR_ALL, DEFAULT_USERS_TOOLBAR_COMPONENTS, ExternalLoginComponent, IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, IDENTITY_ENTITY_ACTION_CONTRIBUTORS, IDENTITY_ENTITY_PROP_CONTRIBUTORS, IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, IdentityExtensionsGuard, IdentityModule, ORGANIZATION_UNIT_CONFIG, OrganizationMembersComponent, OrganizationMembersModalBodyComponent, OrganizationRolesComponent, OrganizationRolesModalBodyComponent, OrganizationUnitsComponent, OrganizationUnitsStateService, RolesComponent, SecurityLogsComponent, SelectedOrganizationUnitComponent, UserDropdownMenuComponent, UsersComponent, eIdentityTwoFactorBehaviour, identityTwoFactorBehaviourOptions };
|
|
2729
|
+
export { AbstractOrganizationUnitComponent, ClaimModalComponent, ClaimsComponent, DEFAULT_CLAIMS_CREATE_FORM_PROPS, DEFAULT_CLAIMS_EDIT_FORM_PROPS, DEFAULT_CLAIMS_ENTITY_ACTIONS, DEFAULT_CLAIMS_ENTITY_PROPS, DEFAULT_CLAIMS_TOOLBAR_ACTIONS, DEFAULT_IDENTITY_CREATE_FORM_PROPS, DEFAULT_IDENTITY_EDIT_FORM_PROPS, DEFAULT_IDENTITY_ENTITY_ACTIONS, DEFAULT_IDENTITY_ENTITY_PROPS, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS, DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS, DEFAULT_ORGANIZATION_UNITS_CREATE_FORM_PROPS, DEFAULT_ORGANIZATION_UNITS_EDIT_FORM_PROPS, DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS, DEFAULT_ROLES_CREATE_FORM_PROPS, DEFAULT_ROLES_EDIT_FORM_PROPS, DEFAULT_ROLES_ENTITY_ACTIONS, DEFAULT_ROLES_ENTITY_PROPS, DEFAULT_ROLES_TOOLBAR_ACTIONS, DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS, DEFAULT_SECURITY_LOGS_ENTITY_PROPS, DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS, DEFAULT_USERS_CREATE_FORM_PROPS, DEFAULT_USERS_EDIT_FORM_PROPS, DEFAULT_USERS_ENTITY_ACTIONS, DEFAULT_USERS_ENTITY_PROPS, DEFAULT_USERS_TOOLBAR_ACTIONS, DEFAULT_USERS_TOOLBAR_ALL, DEFAULT_USERS_TOOLBAR_COMPONENTS, DeleteOrganizationUnitComponent, DeleteOrganizationUnitService, ExternalLoginComponent, IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, IDENTITY_ENTITY_ACTION_CONTRIBUTORS, IDENTITY_ENTITY_PROP_CONTRIBUTORS, IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, IdentityExtensionsGuard, IdentityModule, MoveAllUsersComponent, MoveAllUsersOfUnitComponent, MoveAllUsersOfUnitModalService, ORGANIZATION_UNIT_CONFIG, OrganizationMembersComponent, OrganizationMembersModalBodyComponent, OrganizationRolesComponent, OrganizationRolesModalBodyComponent, OrganizationUnitDeleteValidator, OrganizationUnitsComponent, OrganizationUnitsStateService, RoleDeleteComponent, RoleDeleteValidator, RolesComponent, SecurityLogsComponent, SelectedOrganizationUnitComponent, UserDropdownMenuComponent, UsersComponent, eIdentityTwoFactorBehaviour, identityTwoFactorBehaviourOptions };
|
|
2473
2730
|
//# sourceMappingURL=volo-abp.ng.identity.mjs.map
|