{
	"keyColumn": "id",
	"wildsearch": "true",
	"detailHeaderColumnPrefix": "Employees: ",
	"handleFile": "true",
	"detailHeaderColumns": [
		"emp_code"
	],
	"breadCrumbColumn": "emp_code",
	"orderBy": {
		"id": "DESC"
	},
	"includeJsFiles": [
		"add_employee.js"
	],
	"where": " cms_users.visibility='1' ",
	"combineTables": {
		"tbl_employee": {
			"combineColumns": [
				"emp_code",
				"first_name",
				"last_name",
				"department_id",
				"designation_id",
				"profile_pic",
				"reporting_id",
				"team_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",
				"billing_rate",
				"joining_date",
				"appriasal_date",
				"added_date",
				"relieving_date",
				"emergency_contact_name",
				"emergency_contact_phone",
				"active",
				"exclude_status"
			],
			"combineReferenceColumn": "emp_main_id",
			"combineTableForiegnKey": "id",
			"isPrimaryKey": "true"
		}
	},
	"listColumns": [
		"role_id",
		"status"
	],
	"showColumns": [
		"id",
		"role_id",
		"username",
		"password",
		"emp_code",
		"first_name",
		"last_name",
		"department_id",
		"designation_id",
		"reporting_id",
		"team_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",
		"billing_rate",
		"joining_date",
		"appriasal_date",
		"added_date",
		"relieving_date",
		"emergency_contact_name",
		"emergency_contact_phone",
		"active",
		"profile_pic",
		"exclude_status"
	],
	"detailColumns": [
		"id",
		"role_id",
		"username",
		"password",
		"emp_code",
		"department_id",
		"designation_id",
		"reporting_id",
		"team_id",
		"first_name",
		"last_name",
		"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",
		"billing_rate",
		"joining_date",
		"appriasal_date",
		"added_date",
		"relieving_date",
		"emergency_contact_name",
		"emergency_contact_phone",
		"active",
		"status",
		"profile_pic",
		"exclude_status"
	],
	"columns": {
		"id": {
			"name": "ID",
			"editoptions": {
				"type": "hidden"
			}
		},
		"username": {
			"name": "UserNAME",
			"editoptions": {
				"type": "hidden"
			}
		},
		"password": {
			"name": "PASSWORD",
			"editoptions": {
				"type": "hidden"
			}
		},
		"role_id": {
			"name": "ROLE",
			"searchable": "true",
			"sortable": "true",
			"external": "true",
			"externalOptions": {
				"externalTable": "cms_roles",
				"externalColumn": "role_id",
				"externalShowColumn": "role_name"
			},
			"editoptions": {
				"type": "select",
				"source": "Cmshelper::getRolesCombo",
				"source_type": "function",
				"label": "Role",
				"class": "select",
				"validations": [
					"required"
				]
			}
		},
		"emp_main_id": {
			"name": "EMP ID",
			"editoptions": {
				"type": "hidden"
			}
		},
		"emp_code": {
			"name": "EMP CODE",
			"searchable": "true",
			"sortable": "true",
			"editoptions": {
				"onEdit": "disable",
				"type": "textbox",
				"label": "EmployeeCode",
				"class": "textbox",
				"validations": [
					"required"
				]
			}
		},
		"department_id": {
			"name": "DEPARTMENT",
			"sortable": "true",
			"customColumn": "true",
			"customaction": "Cmshelper::getDepName",
			"editoptions": {
				"type": "select",
				"source": "Cmshelper::getDepartmentCombo",
				"source_type": "function",
				"label": "Department",
				"class": "select",
				"validations": [
					"required"
				]
			}
		},
		"designation_id": {
			"name": "DESIGNATION",
			"sortable": "true",
			"customColumn": "true",
			"customaction": "Cmshelper::getDesigName",
			"editoptions": {
				"type": "select",
				"source": "Cmshelper::getDesignationCombo",
				"source_type": "function",
				"label": "Designation",
				"class": "select",
				"validations": [
					"required"
				]
			}
		},
		"reporting_id": {
			"name": "REPORTING PERSON",
			"sortable": "true",
			"customColumn": "true",
			"customaction": "Cmshelper::getReportName",
			"editoptions": {
				"type": "select",
				"source": "Cmshelper::getUsernameCombo",
				"default": "",
				"source_type": "function",
				"label": "Reporting Person",
				"class": "select",
				"validations": [
					"required"
				]
			}
		},
		"team_id": {
			"name": "TEAM",
			"sortable": "true",
			"customColumn": "true",
			"customaction": "Cmshelper::getTeamName",
			"editoptions": {
				"type": "select",
				"source": "Cmshelper::getTeamsCombo",
				"default": "",
				"source_type": "function",
				"label": "Team",
				"class": "select"
			}
		},
		"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"
				}
			}
		},
		"dob": {
			"name": "DOB",
			"dbFormat": "date",
			"displayFormat": "m/d/Y",
			"editoptions": {
				"dbFormat": "date",
				"displayFormat": "m/d/Y",
				"type": "datepicker",
				"label": "DOB",
				"class": ""
			}
		},
		"religion": {
			"name": "RELIGION",
			"editoptions": {
				"type": "textbox",
				"label": "Religion",
				"class": "textbox"
			}
		},
		"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"
				}
			}
		},
		"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"
				}
			}
		},
		"family_details": {
			"name": "FAMILY DETAILS",
			"editoptions": {
				"type": "textarea",
				"label": "Family Details",
				"class": "textarea"
			}
		},
		"fathers_name": {
			"name": "FATHER'S NAME",
			"editoptions": {
				"type": "textbox",
				"label": "Father's Name",
				"class": "textbox"
			}
		},
		"paddress": {
			"name": "PERMANENT ADDRESS",
			"editoptions": {
				"type": "textarea",
				"label": "Permanent Address",
				"class": "textarea"
			}
		},
		"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"
			}
		},
		"official_mail": {
			"name": "OFFICIAL EMAIL",
			"editoptions": {
				"type": "textbox",
				"label": "Official Email",
				"class": "textbox"
			}
		},
		"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"
			}
		},
		"joining_date": {
			"name": "JOINEDDATE",
			"dbFormat": "date",
			"displayFormat": "m/d/Y",
			"editoptions": {
				"dbFormat": "date",
				"displayFormat": "m/d/Y",
				"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"
			}
		},
		"billing_rate": {
			"name": "BILLING RATE",
			"editoptions": {
				"type": "textbox",
				"label": "Billing Rate(per hour)",
				"class": "textbox"
			}
		},
		"appriasal_date": {
			"name": "LAST APPRIASAL DATE",
			"dbFormat": "date",
			"displayFormat": "m/d/Y",
			"editoptions": {
				"dbFormat": "date",
				"displayFormat": "m/d/Y",
				"type": "datepicker",
				"label": "Last Salary Appriasal Date"
			}
		},
		"added_date": {
			"name": "ADDEDDATE",
			"dbFormat": "date",
			"displayFormat": "m/d/Y"
		},
		"relieving_date": {
			"name": "RELIEVING DATE",
			"dbFormat": "date",
			"displayFormat": "m/d/Y",
			"editoptions": {
				"dbFormat": "date",
				"displayFormat": "m/d/Y",
				"type": "datepicker",
				"label": "Relieving Date"
			}
		},
		"emergency_contact_name": {
			"name": "EMERGENCY CONTACT NAME",
			"editoptions": {
				"type": "textbox",
				"label": "Emergency Name",
				"class": "textbox"
			}
		},
		"emergency_contact_phone": {
			"name": "EMERGENCY CONTACT PHONE",
			"editoptions": {
				"type": "textbox",
				"label": "Emergency Phone",
				"class": "textbox"
			}
		},
		"status": {
			"name": "STATUS",
			"listoptions": {
				"type": "button",
				"customaction": "Cmshelper::changeEmployeeActiveStatus",
				"enumvalues": {
					"active": "Active",
					"deleted": "Inactive"
				},
				"buttonColors": {
					"active": "green",
					"deleted": "red"
				}
			},
			"editoptions": {
				"type": "select",
				"source": {
					"active": "Active",
					"deleted": "Inactive"
				},
				"default": "active",
				"source_type": "array",
				"label": "Status",
				"class": "select",
				"enumvalues": {
					"active": "Active",
					"deleted": "Inactive"
				},
				"validations": [
					"required"
				]
			}
		},
		"active": {
			"name": "Active",
			"editoptions": {
				"type": "hidden"
			}
		},
		"profile_pic": {
			"name": "PHOTO",
			"customColumn": "true",
			"customaction": "Cmshelper::getProfilePic",
			"editoptions": {
				"type": "file",
				"label": "PHOTO",
				"class": "file",
				"hint": "Upload file for this section"
			}
		},
		"exclude_status": {
			"name": "Exclude Status",
			"editoptions": {
				"type": "checkbox",
				"label": "Exclude Status",
				"class": "inline",
				"default": "0",
				"enumvalues": {
					"0": "No",
					"1": "Yes"
				}
			}
		}
	},
	"customActions": {
		"beforeAddRecord": "Cmshelper::checkEmpAddCondtn",
		"afterAddRecord": "Cmshelper::setLastEmpAdd",
		"afterDeleteRecord": "Cmshelper::afterDeleteEmployee",
		"beforeEditRecord": "Cmshelper::checkEmpEditCondtn"
	},
	"opertations": [
		"add",
		"view",
		"edit",
		"delete"
	],
	"operationLabel": {
		"addLabel": "AddEmployee",
		"editTitle": "EditEmployee",
		"viewTitle": "ViewEmployeeDetails",
		"deleteTitle": "DeleteEmployee"
	}
}