From bd315f42a3db1049134875fbd4713b680dcbddc5 Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Date: Wed, 29 Oct 2025 17:55:05 +0530 Subject: [PATCH] compact --- .../compact-filter.component.html | 7 +- .../common-filter/compact-filter.component.ts | 63 ++++++++++++++- .../dashrunnerall/dashrunnerall.component.ts | 81 +++++++++---------- 3 files changed, 105 insertions(+), 46 deletions(-) diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/common-filter/compact-filter.component.html b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/common-filter/compact-filter.component.html index 1564cf7..7c613e4 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/common-filter/compact-filter.component.html +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/common-filter/compact-filter.component.html @@ -79,7 +79,12 @@
-
+
+ {{ filterValue.length }} selected + {{ filterLabel || filterKey || 'Select options' }} + +
+
{ + const handleClick = (event: MouseEvent) => { + const target = event.target as HTMLElement; + if (!target.closest('.compact-multiselect-display') && !target.closest('.compact-multiselect-dropdown')) { + this.showMultiselectDropdown = false; + document.removeEventListener('click', handleClick); + } + }; + document.addEventListener('click', handleClick); + }, 0); + } + } } \ No newline at end of file diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardrunner/dashrunnerall/dashrunnerall.component.ts b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardrunner/dashrunnerall/dashrunnerall.component.ts index 63e229a..5eb4c27 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardrunner/dashrunnerall/dashrunnerall.component.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardrunner/dashrunnerall/dashrunnerall.component.ts @@ -12,23 +12,23 @@ import { ModulesetupService } from 'src/app/services/builder/modulesetup.service styleUrls: ['./dashrunnerall.component.scss'] }) export class DashrunnerallComponent implements OnInit { - addModall:boolean = false; - selected:any[] = []; + addModall: boolean = false; + selected: any[] = []; loading = false; - data:any; - id:any; - moduleId:any; + data: any; + id: any; + moduleId: any; modalDelete = false; - rowSelected :any= {}; + rowSelected: any = {}; rows: any[]; projectname; projectId; error; constructor( - private router : Router, - private route: ActivatedRoute,private dashboardService : Dashboard3Service, + private router: Router, + private route: ActivatedRoute, private dashboardService: Dashboard3Service, // private wireframeservice : WireframeService, - private excel: ExcelService,private mainService: ModulesetupService, + private excel: ExcelService, private mainService: ModulesetupService, private toastr: ToastrService,) { } ngOnInit(): void { @@ -42,50 +42,46 @@ export class DashrunnerallComponent implements OnInit { // this.getprojectName(this.projectId); } - getprojectName(id){ + getprojectName(id) { this.mainService.getProjectModules(id).subscribe((data) => { console.log(data); - this.projectname=data.items[0]['projectName']; + this.projectname = data.items[0]['projectName']; console.log(this.projectname); }); } - getdashboard() - { - this.dashboardService.getAllDash().subscribe((data) =>{ + getdashboard() { + this.dashboardService.getAllDash().subscribe((data) => { this.data = data; this.rows = this.data; console.log(data); - this.error="No data Available"; + this.error = "No data Available"; console.log(this.error); }); } - openModal() - { + openModal() { this.addModall = true; } - gotoadd() - { - this.router.navigate(['../../dashboardbuilder'],{relativeTo:this.route}); + gotoadd() { + this.router.navigate(['../../dashboardbuilder'], { relativeTo: this.route }); } -// for runner line navigation + // for runner line navigation // goToEditData(id: number){ // this.router.navigate(['../editdata/'+id],{relativeTo:this.route}); // } - goToEdit(id:number) - { - // Navigate to editnewdash component instead of dashrunnerline - // Pass a query parameter to indicate this is from dashboard runner - this.router.navigate(['../../dashboardbuilder/editdashn/'+id], { - relativeTo: this.route, - queryParams: { fromRunner: true } - }); + goToEdit(id: number) { + // Navigate to editnewdash component instead of dashrunnerline + // Pass a query parameter to indicate this is from dashboard runner + this.router.navigate(['../../dashboardbuilder/editdashn/' + id], { + relativeTo: this.route, + queryParams: { fromRunner: true } + }); } - goToEditData(id: number){ - this.router.navigate(['../editdata/'+id],{relativeTo:this.route}); + goToEditData(id: number) { + this.router.navigate(['../editdata/' + id], { relativeTo: this.route }); } onExport() { @@ -93,29 +89,28 @@ export class DashrunnerallComponent implements OnInit { moment().format('YYYYMMDD_HHmmss')) } - gotoAction(){ - this.router.navigate(["../../actions"], { relativeTo: this.route, queryParams: { m_id: this.moduleId,pname:this.projectname } }); + gotoAction() { + this.router.navigate(["../../actions"], { relativeTo: this.route, queryParams: { m_id: this.moduleId, pname: this.projectname } }); } - gotoRepo(){ + gotoRepo() { this.router.navigate(["../../modulecard"], { relativeTo: this.route, queryParams: { p_id: this.projectId } }); } - onDelete(row){ + onDelete(row) { this.rowSelected = row; console.log(this.rowSelected); this.modalDelete = true; } - delete(id) - { - this.modalDelete = false; - console.log("in delete "+id); - this.dashboardService.deleteField(id).subscribe((data)=>{ + delete(id) { + this.modalDelete = false; + console.log("in delete " + id); + this.dashboardService.deleteField(id).subscribe((data) => { console.log(data); this.ngOnInit(); - }); - if (id) { + }); + if (id) { this.toastr.success('Deleted successfully'); - } + } } // openModal() // {