This commit is contained in:
2023-01-12 00:24:36 +00:00
parent 3c67e58660
commit 29856a59ba
7 changed files with 199 additions and 34 deletions

View File

@@ -255,7 +255,7 @@ namespace Sockeye.Biz
foreach (GZCase w in orderedList)
{
if (!ReportRenderManager.KeepGoing(jobId)) return null;
await PopulateVizFields(w);
var jo = JObject.FromObject(w);
if (!JsonUtil.JTokenIsNullOrEmpty(jo["CustomFields"]))
jo["CustomFields"] = JObject.Parse((string)jo["CustomFields"]);
@@ -269,7 +269,15 @@ namespace Sockeye.Biz
private VizCache vc = new VizCache();
//populate viz fields from provided object
private async Task PopulateVizFields(GZCase o)
{
if (!vc.Has("customer", o.CustomerId))
{
vc.Add(await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => x.Name).FirstOrDefaultAsync(), "customer", o.CustomerId);
}
o.CustomerViz = vc.Get("customer", o.CustomerId);
}
////////////////////////////////////////////////////////////////////////////////////////////////
// IMPORT EXPORT