Configs for Company. FYI, I’ve tried this both with and without the Joins.
{
"formtabs":[
{
"MIGX_id":2,
"caption":"Basic Info",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":2,
"field":"name",
"caption":"Company Name",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
},
{
"MIGX_id":3,
"field":"description",
"caption":"Description",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"textarea",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":2
}
],
"pos":1
},
{
"MIGX_id":5,
"caption":"Staffs",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":9,
"field":"stafflist",
"caption":"Staffs",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"migxdb",
"validation":"",
"configs":"Company Staffs",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
}
],
"pos":2
}
],
"contextmenus":"update||duplicate||remove",
"actionbuttons":"addItem",
"columnbuttons":"update||duplicate||remove",
"filters":"",
"extended":{
"migx_add":"Add Company",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"",
"update_win_title":"",
"win_id":"companys",
"maxRecords":"",
"addNewItemAt":"bottom",
"media_source_id":"",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"cancel||done",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"company",
"classname":"CompanyCompany",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":1,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"company",
"has_jointable":"yes",
"getlistwhere":"",
"joins":[
{
"alias":"staff",
"classname":"CompanyStaff",
"on":"staff.company_id = CompanyCompany.id"
}
],
"hooksnippets":"",
"cmpmaincaption":"Companys",
"cmptabcaption":"Companys",
"cmptabdescription":"Main list of companys.",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"permissions":{
"apiaccess":"",
"view":"",
"list":"",
"save":"",
"create":"",
"remove":"",
"delete":"",
"publish":"",
"unpublish":"",
"viewdeleted":"",
"viewunpublished":""
},
"fieldpermissions":"",
"columns":[
{
"MIGX_id":1,
"header":"ID",
"dataIndex":"id",
"width":"",
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":2,
"header":"Name",
"dataIndex":"name",
"width":300,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":"this.textEditor"
},
{
"MIGX_id":3,
"header":"Description",
"dataIndex":"description",
"width":300,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":"this.textEditor"
}
],
"category":""
}
Configs for Staff:
{
"formtabs":[
{
"MIGX_id":4,
"caption":"Settings",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":5,
"field":"text",
"caption":"Staff info",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"textarea",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
},
{
"MIGX_id":6,
"field":"staff_type_id",
"caption":"Staff Type",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"listbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"@SELECT `staff_type`,`id` FROM `[[+PREFIX]]company_staff_type` ORDER BY staff_type",
"default":"",
"useDefaultIfEmpty":"0",
"pos":2
}
],
"pos":1
}
],
"contextmenus":"update||duplicate||remove",
"actionbuttons":"addItem",
"columnbuttons":"update||duplicate||remove",
"filters":[
{
"MIGX_id":1,
"name":"companylist",
"label":"Companys",
"emptytext":"Enter a company name, or part of a name",
"type":"textbox",
"getlistwhere":{
"company.name:LIKE":"%[[+companylist]]%"
},
"getcomboprocessor":"",
"combotextfield":"",
"comboidfield":"",
"combowhere":"",
"comboclassname":"",
"combopackagename":"",
"combo_use_custom_prefix":"0",
"comboprefix":"",
"combojoins":[
{
"alias":"company",
"classname":"CompanyCompany",
"on":"company.id = CompanyStaff.company_id"
}
],
"comboparent":"",
"default":""
},
{
"MIGX_id":2,
"name":"clear",
"label":"Clear",
"emptytext":"",
"type":"resetall",
"getlistwhere":"",
"getcomboprocessor":"",
"combotextfield":"",
"comboidfield":"",
"combowhere":"",
"comboclassname":"",
"combopackagename":"",
"combo_use_custom_prefix":"0",
"comboprefix":"",
"combojoins":"",
"comboparent":"",
"default":""
}
],
"extended":{
"migx_add":"Add Staff",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"",
"update_win_title":"",
"win_id":"companystaffs",
"maxRecords":"",
"addNewItemAt":"bottom",
"media_source_id":"",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"cancel||done",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"company",
"classname":"CompanyStaff",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":2,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"staff",
"has_jointable":"yes",
"getlistwhere":"",
"joins":[
{
"alias":"stafftype",
"classname":"CompanyStaffType",
"on":"stafftype.id = CompanyStaff.staff_type_id"
},
{
"alias":"company",
"classname":"CompanyCompany",
"on":"company.id = CompanyStaff.company_id"
}
],
"hooksnippets":"",
"cmpmaincaption":"Company Staff",
"cmptabcaption":"Staff",
"cmptabdescription":"List of company staff.",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"permissions":{
"apiaccess":"",
"view":"",
"list":"",
"save":"",
"create":"",
"remove":"",
"delete":"",
"publish":"",
"unpublish":"",
"viewdeleted":"",
"viewunpublished":""
},
"fieldpermissions":"",
"columns":[
{
"MIGX_id":1,
"header":"ID",
"dataIndex":"id",
"width":60,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":2,
"header":"Staff",
"dataIndex":"text",
"width":400,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":"this.textEditor"
},
{
"MIGX_id":3,
"header":"Type",
"dataIndex":"stafftype_staff_type",
"width":100,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":4,
"header":"Company",
"dataIndex":"company_name",
"width":200,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
}
],
"category":""
}