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

@Component({
  selector: 'app-face-check-zhongx-discipline',
  templateUrl: './face-check-zhongx-discipline.component.html',
  styleUrls: ['./face-check-zhongx-discipline.component.scss']
})
export class FaceCheckZhongxDisciplineComponent  extends FrameDetailComponent  implements OnInit {

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

  ngOnInit(): void {
  }

  saveDispline() {
    if(this.ResponseEntity) {
      this.ResponseEntity.discipline_remark = this.currentEntity.discipline_remark;
    }
    AjaxService.request('zhongx/std/face/check/displine/save.htm', this.ResponseEntity, () => {
      MsgService.successToastr('保存成功！');
      this.closeWindow();
    });
  }

}
