import { Component, OnInit } from '@angular/core';
import { FlexTableComponent } from '../../../../../shared/common/FlexTable.component';
import { FrameRequest } from '../../../../../shared/frame/frame-request';

@Component({
  selector: 'app-enrol-layout-monitor',
  templateUrl: './enrol-layout-monitor.component.html',
  styleUrls: ['./enrol-layout-monitor.component.scss']
})
export class EnrolLayoutMonitorComponent extends FlexTableComponent  implements OnInit {

  public query = {
    query: "",
    year_code: 0
  };

  QUERY_URL = "std/stdEnrol/pagelayoutDetail.htm";
  YEAR_CODE_URL = "pl/plExamTime/list.htm";
  LATEST_TIME_URL = "pl/plExamTime/getCurrentYearCode.htm";

  constructor() { 
    super();
  }

  ngOnInit() {
    setTimeout(() =>{
      FrameRequest.requestEntity(this.LATEST_TIME_URL, { }, (entity) => {
        if (entity) {
          this.query.year_code = Number.parseInt(entity);
        }
      });
    },200);
  }

  

}
