From e4af1c14585c499d812d6be37f046263433b8e07 Mon Sep 17 00:00:00 2001 From: mchouliara Date: Tue, 10 Sep 2024 15:02:07 +0300 Subject: [PATCH] tenant user listing > remove tenantUserSubquery from lookup, instead add it to query during loadListing, small ui fixes --- .../prefilling-source-editor.component.html | 6 ++++-- .../user/listing/user-listing.component.ts | 18 +++++++++--------- .../plan-clone-dialog.component.html | 8 ++++---- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html b/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html index 925a151db..084a2a2e9 100644 --- a/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html +++ b/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html @@ -132,8 +132,10 @@ - - +
+ + +
diff --git a/frontend/src/app/ui/admin/user/listing/user-listing.component.ts b/frontend/src/app/ui/admin/user/listing/user-listing.component.ts index f77d2d2f8..0f16daf88 100644 --- a/frontend/src/app/ui/admin/user/listing/user-listing.component.ts +++ b/frontend/src/app/ui/admin/user/listing/user-listing.component.ts @@ -24,7 +24,6 @@ import * as FileSaver from 'file-saver'; import { Observable } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { nameof } from 'ts-simple-nameof'; -import { RouterUtilsService } from '@app/core/services/router/router-utils.service'; import { UserInviteToTenantDialogComponent } from './user-invite-to-tenant-dialog/user-invite-to-tenant-dialog.component'; import { AppPermission } from '@app/core/common/enum/permission.enum'; import { TenantUserLookup } from '@app/core/query/tenant-user.lookup'; @@ -100,13 +99,6 @@ export class UserListingComponent extends BaseListingComponent lookup.order = { items: [this.toDescSortField(nameof(x => x.createdAt))] }; this.updateOrderUiFields(lookup.order); - const tenantUserLookup: TenantUserLookup = new TenantUserLookup(); - if (this.authService.getSelectedTenantId() != null && this.isTenantAdminMode && this.authService.hasPermission(AppPermission.ViewTenantUserPage)){ - tenantUserLookup.tenantIds = [this.authService.getSelectedTenantId()]; - tenantUserLookup.isActive = [IsActive.Active] - lookup.tenantUserSubQuery = tenantUserLookup; - } - lookup.project = { fields: this.lookupFields }; @@ -177,7 +169,15 @@ export class UserListingComponent extends BaseListingComponent } protected loadListing(): Observable> { - return this.userService.query(this.lookup); + let lookup = this.lookup; + //TenantUserSubquery removed from lookup and added here so it is not part of the url params > removes bug of wrong tenantId in the subQuery when changing tenant + if (this.authService.getSelectedTenantId() != null && this.isTenantAdminMode && this.authService.hasPermission(AppPermission.ViewTenantUserPage)){ + const tenantUserLookup: TenantUserLookup = new TenantUserLookup(); + tenantUserLookup.tenantIds = [this.authService.getSelectedTenantId()]; + tenantUserLookup.isActive = [IsActive.Active]; + lookup = {...this.lookup, tenantUserSubQuery: tenantUserLookup} + } + return this.userService.query(lookup); } public deleteType(id: Guid) { diff --git a/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.html b/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.html index c85bdc80c..be4d6192b 100644 --- a/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.html +++ b/frontend/src/app/ui/plan/clone-dialog/plan-clone-dialog.component.html @@ -20,7 +20,7 @@
-
+
{{'PLAN-CLONE-DIALOG.FIELDS.DESCRIPTION' | translate}}
{{'PLAN-CLONE-DIALOG.FIELDS.DESCRIPTION-HINT' | translate}}
@@ -30,11 +30,11 @@
-
+
{{'PLAN-CLONE-DIALOG.FIELDS.DESCRIPTIONS' | translate}}
-
-
{{'PLAN-CLONE-DIALOG.FIELDS.DESCRIPTIONS-HINT' | translate}}
+
+ {{'PLAN-CLONE-DIALOG.FIELDS.DESCRIPTIONS-HINT' | translate}}