This commit is contained in:
@@ -789,12 +789,14 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//popup Alert notes
|
//popup Alert notes
|
||||||
//Customer notes first then others below
|
//Customer notes first then others below
|
||||||
var customerAlert = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => x.PopUpNotes).FirstOrDefaultAsync();
|
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.PopUpNotes, CustomerViz = x.Name }).FirstOrDefaultAsync();
|
||||||
if (!string.IsNullOrWhiteSpace(customerAlert))
|
if (!string.IsNullOrWhiteSpace(custInfo.AlertViz))
|
||||||
{
|
{
|
||||||
o.AlertViz = $"{await Translate("Customer")}\n{customerAlert}\n\n";
|
o.AlertViz = $"{await Translate("Customer")}\n{custInfo.AlertViz}\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
o.CustomerViz = custInfo.CustomerViz;
|
||||||
|
|
||||||
if (o.ProjectId != null)
|
if (o.ProjectId != null)
|
||||||
o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync();
|
o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ namespace AyaNova.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public long CustomerId { get; set; }
|
public long CustomerId { get; set; }
|
||||||
|
[NotMapped]
|
||||||
|
public string CustomerViz { get; set; }
|
||||||
public long? ProjectId { get; set; }
|
public long? ProjectId { get; set; }
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string ProjectViz { get; set; }
|
public string ProjectViz { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user