{ "keyColumn": "id", "wildsearch": "true", "dataSource": "external", "dataSourceFunction": "Cmshelper::fetchLeaveRequests", "dataSourceCountFunction": "Cmshelper::fetchLeaveRequestsCount", "detailHeaderColumnPrefix": "Leave Requests: ", "handleFile": "true", "detailHeaderColumns": [ "title" ], "breadCrumbColumn": "title", "orderBy": { "id": "DESC" }, "includeJsFiles": [ "leave_hr.js" ], "reference": { "referenceTable": "tbl_employee", "referenceColumn": "emp_id", "referenceTableForiegnKey": "emp_main_id" }, "listColumns": [ "profile_pic", "username", "leave_type", "half_day", "applied_date", "from_date_disp", "to_date_disp", "sup_status" ], "showColumns": [ "id", "emp_id", "leave_type", "half_day", "from_date", "to_date", "description", "comments", "sup_status", "applied_date" ], "detailColumns": [ "id", "username", "emp_id", "leave_type", "half_day", "applied_date", "from_date", "from_date_disp", "to_date", "to_date_disp", "description", "comments", "sup_status", "remarks", "profile_pic" ], "columns": { "id": { "name": "ID", "editoptions": { "type": "hidden" } }, "profile_pic": { "name": "", "customColumn": "true", "customaction": "Cmshelper::getProfilePicLeave" }, "emp_id": { "name": "Name", "searchable": "true", "sortable": "true", "editoptions": { "type": "hidden" } }, "leave_type": { "name": "Leave Type", "searchable": "true", "sortable": "true", "editoptions": { "type": "select", "source": "Cmshelper::getLeaveTypes", "default": "", "source_type": "function", "label": "Leave Type", "class": "select", "validations": [ "required" ] } }, "half_day": { "name": "Half Day", "sortable": "true", "editoptions": { "type": "checkbox", "label": "Half Day", "class": "inline", "default": "0", "enumvalues": { "0": "No", "1": "Yes" } } }, "from_date": { "name": "Date", "searchable": "true", "sortable": "true", "dbFormat": "date", "displayFormat": "M d, Y", "editoptions": { "dbFormat": "date", "displayFormat": "M d, Y", "type": "datepicker", "label": "From Date", "class": "", "validations": [ "required" ] } }, "to_date": { "name": "To Date", "searchable": "true", "sortable": "true", "dbFormat": "date", "displayFormat": "M d, Y", "editoptions": { "dbFormat": "date", "displayFormat": "M d, Y", "type": "datepicker", "label": "To Date", "class": "", "validations": [ "required" ] } }, "from_date_disp": { "name": "From Date", "customColumn": "true", "customaction": "Cmshelper::getAttendanceFromdate" }, "to_date_disp": { "name": "To Date", "customColumn": "true", "customaction": "Cmshelper::getAttendanceTodate" }, "description": { "name": "Description", "editoptions": { "type": "textarea", "label": "Description", "class": "textarea", "validations": [ "required" ] } }, "comments": { "name": "Comments", "editoptions": { "type": "textarea", "label": "Comments", "class": "textarea", "validations": [ "required" ] } }, "sup_status": { "name": "Status", "searchable": "true","sortable": "true", "popupoptions": { "type": "popup", "customaction": "Cmshelper::getSupstatusPopupUrl" } }, "remarks": { "name": "Remarks" }, "hr_status": { "name": "HR Status", "sortable": "true" }, "username": { "sortable": "true", "name": "Employee name" }, "applied_date": { "searchable": "true", "sortable": "true", "name": "Applied date", "dbFormat": "date", "displayFormat": "M d, Y" } }, "customActions": { "beforeAddRecord": "Cmshelper: : setEmployeeId" }, "opertations": [ "view" ], "operationLabel": { "viewTitle": "ViewLeaveDetails" } }