
import { FormBuilder, Validators } from '@angular/forms';
import { CustomValidators } from 'ng2-validation';
import { BsModalService } from "ngx-bootstrap/modal";

import * as _ from 'lodash';
import { FlexTableComponent } from '../../../../shared/common/FlexTable.component';
import { OnInit, Component } from '@angular/core';

@Component({
    selector: 'au-cert-type',
    templateUrl: './au-cert-type.component.html',
    styleUrls: ['./au-cert-type.component.scss']
})
export class AuCertTypeComponent extends FlexTableComponent implements OnInit {

    public query = {
        "code": "",
        "name": "",
        "type": "",
    };

    //TODO
    QUERY_URL = "au/auCertType/page.htm";
    DELETE_URL = "au/auCertType/delete.htm";
    GET_URL = "au/auCertType/get.htm";
    ADD_URL = "au/auCertType/add.htm";
    EDIT_URL = "au/auCertType/edit.htm";

    constructor(
        public bsModalService: BsModalService,
        fb: FormBuilder
    ) {
        super();
        // CustomValidators.rangeLength([1, 6])
        this.formModel = fb.group({
            id: [null],
            'code': [null],
            'name': [null],
            'scale': [null],
            'type': [null],
            'attr2': [null],
            'attr1': [null],
            'status': [null],
            'is_score': [null],
            'is_edu': [null],
        });
    }

}


