This commit is contained in:
@@ -5132,9 +5132,22 @@ namespace AyaNova.Biz
|
||||
private async Task ScheduledUserPopulateVizFields(WorkOrderItemScheduledUser o)
|
||||
{
|
||||
if (o.UserId != null)
|
||||
o.UserViz = await ct.User.AsNoTracking().Where(x => x.Id == o.UserId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||
{
|
||||
if (!vc.Has("user", o.UserId))
|
||||
{
|
||||
vc.Add(await ct.User.AsNoTracking().Where(x => x.Id == o.UserId).Select(x => x.Name).FirstOrDefaultAsync(), "user", o.UserId);
|
||||
}
|
||||
o.UserViz = vc.Get("user", o.UserId);
|
||||
}
|
||||
|
||||
if (o.ServiceRateId != null)
|
||||
o.ServiceRateViz = await ct.ServiceRate.AsNoTracking().Where(x => x.Id == o.ServiceRateId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||
{
|
||||
if (!vc.Has("servicerate", o.ServiceRateId))
|
||||
{
|
||||
vc.Add(await ct.ServiceRate.AsNoTracking().Where(x => x.Id == o.ServiceRateId).Select(x => x.Name).FirstOrDefaultAsync(), "servicerate", o.ServiceRateId);
|
||||
}
|
||||
o.ServiceRateViz = vc.Get("servicerate", o.ServiceRateId);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user