feat: add edit scheduler job component (#678)

Fixes: #677
This commit is contained in:
Benura Abeywardena
2020-05-13 08:51:29 +05:30
committed by GitHub
parent 17cab17d0b
commit edcbc5b380
8 changed files with 207 additions and 9 deletions
@@ -0,0 +1,31 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable} from 'rxjs';
/** Custom Services */
import { SystemService } from '../system.service';
/**
* Edit Scheduler Job data resolver.
*/
@Injectable()
export class ManageSchedulerJobResolver implements Resolve<Object> {
/**
* @param {SystemService} systemService System service.
*/
constructor(private systemService: SystemService) {}
/**
* Returns the edit scheduler jobs data.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const jobId = route.paramMap.get('id');
return this.systemService.getSelectedJob(jobId);
}
}