This commit is contained in:
2020-01-15 15:12:29 +00:00
parent e908c2d5f7
commit ea9fd9d249
2 changed files with 7 additions and 4 deletions

View File

@@ -44,14 +44,17 @@ Server
- Each row has each column as a object comprising of:
- Display value (the data to show, not formatted yet, that's up to the client)
- 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)
- To save bandwidth abbreviations are used in the column definitions:
- ColumnsJSON=@"{[ {""cm"":""Widget"",""dt"":""text"",""ay"":"+ AyaType.Widget.ToString()+ "}]}";
- cm=column name locale key, dt=AyDataType, ay=AyaType to open on click of that column field (optional, not present if not openable)
- 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}]}
columns:{[ {cm:"lt_client_name",dt:text,ay:client},{cm:"lt_client_notes",dt:text},{cm:"lt_last_workorder",dt:number,ay: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:{[ {cm:"lt_client",dt:text,ay:client}]}
rows:{ {display:"Green mechanics",id:32}, ...thousands more etc.... }
}

View File

@@ -331,9 +331,9 @@ namespace AyaNova.Biz
//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
//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""}]}";
ColumnsJSON=@"{[ {""cm"":""Widget"",""dt"":""text"",""ay"":"+ AyaType.Widget.ToString()+ "}]}";
}else{
}