{
    "keyColumn": "milestone_id",
    "wildsearch": "true",
    "detailHeaderColumnPrefix": "Team: ",
    "handleFile": "true",
    "detailHeaderColumns": [ 
        "project_id"
    ],
    "breadCrumbColumn": "project_id",
    "orderBy": {
        "milestone_id": "DESC"
    },
    "listColumns": [
        "project_id",
        "milestone_owner",
        "milestone_title",
        "milestone_description",
        "milestone_estimated_completion_date",
        "is_dependent",
        "milestone_status"
    ],
    "showColumns": [
        "milestone_id",
        "project_id",
        "milestone_owner",
        "milestone_title",
        "milestone_description",
        "milestone_estimated_completion_date",
        "is_dependent",
        "milestone_status"
    ],
    "detailColumns": [
        "milestone_id",
        "project_id",
        "milestone_owner",
        "milestone_title",
        "milestone_description",
        "milestone_estimated_completion_date",
        "is_dependent",
        "milestone_status"
    ],
    "columns": {
        "milestone_id": {
            "name": "ID",
            "editoptions": {
                "type": "hidden"
            }
        },
        "project_id": {
            "name": "Project",
            "searchable": "true",
            "sortable": "true",
            "external": "true",
            "externalOptions": {
                "externalTable": "tbl_projects",
                "externalColumn": "project_id",
                "externalShowColumn": "project_title"
            }
        },
        "milestone_owner": {
            "name": "Team member",
            "searchable": "true",
            "sortable": "true",
            "external": "true",
            "externalOptions": {
                "externalTable": "tbl_employee",
                "externalColumn": "emp_main_id",
                "externalShowColumn": "first_name"
            },
            "editoptions": {
                "type": "select",
                "source": "Cmshelper::getProjectTeamUsernameCombo",
                "default": "",
                "source_type": "function",
                "label": "Team member",
                "class": "select",
                "validations": [
                    "required"
                ]
            }
        },
        "milestone_estimated_completion_date": {
            "name": "milestone estimated completion date",
            "searchable": "true",
            "sortable": "true",
            "dbFormat": "date",
            "displayFormat": "m/d/Y",
            "editoptions": {
                "dbFormat": "date",
                "displayFormat": "m/d/Y",
                "type": "datepicker",
                "label": "Milestone estimated completion date",
                "class": "",
                "hint": "milestone estimated completion date",
                "validations": [
                    "required"
                ]
            }
        },
        "milestone_status": {
            "name": "Milestone Status",
            "editoptions": {
                "type": "select",
                "source": {
                    "active": "active",
                    "inactive": "inactive",
                    "completed": "completed"
                },
                "source_type": "array",
                "label": "Milestone Status",
                "class": "select",
                "validations": [
                    "required"
                ]
            }
        },
        "milestone_title": {
            "name": "Milestone Title",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Milestone title",
                "class": "textbox",
                "hint": "project Title",
                "validations": [
                    "required"
                ]
            }
        },
        "milestone_description": {
            "name": "Description",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textarea",
                "label": "Milestone description",
                "class": "textbox",
                "hint": "project Title",
                "validations": [
                    "required"
                ]
            }
        },
        "is_dependent": {
            "name": "is Mandatory",
            "sortable": "true",
            "editoptions": {
                "type": "checkbox",
                "label": "Mandatory",
                "class": "inline",
                "default": "0",
                "enumvalues": {
                    "0": "No",
                    "1": "Yes"
                }
            }
        }
    },
    "reference" : { 
        "referenceTable" : "tbl_projects",
        "referenceColumn" : "project_id",
        "referenceTableForiegnKey" : "project_id"
    },
    "customActions": {
        "beforeAddRecord": "Cmshelper::validateEngine",
        "beforeEditRecord": "Cmshelper::validateEngine",
        "afterAddRecord": "Cmshelper::increaseMilestoneCount",
        "beforeDeleteRecord": "Cmshelper::decreaseMilestoneCount" 
    },
    "opertations": [
        "add",
        "view",
        "edit",
        "delete"
    ],
    "operationLabel": {
        "addLabel": "Add Milestone",
        "editTitle": "Edit Milestone",
        "viewTitle": "View Milestone Details",
        "deleteTitle": "Delete Milestone"
    }
}