{
    "keyColumn": "id",
    "wildsearch": "true",
    "detailHeaderColumnPrefix": "Employees: ",
    "handleFile": "true",
    "detailHeaderColumns": [
        "emp_code"
    ],
    "report": {
        "reportTitle": "Employees",
        "columns": [
            "emp_main_id",
            "emp_code",
            "first_name",
            "last_name",
            "department_id",
            "designation_id"
        ],
        "dateColumn": "added_date"
    },
    "breadCrumbColumn": "emp_code",
    "orderBy": {
        "id": "DESC"
    },
    "listColumns": [
        "emp_code",
        "first_name",
        "last_name",
        "department_id",
        "active"
    ],
    "showColumns": [
        "id",
        "emp_main_id",
        "emp_code",
        "first_name",
        "last_name",
        "department_id",
        "designation_id",
        "reporting_id",
        "shift_id",
        "gender",
        "dob",
        "religion",
        "blood_group",
        "marital_status",
        "family_details",
        "fathers_name",
        "paddress",
        "caddress",
        "phone",
        "mobile",
        "location",
        "official_mail",
        "yahoo_mail",
        "personal_mail",
        "technical_skills",
        "bank_name",
        "account_no",
        "pan_no",
        "pf_no",
        "initial_salary",
        "joining_date",
        "appriasal_date",
        "added_date",
        "active"
    ],
    "detailColumns": [
        "id",
        "emp_main_id",
        "emp_code",
        "first_name",
        "last_name",
        "department_id",
        "designation_id",
        "reporting_id",
        "shift_id",
        "gender",
        "dob",
        "religion",
        "blood_group",
        "marital_status",
        "family_details",
        "fathers_name",
        "paddress",
        "caddress",
        "phone",
        "mobile",
        "location",
        "official_mail",
        "yahoo_mail",
        "personal_mail",
        "technical_skills",
        "bank_name",
        "account_no",
        "pan_no",
        "pf_no",
        "initial_salary",
        "joining_date",
        "appriasal_date",
        "added_date",
        "active"
    ],
    "columns": {
        "id": {
            "name": "ID",
            "editoptions": {
                "type": "hidden"
            }
        },
        "emp_main_id": {
            "name": "USERNAME",
            "external": "true",
            "externalOptions": {
                "externalTable": "cms_users",
                "externalColumn": "id",
                "externalShowColumn": "username"
            },
            "editoptions": {
                "type": "select",
                "source": "Cmshelper::getUsernameCombo",
                "default": "",
                "source_type": "function",
                "label": "User name",
                "class": "select",
                "validations": [
                    "required"
                ]
            }
        },
        "emp_code": {
            "name": "EMP CODE",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "EmployeeCode",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
        "department_id": {
            "name": "DEPARTMENT",
            "searchable": "true",
            "sortable": "true",
            "external": "true",
            "externalOptions": {
                "externalTable": "tbl_departments",
                "externalColumn": "id",
                "externalShowColumn": "dep_name"
            },
            "editoptions": {
                "type": "select",
                "source": "Cmshelper::getDepartmentCombo",
                "default": "",
                "source_type": "function",
                "label": "Department",
                "class": "select",
                "validations": [
                    "required"
                ]
            }
        },
        "designation_id": {
            "name": "DESIGNATION",
            "searchable": "true",
            "sortable": "true",
            "external": "true",
            "externalOptions": {
                "externalTable": "tbl_designations",
                "externalColumn": "id",
                "externalShowColumn": "desig_name"
            },
            "editoptions": {
                "type": "select",
                "source": "Cmshelper::getDesignationCombo",
                "default": "",
                "source_type": "function",
                "label": "Designation",
                "class": "select",
                "validations": [
                    "required"
                ]
            }
        },
        "reporting_id": {
            "name": "REPORTING PERSON",
            "searchable": "true",
            "sortable": "true",
            "external": "true",
            "externalOptions": {
                "externalTable": "cms_users",
                "externalColumn": "id",
                "externalShowColumn": "username"
            },
            "editoptions": {
                "type": "select",
                "source": "Cmshelper::getUsernameCombo",
                "default": "",
                "source_type": "function",
                "label": "Reporting Person",
                "class": "select",
                "validations": [
                    "required"
                ]
            }
        },
        "shift_id": {
            "name": "SHIFT TYPE",
            "external": "true",
            "externalOptions": {
                "externalTable": "tbl_shifts",
                "externalColumn": "id",
                "externalShowColumn": "title"
            },
            "editoptions": {
                "type": "select",
                "source": "Cmshelper::getShiftsCombo",
                "default": "",
                "source_type": "function",
                "label": "Shift Type",
                "class": "select",
                "validations": [
                    "required"
                ]
            }
        },
        "first_name": {
            "name": "FIRST NAME",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "First Name",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
        "last_name": {
            "name": "LAST NAME",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Last Name",
                "class": "textbox"
            }
        },
        "gender": {
            "name": "Gender",
            "editoptions": {
                "type": "radio",
                "label": "Gender",
                "class": "radio",
                "default": "no",
                "enumvalues": {
                    "M": "Male",
                    "F": "Female"
                },
                "options": {
                    "M": "Male",
                    "F": "Female"
                },
                "validations": [
                    "required"
                ]
            }
        },
        "dob": {
            "name": "DOB",
            "dbFormat": "date",
            "displayFormat": "Y/m/d",
            "editoptions": {
                "dbFormat": "date",
                "displayFormat": "Y/m/d",
                "type": "datepicker",
                "label": "DOB",
                "class": "",
                "validations": [
                    "required"
                ]
            }
        },
        "religion": {
            "name": "RELIGION",
            "editoptions": {
                "type": "textbox",
                "label": "Religion",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
        "blood_group": {
            "name": "Status",
            "editoptions": {
                "type": "select",
                "source": {
                    "O+ve": "O+ve",
                    "O-ve": "O-ve",
                    "A+ve": "A+ve",
                    "A-ve": "A-ve",
                    "B+ve": "B+ve",
                    "B-ve": "B-ve",
                    "AB+ve": "AB+ve",
                    "AB-ve": "AB-ve"
                },
                "default": "Select",
                "source_type": "array",
                "label": "Blood Group",
                "class": "select",
                "enumvalues": {
                    "O+ve": "O+ve",
                    "O-ve": "O-ve",
                    "A+ve": "A+ve",
                    "A-ve": "A-ve",
                    "B+ve": "B+ve",
                    "B-ve": "B-ve",
                    "AB+ve": "AB+ve",
                    "AB-ve": "AB-ve"
                },
                "validations": [
                    "required"
                ]
            }
        },
        "marital_status": {
            "name": "Marital Status",
            "sortable": "true",
            "editoptions": {
                "type": "radio",
                "label": "Marital Status",
                "class": "inline",
                "default": "no",
                "enumvalues": {
                    "M": "Married",
                    "U": "Unmarried"
                },
                "options": {
                    "M": "Married",
                    "U": "Unmarried"
                },
                "validations": [
                    "required"
                ]
            }
        },
        "family_details": {
            "name": "FAMILY DETAILS",
            "editoptions": {
                "type": "textarea",
                "label": "Family Details",
                "class": "textarea",
                "validations": [
                    "required"
                ]
            }
        },
        "fathers_name": {
            "name": "FATHER'S NAME",
            "editoptions": {
                "type": "textbox",
                "label": "Father's Name",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
        "paddress": {
            "name": "PERMANENT ADDRESS",
            "editoptions": {
                "type": "textarea",
                "label": "Permanent Address",
                "class": "textarea",
                "validations": [
                    "required"
                ]
            }
        },
        "caddress": {
            "name": "CONTACT ADDRESS",
            "editoptions": {
                "type": "textarea",
                "label": "Contact Address",
                "class": "textarea"
            }
        },
        "phone": {
            "name": "PHONE",
            "editoptions": {
                "type": "textbox",
                "label": "Phone",
                "class": "textbox"
            }
        },
        "mobile": {
            "name": "MOBILE",
            "editoptions": {
                "type": "textbox",
                "label": "Mobile",
                "class": "textbox"
            }
        },
        "location": {
            "name": "LOCATION",
            "editoptions": {
                "type": "textbox",
                "label": "Location",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
        "official_mail": {
            "name": "OFFICIAL EMAIL",
            "editoptions": {
                "type": "textbox",
                "label": "Official Email",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
        "yahoo_mail": {
            "name": "YAHOO EMAIL",
            "editoptions": {
                "type": "textbox",
                "label": "Yahoo Email",
                "class": "textbox",
                "hint": "(For internal use)"
            }
        },
        "personal_mail": {
            "name": "PERSONAL EMAIL",
            "editoptions": {
                "type": "textbox",
                "label": "Personal Email",
                "class": "textbox"
            }
        },
        "technical_skills": {
            "name": "TECHNICAL SKILLS",
            "editoptions": {
                "type": "textarea",
                "label": "Technical Skills",
                "class": "textarea",
                "validations": [
                    "required"
                ]
            }
        },
        "joining_date": {
            "name": "JOINEDDATE",
            "dbFormat": "date",
            "displayFormat": "Y/m/d",
            "editoptions": {
                "dbFormat": "date",
                "displayFormat": "Y/m/d",
                "type": "datepicker",
                "label": "JoinedDate",
                "class": "",
                "validations": [
                    "required"
                ]
            }
        },
        "bank_name": {
            "name": "BANK NAME",
            "editoptions": {
                "type": "textbox",
                "label": "Bank Name",
                "class": "textbox"
            }
        },
        "account_no": {
            "name": "ACCOUNT NO",
            "editoptions": {
                "type": "textbox",
                "label": "Account No",
                "class": "textbox"
            }
        },
        "pan_no": {
            "name": "PAN NO",
            "editoptions": {
                "type": "textbox",
                "label": "PAN Card No",
                "class": "textbox"
            }
        },
        "pf_no": {
            "name": "PF NO",
            "editoptions": {
                "type": "textbox",
                "label": "PF No",
                "class": "textbox"
            }
        },
        "initial_salary": {
            "name": "INITIAL SALARY",
            "editoptions": {
                "type": "textbox",
                "label": "Initial Salary",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
        "appriasal_date": {
            "name": "LAST APPRIASAL DATE",
            "dbFormat": "date",
            "displayFormat": "Y/m/d",
            "editoptions": {
                "dbFormat": "date",
                "displayFormat": "Y/m/d",
                "type": "datepicker",
                "label": "Last Salary Appriasal Date"
            }
        },
        "added_date": {
            "name": "ADDEDDATE",
            "dbFormat": "date",
            "displayFormat": "Y-m-d"
        },
        "active": {
            "name": "STATUS",
            "searchable": "true",
            "sortable": "true",
            "listoptions": {
                "type": "button",
                "customaction": "Cmshelper::changeEmployeeStatus",
                "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::changeEmployeeAddedDateFormat"
    },
    "opertations": [
        "add",
        "view",
        "edit",
        "delete"
    ],
    "operationLabel": {
        "addLabel": "AddEmployee",
        "editTitle": "EditEmployee",
        "viewTitle": "ViewEmployeeDetails",
        "deleteTitle": "DeleteEmployee"
    }
}