From b20b8987395fbfde0f8c4541c9ce8a9e16eb5cbb Mon Sep 17 00:00:00 2001 From: Sohith Kanala Date: Thu, 12 Dec 2024 21:47:30 +0530 Subject: [PATCH] loader fix --- .../directory-list/directory-table.component.scss | 7 ++++++- .../directory-list/directory-table.component.ts | 12 ++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/project/ws/app/src/lib/head/ui-admin-table/directory-list/directory-table.component.scss b/project/ws/app/src/lib/head/ui-admin-table/directory-list/directory-table.component.scss index 4421fa00..9fe004d1 100644 --- a/project/ws/app/src/lib/head/ui-admin-table/directory-list/directory-table.component.scss +++ b/project/ws/app/src/lib/head/ui-admin-table/directory-list/directory-table.component.scss @@ -718,7 +718,12 @@ $title-line-count: 2; margin-left: unset !important; } -::ng-deep .mat-column-Actions { +::ng-deep .mat-column-Actions, .mat-column-type { width: 90px; flex: none; +} + +::ng-deep .mat-column-organisation { + width: 300px; + flex: none; } \ No newline at end of file diff --git a/project/ws/app/src/lib/head/ui-admin-table/directory-list/directory-table.component.ts b/project/ws/app/src/lib/head/ui-admin-table/directory-list/directory-table.component.ts index b270729e..0b39b600 100644 --- a/project/ws/app/src/lib/head/ui-admin-table/directory-list/directory-table.component.ts +++ b/project/ws/app/src/lib/head/ui-admin-table/directory-list/directory-table.component.ts @@ -17,7 +17,7 @@ import { InfoModalComponent } from '../../info-modal/info-modal.component' import { CreateMDOService } from '../../../routes/home/services/create-mdo.services' import { DesignationsService } from '../../../routes/create-mdo/routes/designation/services/designations.service' import { debounceTime, distinctUntilChanged } from 'rxjs/operators' -import { Subject } from 'rxjs' +import { BehaviorSubject } from 'rxjs' @Component({ selector: 'ws-widget-directory-table', @@ -61,7 +61,7 @@ export class UIDirectoryTableComponent implements OnInit, AfterViewInit, OnChang customSelfRegistration = false selfRegistrationData: any = {} dialogRef: any - private filterSubject: Subject = new Subject(); + private filterSubject: BehaviorSubject = new BehaviorSubject(''); constructor( private router: Router, private events: EventService, public dialog: MatDialog, private designationsService: DesignationsService, @@ -107,6 +107,10 @@ export class UIDirectoryTableComponent implements OnInit, AfterViewInit, OnChang if (this.dataSource && this.dataSource.data && this.dataSource.data.length > 0) { this.tableData.loader = false } + + else if (this.dataSource && this.dataSource.data && this.dataSource.data.length === 0 && this.getFilterValue) { + this.tableData.loader = false + } } ngAfterViewInit() { } @@ -128,6 +132,10 @@ export class UIDirectoryTableComponent implements OnInit, AfterViewInit, OnChang }) } + get getFilterValue(): any { + return this.filterSubject.getValue() + } + buttonClick(action: string, row: any) { if (this.tableData) {