diff --git a/server/biz/SubscriptionBiz.cs b/server/biz/SubscriptionBiz.cs index 0702151..ff40ac9 100644 --- a/server/biz/SubscriptionBiz.cs +++ b/server/biz/SubscriptionBiz.cs @@ -360,11 +360,14 @@ namespace Sockeye.Biz if (CustomerId != 0) { - if (!vc.Has("customer", CustomerId)) + if (!vc.Has("customername", CustomerId)) { - vc.Add(await ct.Customer.AsNoTracking().Where(x => x.Id == CustomerId).Select(x => x.Name).FirstOrDefaultAsync(), "customer", CustomerId); + var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == CustomerId).FirstOrDefaultAsync(); + vc.Add(custInfo.Name, "customername", CustomerId); + vc.Add(custInfo.EmailAddress, "customeremail", CustomerId); } - o.CustomerViz = vc.Get("customer", CustomerId); + o.CustomerViz = vc.Get("customername", CustomerId); + o.CustomerEmailViz = vc.Get("customeremail", CustomerId); } if (!vc.Has("productname", o.ProductId)) diff --git a/server/models/SubscriptionItem.cs b/server/models/SubscriptionItem.cs index e758248..7298e3d 100644 --- a/server/models/SubscriptionItem.cs +++ b/server/models/SubscriptionItem.cs @@ -41,6 +41,8 @@ namespace Sockeye.Models [NotMapped] public string CustomerViz { get; set; } + [NotMapped] + public string CustomerEmailViz { get; set; } public List Tags { get; set; } = new List(); diff --git a/todo.txt b/todo.txt index 01c3efc..48be2d9 100644 --- a/todo.txt +++ b/todo.txt @@ -15,18 +15,16 @@ TODO: TODO: make a filter showing expired but not set to inactive subscription items - TODO: dashboard items related to subscriptions - - revenue per month for next 12 months graph - - overdue expired subs list - - active count of each product subscription bar graph - todo: build email address list by active subscription product no dupes maybe in a report? This is for alerting subscribers to update or non subscribers to update separately maybe it's a full on feature? - + TODO: dashboard items related to subscriptions + - revenue per month for next 12 months graph + - overdue expired subs list + - active count of each product subscription bar graph