import { Component, OnInit } from '@angular/core';
import { BsModalService } from 'ngx-bootstrap/modal';
import { FramePageComponent } from '../../../../frame/core/page/frame.page';
import { ConfRangeScorePageDetailComponent } from '../conf-range-score-page-detail/conf-range-score-page-detail.component';
import { ConfRangeScoreSubjectComponent } from '../conf-range-score-subject/conf-range-score-subject.component';

@Component({
  selector: 'app-conf-range-score-page',
  templateUrl: './conf-range-score-page.component.html',
  styleUrls: ['./conf-range-score-page.component.scss']
})
export class ConfRangeScorePageComponent extends FramePageComponent implements OnInit {

  schoolArray = [];
  param = {
    school_id : ''
  }

  constructor(private modalService: BsModalService) { 
    super(modalService);
    this.modalComponent = ConfRangeScorePageDetailComponent;
  }

  ngOnInit(): void {
    this.AjaxService.requestArray('./cf/school/list.htm', {}, (array) => {
      this.schoolArray = array;
    });
  }

  requestParam() {
    this.pager.reload({school_id: this.param.school_id });
  }

  showRangeSubject(v) {
    this.showComponentModal(ConfRangeScoreSubjectComponent, {ResponseEntity: v});
  }

}
