import { Component, OnInit } from '@angular/core';
import { FlexTableComponent } from '../../../../../shared/common/FlexTable.component';
import { BsModalService } from 'ngx-bootstrap/modal';
import { FormBuilder, Validators } from '@angular/forms';

@Component({
  selector: 'app-by-turn-time-config',
  templateUrl: './by-turn-time-config.component.html',
  styleUrls: ['./by-turn-time-config.component.scss']
})
export class ByTurnTimeConfigComponent extends FlexTableComponent implements OnInit {

  public query = {
    query: "" ,
    turn_type: ""
  };
  QUERY_URL = "by/byTurnTimeConfig/page.htm";
  ADD_URL = "by/byTurnTimeConfig/add.htm";
  DELETE_URL = "by/byTurnTimeConfig/delete.htm";
  GET_URL = "by/byTurnTimeConfig/get.htm";
  EDIT_URL = "by/byTurnTimeConfig/edit.htm";
  YEAR_URL = "pl/plYearCode/listYear.htm";

  constructor(public bsModalService: BsModalService, fb: FormBuilder) {
    super();
    this.formModel = fb.group({
      id: [null],
      year: [null, Validators.required],
      time: [null, Validators.required],
      start_time: [null, Validators.required],
      end_time: [null, Validators.required],
      type: [null, Validators.required],
      status: [null, Validators.required]
    });
  }

  ngOnInit() {
  }

}
