{
    "keyColumn": "id",
    "wildsearch": "true",
    "detailHeaderColumnPrefix": "Leaves: ",
    "handleFile": "true",
    "detailHeaderColumns": [
        "title"
    ],
    "breadCrumbColumn": "title",
    "orderBy": {
        "id": "DESC"
    },
    "includeJsFiles": [
        "leave_type.js"
    ],
    "listColumns": [
        "title",
        "count",
        "type",
        "date_range",
        "groups",
        "short_code",
        "active"
    ],
    "showColumns": [
        "id",
        "title",
        "count",
        "type",
        "date_range",
        "groups",
        "short_code",
        "active"
    ],
    "detailColumns": [
        "id",
        "title",
        "count",
        "type",
        "date_range",
        "groups",
        "short_code",
        "active"
    ],
    "columns": {
        "id": {
            "name": "ID",
            "editoptions": {
                "type": "hidden"
            }
        },
        "title": {
            "name": "Title",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Title",
                "class": "textbox",
                "hint": "News Title",
                "validations": [
                    "required"
                ]
            }
        },
        "type": {
            "name": "Type",
            "editoptions": {
                "type": "select",
                "source": {
                    "U": "User",
                    "H": "HR"
                },
                "default": "Select",
                "source_type": "array",
                "label": "Type",
                "class": "select",
                "enumvalues": {
                    "U": "User",
                    "H": "HR"
                },
                "validations": [
                    "required"
                ]
            }
        },
        "count": {
            "name": "Days",
            "editoptions": {
                "type": "textbox",
                "label": "Days",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
        "date_range": {
            "name": "DateRange",
            "sortable": "true",
            "editoptions": {
                "type": "checkbox",
                "label": "Allowdaterange",
                "class": "inline",
                "default": "0",
                "enumvalues": {
                    "0": "No",
                    "1": "Yes"
                }
            }
        },
        "groups": {
            "searchable": "true",
            "sortable": "true",
            "name": "Groups",
            "editoptions": {
                "type": "select",
                "source": "Cmshelper::getDepartmentCombo",
                "default": "",
                "source_type": "function",
                "label": "AllowableGroups",
                "class": "select"
            }
        },
        "short_code": {
            "name": "Short Code",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Short Code",
                "class": "textbox",
                "hint": "Short Code",
                "validations": [
                    "required"
                ]
            }
        },
        "active": {
            "name": "Status",
            "searchable": "true",
            "sortable": "true",
            "listoptions": {
                "type": "button",
                "customaction": "Cmshelper::changeLeavesStatus",
                "enumvalues": {
                    "Y": "Active",
                    "N": "Inactive"
                },
                "buttonColors": {
                    "Y": "green",
                    "N": "red"
                }
            },
            "editoptions": {
                "type": "select",
                "source": {
                    "Y": "Active",
                    "N": "Inactive"
                },
                "default": "Y",
                "source_type": "array",
                "label": "Status",
                "class": "select",
                "enumvalues": {
                    "Y": "Active",
                    "N": "Inactive"
                },
                "validations": [
                    "required"
                ]
            }
        }
    },
    "customActions": {
        "beforeAddRecord": "Cmshelper::beforeAddLeaveType",
        "beforeEditRecord": "Cmshelper::beforeEditLeaveType"
    },
    "opertations": [
        "add",
        "view",
        "edit",
        "delete"
    ],
    "operationLabel": {
        "addLabel": "AddLeaves",
        "editTitle": "EditLeaves",
        "viewTitle": "ViewLeaveDetails",
        "deleteTitle": "DeleteLeaves"
    }
}