Added Link from active schedule to task detail-overview
This commit is contained in:
		
							parent
							
								
									8dffb6f9ad
								
							
						
					
					
						commit
						cd98423f6b
					
				| @ -6,7 +6,7 @@ | |||||||
| </mat-card> | </mat-card> | ||||||
| <mat-card *ngIf="activeSchedule != undefined"> | <mat-card *ngIf="activeSchedule != undefined"> | ||||||
|   <mat-card-header> |   <mat-card-header> | ||||||
|     <mat-card-title><a routerLink="/" class="link-no-deco">{{activeSchedule!.task.taskName}}</a></mat-card-title> |     <mat-card-title><a [routerLink]="['/taskgroups', taskgroupID, 'tasks', activeSchedule!.task.taskID]" class="link-no-deco">{{activeSchedule!.task.taskName}}</a></mat-card-title> | ||||||
|   </mat-card-header> |   </mat-card-header> | ||||||
|   <mat-card-content> |   <mat-card-content> | ||||||
|     <span *ngFor="let taskgroupPath of activeSchedule!.taskgroupPath">{{taskgroupPath.taskgroupName}} /</span> |     <span *ngFor="let taskgroupPath of activeSchedule!.taskgroupPath">{{taskgroupPath.taskgroupName}} /</span> | ||||||
|  | |||||||
| @ -1,5 +1,11 @@ | |||||||
| import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; | import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; | ||||||
| import {ScheduleInfo, ScheduleService, TaskOverviewInfo, TaskScheduleStopResponse} from "../../../api"; | import { | ||||||
|  |   ScheduleInfo, | ||||||
|  |   ScheduleService, | ||||||
|  |   TaskgroupEntityInfo, | ||||||
|  |   TaskOverviewInfo, | ||||||
|  |   TaskScheduleStopResponse | ||||||
|  | } from "../../../api"; | ||||||
| import {StopActiveScheduleInfo} from "./StopActiveScheduleInfo"; | import {StopActiveScheduleInfo} from "./StopActiveScheduleInfo"; | ||||||
| import {TaskOverviewComponent} from "../task-overview/task-overview.component"; | import {TaskOverviewComponent} from "../task-overview/task-overview.component"; | ||||||
| import {MatDialog} from "@angular/material/dialog"; | import {MatDialog} from "@angular/material/dialog"; | ||||||
| @ -19,6 +25,7 @@ export interface StopActiveScheduleEmitterInfo { | |||||||
| }) | }) | ||||||
| export class ActiveScheduleComponent implements OnInit{ | export class ActiveScheduleComponent implements OnInit{ | ||||||
|   activeSchedule: ScheduleInfo | undefined |   activeSchedule: ScheduleInfo | undefined | ||||||
|  |   taskgroupID: number | undefined | ||||||
| 
 | 
 | ||||||
|   startTime: number = 0; |   startTime: number = 0; | ||||||
|   currentTime: number = 0; |   currentTime: number = 0; | ||||||
| @ -56,11 +63,15 @@ export class ActiveScheduleComponent implements OnInit{ | |||||||
|       next: resp => { |       next: resp => { | ||||||
|         if(resp.scheduleID >= 0) { |         if(resp.scheduleID >= 0) { | ||||||
|           this.activateSchedule(resp); |           this.activateSchedule(resp); | ||||||
|  |           this.taskgroupID = resp.taskgroupPath[resp.taskgroupPath.length-1].taskgroupID | ||||||
|  |           console.log(this.taskgroupID) | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|       }, |       }, | ||||||
| 
 | 
 | ||||||
|     }) |     }) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   stopTask(finish: boolean) { |   stopTask(finish: boolean) { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user