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

@Component({
  selector: 'app-cf-fee-scale',
  templateUrl: './cf-fee-scale.component.html',
  styleUrls: ['./cf-fee-scale.component.scss']
})
export class CfFeeScaleComponent extends FlexTableComponent implements OnInit {

  public query = {
    query: ""
  };
  QUERY_URL = "cf/cfFeeScale/page.htm";
  ADD_URL = "cf/cfFeeScale/add.htm";
  DELETE_URL= "cf/cfFeeScale/delete.htm";
  GET_URL= "cf/cfFeeScale/get.htm";
  EDIT_URL= "cf/cfFeeScale/edit.htm";

  constructor(public bsModalService: BsModalService, fb: FormBuilder) {
    super();
    this.formModel = fb.group({
      id: [null],
      fee_item_code: ['', Validators.compose([Validators.required, Validators.maxLength(3), Validators.pattern("^[a-zA-Z0-9]+$")])],
      fee_item_name: ['', Validators.required],
      price: [null, Validators.required],
      remark: [null],
    });
  }

  ngOnInit() {
  }

}
