This commit is contained in:
@@ -46,12 +46,12 @@ Server
|
||||
- Optional: ID value (if the object is openable **** MUST CHECK RIGHTS ALSO HERE **** then this is the id to open for the client to put a hyperlink on that column)
|
||||
- For example (wide list):
|
||||
data:{
|
||||
columns:{ {name:"lt_client_name",datatype:text,ayatype:client},{name:"lt_client_notes",datatype:text},{name:"lt_last_workorder",datatype:number,ayatype:workorder}}
|
||||
rows:{ {display:"Green mechanics",id:32},"...notes...",{display:"42",id:42}, ...thousands more etc.... }
|
||||
columns:{[ {name:"lt_client_name",datatype:text,ayatype:client},{name:"lt_client_notes",datatype:text},{name:"lt_last_workorder",datatype:number,ayatype:workorder}]}
|
||||
rows:{[ {display:"Green mechanics",id:32},"...notes...",{display:"42",id:42}, ...thousands more etc.... ]}
|
||||
}
|
||||
- For example (XS list)
|
||||
data:{
|
||||
columns:{ {name:"lt_client",datatype:text,ayatype:client}}
|
||||
columns:{[ {name:"lt_client",datatype:text,ayatype:client}]}
|
||||
rows:{ {display:"Green mechanics",id:32}, ...thousands more etc.... }
|
||||
}
|
||||
|
||||
|
||||
@@ -318,25 +318,25 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
//BUILD THE RETURN BASED ON TEMPLATE and MINI CONDITIONAL FORMAT
|
||||
//TODO: Get template (MOCKED FOR NOW UNTIL PROOF OF CONCEPT)
|
||||
/*{ "MyStringArray" : ["somestring1", "somestring2"] }
|
||||
{
|
||||
columns:[
|
||||
ltKey,ltKey2,ltkey3
|
||||
],
|
||||
mini:[
|
||||
ltKey, ltkey2, ltkey3
|
||||
]
|
||||
}
|
||||
*/
|
||||
var MOCK_DISPLAY_TEMPLATE = @"
|
||||
//TODO: Get template (MOCKED FOR NOW UNTIL PROOF OF CONCEPT)
|
||||
var MOCK_WIDGET_DISPLAY_TEMPLATE_JSON = @"
|
||||
{
|
||||
""full"":[""WidgetName"",""WidgetSerial"",""WidgetDollarAmount"",""WidgetRoles"",""WidgetStartDate"",""Active""],
|
||||
""mini"":[""WidgetName"",""WidgetSerial""]
|
||||
}
|
||||
";
|
||||
|
||||
//TODO: BUILD THE RETURN LIST OF FIELDS / TYPES AND ORDER FROM TEMPLATE AND MINI CONDITIONAL
|
||||
//TODO: BUILD THE RETURN LIST OF FIELDS / TYPES AND ORDER FROM TEMPLATE AND MINI CONDITIONAL
|
||||
//eg: columns:{[ {name:"lt_client_name",datatype:text,ayatype:client},{name:"lt_client_notes",datatype:text},{name:"lt_last_workorder",datatype:number,ayatype:workorder}]}
|
||||
//if FULL Pass the template to the ObjectFields which will build the return JSON for here and will also ensure the fields are correct, if any are unknown it will just ignore them but maybe log it?
|
||||
string ColumnsJSON=string.Empty;
|
||||
if(listOptions.Mini){
|
||||
NEXT: build this with AyaType templated in as a number to avoid magic numers
|
||||
//and figure out if it's worth it to abbreviate the property names like this or just confusing for no useful purpose
|
||||
ColumnsJSON=@"{[ {""nm"":""lt_client"",""dt"":""text"",""at"":""client""}]}";
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
//TODO: BUILD THE RETURN LIST OF DATA ITEMS
|
||||
//If mini format all desired columns in order into the single mini return display (and set the only other return field which is ID)
|
||||
|
||||
Reference in New Issue
Block a user