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

@Component({
    selector: 'teacher-finance-list',
    templateUrl: './teacher-finance-list.component.html',
    styleUrls: ['./teacher-finance-list.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class TeacherFinanceListComponent extends BaseList implements OnInit,OnChanges {
    @Input() teacherList: any = [];
    @Output() edit = new EventEmitter()
    @Output() delete = new EventEmitter()
    column = ['1','2','3','4','5','7']
    constructor() {
        super()
     }

    ngOnInit(): void {
    }

    ngOnChanges(){
        this.teacherList = this.updateMatTable(this.teacherList? this.teacherList: [])
    }

    onEdit(id){
        this.edit.emit(id)
    }

    onDelete(uid){
        this.delete.emit(uid)
    }

}
