import {Component, OnInit, ChangeDetectionStrategy, OnChanges, Input, Output, EventEmitter} from '@angular/core';
import {BaseList} from '../../../../../core/base/base-list';

@Component({
  selector: 'app-manage-exam-officer-list',
  templateUrl: './manage-exam-officer-list.component.html',
  styleUrls: ['./manage-exam-officer-list.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class ManageExamOfficerListComponent extends BaseList implements OnInit, OnChanges {
  @Input() subjectList: any = [];
  @Output() edit = new EventEmitter();
  @Output() expand = new EventEmitter();
  @Output() delete = new EventEmitter();
  column = [
    '1',
    'testing_information_code',
    'testing_information_name',
    'academic_semester_code',
    'academic_year_code',
    '8',
    '9',
    'created_by',
    '10',
    'created_datetime',
    '7'
  ];
  constructor() {
    super();
  }

  ngOnInit(): void {
  }

  ngOnChanges(){
    console.log(this.subjectList);
    this.subjectList = this.updateMatTable(this.subjectList ? this.subjectList : []);
  }

  onEdit(id){
    console.log()
    this.edit.emit(id);
  }

  onDelete(id){
    this.delete.emit(id);
  }

}
