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-std-material-review-discipline',
  templateUrl: './std-material-review-discipline.component.html',
  styleUrls: ['./std-material-review-discipline.component.scss']
})
export class StdMaterialReviewDisciplineComponent  extends FrameDetailComponent implements OnInit {

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

  ngOnInit(): void {
  }

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


}
