import { Component, OnInit } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { FrameDetailComponent } from '../../../../frame/core/detail/frame.detail';

@Component({
  selector: 'app-optr-school-page-detail',
  templateUrl: './optr-school-page-detail.component.html',
  styleUrls: ['./optr-school-page-detail.component.scss']
})
export class OptrSchoolPageDetailComponent  extends FrameDetailComponent implements OnInit {

  optrArr = [];

  constructor(bsModalRef: BsModalRef, fb: FormBuilder) {
    super(bsModalRef);
    this.detailForm = fb.group({
      'optr_id': [null, Validators.required],
      'school_id': [null, Validators.required],
    });
   }

  ngOnInit(): void {
    this.requestOptr();
  }

  requestOptr() {
    this.AjaxService.requestArray('cf/optr/school/opr/list.htm', {}, (array) => {
      this.optrArr = array;
    });
  }

}
