import { Component , Input , OnInit , TemplateRef , ViewChild } from '@angular/core' ; import { Column } from '../../../../../layout/table/table.types' ; @ Component ( { selector : 'cmdb-object-bulk-change-failed' , templateUrl : './object-bulk-change-failed.component.html' , styleUrls : [ './object-bulk-change-failed.component.scss' ] } ) export class ObjectBulkChangeFailedComponent implements OnInit { @ Input ( ) failedChanges : any [ ] = [ ] ; @ ViewChild ( 'errorTemplate' , { static : true } ) errorTemplate : TemplateRef < any > ; @ ViewChild ( 'objectTemplate' , { static : true } ) objectTemplate : TemplateRef < any > ; public columns : Column [ ] = [ ] ; ngOnInit ( ) { this . columns = [ { display : 'Object' , name : 'public_id' , data : 'public_id' , } , { display : 'Error Message' , name : 'error_message' , data : 'error_message' , template : this . errorTemplate } , { display : 'Object' , name : 'object' , data : 'obj' , template : this . objectTemplate } , { display : 'Response state' , name : 'status' , data : 'status' , } ] as Array < Column > ; } }