import { Component , OnInit } from '@angular/core' ; import { CmdbType } from '../../models/cmdb-type' ; import { ActivatedRoute } from '@angular/router' ; import { CmdbMode } from '../../modes.enum' ; import { TypeService } from '../../services/type.service' ; import { Right } from '../../../management/models/right' ; @ Component ( { selector : 'cmdb-type-edit' , templateUrl : './type-edit.component.html' , styleUrls : [ './type-edit.component.scss' ] } ) export class TypeEditComponent { /**
     * Type instance.
     */ public typeInstance : CmdbType ; /**
     * Render mode.
     */ public mode : number = CmdbMode . Edit ; /**
     * Start wizard index.
     */ public stepIndex : number = 1 ; constructor ( private typeService , private route ) { this . route . queryParams . subscribe ( params => { this . stepIndex = params . stepIndex || 0 ; } ) ; this . typeInstance = this . route . snapshot . data . type as CmdbType ; } }