{
    "keyColumn": "id",
    "wildsearch": "true",
    "detailHeaderColumnPrefix": "Departments: ",
    "handleFile": "true",
    "detailHeaderColumns": [
        "title"
    ],
    "breadCrumbColumn": "title",
    "orderBy": {
        "id": "DESC"
    },
    "listColumns": [
        "dep_name",
        "dep_code",
        "active"
    ],
    "showColumns": [
        "id",
        "dep_name",
        "dep_code",
        "active"
    ],
    "detailColumns": [
        "id",
        "dep_name",
        "dep_code",
        "active"
    ],
    "columns": {
        "id": {
            "name": "ID",
            "editoptions": {
                "type": "hidden"
            }
        },
        "dep_name": {
            "name": "Department",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Department",
                "class": "textbox",
                "hint": "Department Title",
                "validations": [
                    "required"
                ]
            }
        },
        "dep_code": {
            "name": "Dep Code",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Dep Code",
                "class": "textbox",
                "hint": "Department Code",
                "validations": [
                    "required"
                ]
            }
        },
        "active": {
            "name": "Status",
            "searchable": "true",
            "sortable": "true",
            "listoptions": {
                "type": "button",
                "customaction": "Cmshelper::changeDepartmentStatus",
                "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"
                ]
            }
        }
    },
    "opertations": [
        "add",
        "view",
        "edit",
        "delete"
    ],
    "operationLabel": {
        "addLabel": "Add Department",
        "editTitle": "Edit Department",
        "viewTitle": "View Department Details",
        "deleteTitle": "Delete Department"
    }
}