runner
This commit is contained in:
		
							parent
							
								
									c384f44c0c
								
							
						
					
					
						commit
						fa96ca81bd
					
				| @ -7,8 +7,8 @@ | ||||
| </ol> --> | ||||
| 
 | ||||
| <div style="display: inline;"> | ||||
|   <button class="btn componentbtn" (click)="toggleMenu()"><clr-icon shape="plus"></clr-icon>component</button> | ||||
|   <button class="btn btn-primary" (click)="openCommonFilterModal()" style="margin-left: 10px;"> | ||||
|   <button class="btn componentbtn" (click)="toggleMenu()" *ngIf="!fromRunner"><clr-icon shape="plus"></clr-icon>component</button> | ||||
|   <button class="btn btn-primary" (click)="openCommonFilterModal()" style="margin-left: 10px;" *ngIf="!fromRunner"> | ||||
|     <clr-icon shape="filter"></clr-icon> Common Filter | ||||
|   </button> | ||||
|   <div style="display: inline;"> | ||||
| @ -22,7 +22,7 @@ | ||||
| </div> | ||||
| 
 | ||||
| <div class="content-container"> | ||||
|   <nav class="sidenav" *ngIf="toggle" style="width: 16%;"> | ||||
|   <nav class="sidenav" *ngIf="toggle && !fromRunner" style="width: 16%;"> | ||||
|     <ul class="nav-list" style="list-style-type: none;"> | ||||
|       <li *ngFor="let widget of WidgetsMock"> | ||||
| 
 | ||||
| @ -57,7 +57,7 @@ | ||||
|         <!-- <label for="workflow_name">Add to Dasboard</label> | ||||
|               <input class="btn btn-icon" style="margin-top: 10px;float: right;"  type="checkbox" clrToggle value="billable" name="billable" /> | ||||
|             --> | ||||
|         <button class="btn btn-icon" style="margin-top: 10px;float: right;" (click)="editGadget(item)"> | ||||
|         <button class="btn btn-icon" style="margin-top: 10px;float: right;" (click)="editGadget(item)" *ngIf="!fromRunner"> | ||||
|           <clr-icon shape="pencil"></clr-icon> | ||||
|         </button> | ||||
| 
 | ||||
|  | ||||
| @ -205,6 +205,9 @@ export class EditnewdashComponent implements OnInit { | ||||
|     private alertService: AlertsService, | ||||
|     private sureconnectService: SureconnectService) { } // Add SureconnectService to constructor
 | ||||
| 
 | ||||
|   // Add property to track if coming from dashboard runner
 | ||||
|   fromRunner: boolean = false; | ||||
|    | ||||
|   ngOnInit(): void { | ||||
| 
 | ||||
|     // Grid options
 | ||||
| @ -230,6 +233,13 @@ export class EditnewdashComponent implements OnInit { | ||||
|       // Add resize callback to handle chart resizing
 | ||||
|       itemResizeCallback: this.itemResize.bind(this) | ||||
|     }; | ||||
|      | ||||
|     // Check if coming from dashboard runner
 | ||||
|     this.route.queryParams.subscribe(params => { | ||||
|       if (params['fromRunner'] === 'true') { | ||||
|         this.fromRunner = true; | ||||
|       } | ||||
|     }); | ||||
| 
 | ||||
|     this.editId = this.route.snapshot.params.id; | ||||
|     console.log(this.editId); | ||||
| @ -599,6 +609,12 @@ export class EditnewdashComponent implements OnInit { | ||||
|   modelid: number; | ||||
|   // Update the editGadget method to initialize filter properties
 | ||||
|   editGadget(item) { | ||||
|     // If coming from dashboard runner, skip showing the config modal
 | ||||
|     if (this.fromRunner) { | ||||
|       console.log('Coming from dashboard runner, skipping config modal'); | ||||
|       return; | ||||
|     } | ||||
|      | ||||
|     this.modeledit = true; | ||||
|     this.modelid = item.chartid; | ||||
|     console.log(this.modelid); | ||||
|  | ||||
| @ -70,9 +70,18 @@ export class DashrunnerallComponent implements OnInit { | ||||
|   { | ||||
|       this.router.navigate(['../../dashboardbuilder'],{relativeTo:this.route}); | ||||
|   } | ||||
| //  for runner line navigation
 | ||||
|   //  goToEditData(id: number){
 | ||||
|   //   this.router.navigate(['../editdata/'+id],{relativeTo:this.route});
 | ||||
|   // }
 | ||||
|   goToEdit(id:number) | ||||
|   { | ||||
|      this.router.navigate(['../dashrunner/'+id],{relativeTo:this.route}); | ||||
|      // 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){ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user