{
    "keyColumn": "log_id",
    "wildsearch": "true",
    "detailHeaderColumnPrefix": "Team: ",
    "handleFile": "true",
    "breadCrumbColumn": "log_comments",
    "orderBy": {
        "log_id": "DESC"
    },
    "listColumns": [
        "worked_hours",
        "worked_on",
        "log_comments"
    ],
    "showColumns": [
        "log_id",
        "task_id",
        "worked_hours",
        "worked_on",
        "log_comments"
    ],
    "detailColumns": [
        "log_id",
        "task_id",
        "worked_hours",
        "worked_on",
        "log_comments"
    ],
    "columns": {
        "log_id": {
            "name": "ID",
            "editoptions": {
                "type": "hidden"
            }
        },
        "task_id": {
            "name": "Percentage Completed",
            "sortable": "true",
            "external": "true",
            "externalOptions": {
                "externalTable": "tbl_project_tasks",
                "externalColumn": "task_id",
                "externalShowColumn": "task_completion_percentage"
            },
            "editoptions": {
                "type": "select",
                "source": "Cmshelper::getCompletionPercentage",
                "source_type": "function",
                "label": "Percentage completed",
                "class": "select",
                "validations": [
                    "required"
                ]
            }
        },
        "worked_hours": {
            "name": "Worked Hours",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Worked hours",
                "class": "textbox",
                "hint": "Worked hours",
                "validations": [
                    "required"
                ]
            }
        },
        "worked_on": {
            "name": "Log Date",
            "searchable": "true",
            "sortable": "true",
            "dbFormat": "date",
            "displayFormat": "m/d/Y",
            "editoptions": {
                "dbFormat": "date",
                "displayFormat": "m/d/Y",
                "type": "datepicker",
                "label": "worked date",
                "class": "",
                "hint": "",
                "validations": [
                    "required"
                ]
            }
        },
        "log_comments": {
            "name": "Log comment",
            "editoptions": {
                "type": "textarea",
                "label": "Log comment",
                "class": "textbox",
                "hint": "Log comment",
                "validations": [
                    "required"
                ]
            }
        }
    },
    "reference": {
        "referenceTable": "tbl_project_tasks",
        "referenceColumn": "task_id",
        "referenceTableForiegnKey": "task_id"
    },
    "customActions": {
        "beforeAddRecord": "Cmshelper::validateEngine",
        "afterAddRecord": "Cmshelper::increaseLogCount",
        "beforeDeleteRecord": "Cmshelper::decreaseLogCount",
        "beforeEditRecord": "Cmshelper::updateLogCount",
        "afterEditRecord": "Cmshelper::updateTaskPercent"
    },
    "opertations": [
        "add",
        "view",
        "delete"
    ],
    "operationLabel": {
        "addLabel": "Add Log",
        "viewTitle": "View Log Details",
        "deleteTitle": "Delete Log"
    }
}