{
	"keyColumn": "id",
	"wildsearch": "true",
	"dataSource": "external",
	"dataSourceFunction": "Cmshelper::off_details",
	"dataSourceCountFunction": "Cmshelper::off_details_count",
	"detailHeaderColumnPrefix": "Off: ",
	"handleFile": "true",

	"detailHeaderColumns": [
		"from_date"
	],
	"breadCrumbColumn": "from_date",


	"orderBy": {
		"id": "DESC"
	},


	"listColumns": [
		"off_type",
		"from_date",
		"to_date",
		"approved",
		"applied_date"
	],
	"showColumns": [
		"id",
		"off_type",
		"from_date",
		"to_date",
		"approved",
		"applied_date",
		"employee_id"

	],
	"detailColumns": [
		"id",
		"off_type",
		"from_date",
		"to_date",
		"approved",
		"applied_date",
		"employee_id"
	],
	"columns": {
		"id": {
			"name": "ID",
			"editoptions": {
				"type": "hidden"
			}
		},

		"off_type": {
			"name": "Off Type",
			"searchable": "true",
			"sortable": "true",
			"editoptions": {
				"type": "select",
				"source": "Cmshelper::getOffTypes",
				"default": "",
				"source_type": "function",
				"label": "Off Type",
				"class": "select",
				"validations": ["required"]
			}
		},
		"from_date": {
			"name": "Date",
			"searchable": "true",
			"sortable": "true",
			"dbFormat": "date",
			"displayFormat": "d/m/Y",
			"editoptions": {
				"dbFormat": "date",
				"displayFormat": "d/m/Y",
				"type": "datepicker",
				"label": "Date",
				"class": "",
				"validations": ["required"]
			}
		},
		"to_date": {
			"name": "To Date",
			"searchable": "true",
			"sortable": "true",
			"dbFormat": "date",
			"displayFormat": "d/m/Y",
			"editoptions": {
				"type": "hidden"
			}
		},
		"employee_id": {
			"name": "Employee_id",
			"editoptions": {
				"type": "hidden"
			}
		},
		"approved": {
			"name": "Approved",
			"sortable": "true",
			"editoptions": {
				"type": "hidden"

			}
		},
		"applied_date": {
			"name": "Applied Date",
			"searchable": "true",
			"sortable": "true",
			"dbFormat": "date",
			"displayFormat": "d/m/Y",
			"editoptions": {
				"type": "hidden"
			}
		}
	},
	"opertations": [
		"add"

	],
	"customActions": {
		"beforeAddRecord": "Cmshelper::beforeAddOffData",
		"afterAddRecord": "Cmshelper::tmsOff"
	},

	"operationLabel": {
		"addLabel": "Apply Off"
	}
}