{
    "keyColumn": "user_id",
    "detailHeaderColumnPrefix": "User: ",
    "detailHeaderColumns": [
        "user_email"
    ],
    "orderBy": {
        "user_id": "ASC"
    },
	"includeJsFiles": [
		"cmsvalidations.js"
	],
"combineTables":{"tbl_smb_account":{"combineColumns":["smb_name","smb_plan"],"combineReferenceColumn":"smb_owner_id","combineTableForiegnKey":"user_id","isPrimaryKey":"true"}},

    "listColumns": [
	 
        "user_fname",
        "user_lname",
        "user_email",
		"user_joinedon",
		"user_phone",
		"user_status"
		 
    ],
    "showColumns": [
        "user_fname",
        "user_lname",
        "user_email",
		"user_password",
        "user_photo_id",
        "user_joinedon",
		"user_status",
		"user_phone"
    ],
    "detailColumns": [
	 
        "user_fname",
        "user_lname",
        "user_email",
		"user_password",
        "user_joinedon",
		"user_phone",
		"user_status",
		"smb_name",
		"smb_plan"
 
		
    ],
    "columns": {
        "user_id": {
            "name": "ID",
            "sortable": "true",
            "editoptions": {
                "type": "hidden"
            }
        },
        "user_fname": {
            "name": "First Name",
			 "searchable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "First Name",
                "class": "textbox",
				"validations": [
                    "required"
                ]
            }
        },
		  
        "user_lname": {
            "name": "Last Name",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Last Name",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
		"user_email": {
            "name": "Email",
            "sortable": "true",
			 "searchable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Email",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
		 "user_phone": {
            "name": "User Phone",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "User Phone",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }
        },
		"user_password": {
            "name": "Password",
            "editoptions": {
                "type": "password",
                "label": "Password",
                "class": "textbox"
            }
        },
		 "smb_name": {
            "name": "Business Account",
            "searchable": "true",
            "sortable": "true",
		 	"customColumn": "true",
            "customaction": "Cmshelper::fetchSMBFromUserid",
			"editoptions": {
                "type": "textbox",
                "label": "Business Account",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            }  
        },
		
		 "smb_plan": {
            "name": "Plan",
            "editoptions": {
                "validations": [
                    "required"
                ],
                "type": "select",
                "source": "Cmshelper::getAllPlans",
                "source_type": "function",
                "label": "Plan",
                "class": "select"
            },
            "customColumn": "true",
             "customaction": "Cmshelper::fetchSMBPlanFromId"
        },
		"user_status": {
            "name": "Status",
            "editoptions": {
                "type": "select",
                "source": {
                    "1": "Active",
                    "0": "Inactive"
                },
                "source_type": "array",
                "label": "Status",
                "class": "select",
                "enumvalues": {
                    "1": "Active",
                    "0": "Inactive"
                },
                "validations": [
                    "required"
                ]
            }
        },
		
		
		
        "user_joinedon": {
            "name": "Joined On",
            "sortable": "true",
			 "dbFormat": "datetime",
            "displayFormat": "m/d/Y"
        }
    },
	"customActions": {
        "afterAddRecord": "Cmshelper::createNewApp"
    },

    "opertations": [
	 	"add",
        "view",
        "edit",
        "delete"
    ],
	  "report": {
        "reportTitle": "Users",
        "columns": [
			"user_fname",
			"user_lname",
			"user_email",
			"user_joinedon",
			"user_phone",
			"user_status"
        ],
        "dateColumn": "user_joinedon"
    }
}