import { Component , Input , OnInit } from '@angular/core' ; import { CmdbMode } from '../../framework/modes.enum' ; import { CmdbType } from '../../framework/models/cmdb-type' ; import { TypeService } from '../../framework/services/type.service' ; import { ActivatedRoute } from '@angular/router' ; import { ExportdJob } from '../../settings/models/exportd-job' ; import { ExportdJobService } from '../exportd-job.service' ; @ Component ( { selector : 'cmdb-task-settings-edit' , templateUrl : './exportd-job-settings-edit.component.html' , styleUrls : [ './exportd-job-settings-edit.component.scss' ] } ) export class ExportdJobSettingsEditComponent implements OnInit { public taskID : number ; public typeInstance : CmdbType ; public taskInstance : ExportdJob ; public mode : number = CmdbMode . Edit ; constructor ( private typeService , private taskService , private route ) { this . route . params . subscribe ( ( id ) => this . taskID = id . publicID ) ; } public ngOnInit ( ) { this . taskService . getTask ( this . taskID ) . subscribe ( ( taskInstance ) => this . taskInstance = taskInstance ) ; } }