This commit is contained in:
@@ -789,12 +789,14 @@ namespace AyaNova.Biz
|
||||
|
||||
//popup Alert notes
|
||||
//Customer notes first then others below
|
||||
var customerAlert = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => x.PopUpNotes).FirstOrDefaultAsync();
|
||||
if (!string.IsNullOrWhiteSpace(customerAlert))
|
||||
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(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)
|
||||
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]
|
||||
public long CustomerId { get; set; }
|
||||
[NotMapped]
|
||||
public string CustomerViz { get; set; }
|
||||
public long? ProjectId { get; set; }
|
||||
[NotMapped]
|
||||
public string ProjectViz { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user