This commit is contained in:
@@ -49,7 +49,7 @@ Server
|
|||||||
- cm=column name locale key, dt=AyDataType, ay=AyaType to open on click of that column field (optional, not present if not openable)
|
- 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):
|
- For example (wide list):
|
||||||
data:{
|
data:{
|
||||||
columns:{[ {cm:"lt_client_name",dt:text,ay:client},{cm:"lt_client_notes",dt:text},{cm:"lt_last_workorder",dt:number,ay:workorder}]}
|
columns:{[ {cm:"lt_client_name",dt:text,ay:2},{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.... ]}
|
rows:{[ {display:"Green mechanics",id:32},"...notes...",{display:"42",id:42}, ...thousands more etc.... ]}
|
||||||
}
|
}
|
||||||
- For example (XS list)
|
- For example (XS list)
|
||||||
|
|||||||
@@ -19,7 +19,10 @@ CURRENT MASTER PLAN IN CLIENT TODO
|
|||||||
REALLY MAKING MORE PROGRESS WHEN CLIENT DEV DRIVES BACKEND DEV, STICK TO THAT!!
|
REALLY MAKING MORE PROGRESS WHEN CLIENT DEV DRIVES BACKEND DEV, STICK TO THAT!!
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
DATATYPE: should this be an enum rather than text because text takes up a lot of space bandwidth wise and is inefficient and also an enum can allow compiler type enforcement to avoid typos etc
|
||||||
|
|
||||||
GRID LISTS TODO NOW:
|
GRID LISTS TODO NOW:
|
||||||
|
|
||||||
- RECODE GETLIST in WidgetBiz
|
- RECODE GETLIST in WidgetBiz
|
||||||
- Return JSON and internally work with JSON so the list can return dynamic object
|
- Return JSON and internally work with JSON so the list can return dynamic object
|
||||||
- https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-apis/
|
- https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-apis/
|
||||||
|
|||||||
@@ -145,11 +145,9 @@ namespace AyaNova.Biz
|
|||||||
var fullFields = ((JArray)jtemplate["full"]).ToObject<string[]>();
|
var fullFields = ((JArray)jtemplate["full"]).ToObject<string[]>();
|
||||||
|
|
||||||
//Generate JSON fragment to return with column definitions
|
//Generate JSON fragment to return with column definitions
|
||||||
StringBuilder sb=new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
// StringWriter sw = new StringWriter();
|
|
||||||
// JsonTextWriter writer = new JsonTextWriter(sw);
|
// ColumnsJSON=@"""columns"":[ {""cm"":""Widget"",""dt"":""text"",""ay"":"+ AyaType.Widget.ToString()+ "},{..etc..}]";
|
||||||
// writer.WriteStartObject();//{
|
|
||||||
// ColumnsJSON=@"""columns"":[ {""cm"":""Widget"",""dt"":""text"",""ay"":"+ AyaType.Widget.ToString()+ "},{..etc..}]";
|
|
||||||
sb.Append("\"columns\":[");
|
sb.Append("\"columns\":[");
|
||||||
foreach (string s in fullFields)
|
foreach (string s in fullFields)
|
||||||
{
|
{
|
||||||
@@ -161,14 +159,14 @@ namespace AyaNova.Biz
|
|||||||
sb.Append($"\"cm\":\"{o.Key}\",\"dt\":\"{o.DataType}\"");
|
sb.Append($"\"cm\":\"{o.Key}\",\"dt\":\"{o.DataType}\"");
|
||||||
|
|
||||||
//Has a AyObjectType (linkable / openable?)
|
//Has a AyObjectType (linkable / openable?)
|
||||||
if(o.AyObjectType!=0)
|
if (o.AyObjectType != 0)
|
||||||
sb.Append($",\"ay\":{o.AyObjectType}");
|
sb.Append($",\"ay\":{o.AyObjectType}");
|
||||||
|
|
||||||
sb.Append("}");
|
sb.Append("}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sb.Append("]");
|
sb.Append("]");
|
||||||
// writer.WriteEndObject();//}
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user