diff --git a/Controllers/PurchaseController.cs b/Controllers/PurchaseController.cs
index a704b30..ed495ae 100644
--- a/Controllers/PurchaseController.cs
+++ b/Controllers/PurchaseController.cs
@@ -90,7 +90,7 @@ namespace rockfishCore.Controllers
throw;
}
}
- updateCustomerActive(purchase.CustomerId);
+ // updateCustomerActive(purchase.CustomerId);
ParseOrderAndUpdateEmail(purchase);
return NoContent();
}
@@ -107,7 +107,7 @@ namespace rockfishCore.Controllers
_context.Purchase.Add(purchase);
await _context.SaveChangesAsync();
- updateCustomerActive(purchase.CustomerId);
+ // updateCustomerActive(purchase.CustomerId);
ParseOrderAndUpdateEmail(purchase);
return CreatedAtAction("GetPurchase", new { id = purchase.Id }, purchase);
@@ -132,7 +132,9 @@ namespace rockfishCore.Controllers
_context.Purchase.Remove(purchase);
await _context.SaveChangesAsync();
- updateCustomerActive(customerId);
+ //removed, now have the concept of lapsed so active should be in manual control
+ //
+ // updateCustomerActive(customerId);
return Ok(purchase);
}
@@ -141,24 +143,24 @@ namespace rockfishCore.Controllers
return _context.Purchase.Any(e => e.Id == id);
}
- //check if customer has any active subs and flag accordingly
- private void updateCustomerActive(long customerId)
- {
- var cust = _context.Customer.First(m => m.Id == customerId);
- bool active = hasActiveSubs(customerId);
- if (cust.Active != active)
- {
- cust.Active = active;
- _context.Customer.Update(cust);
- _context.SaveChanges();
- }
- }
+ // //check if customer has any active subs and flag accordingly
+ // private void updateCustomerActive(long customerId)
+ // {
+ // var cust = _context.Customer.First(m => m.Id == customerId);
+ // bool active = hasActiveSubs(customerId);
+ // if (cust.Active != active)
+ // {
+ // cust.Active = active;
+ // _context.Customer.Update(cust);
+ // _context.SaveChanges();
+ // }
+ // }
- //check if a customer has active subscriptions
- private bool hasActiveSubs(long customerId)
- {
- return _context.Purchase.Where(m => m.CustomerId == customerId && m.CancelDate == null).Count() > 0;
- }
+ // //check if a customer has active subscriptions
+ // private bool hasActiveSubs(long customerId)
+ // {
+ // return _context.Purchase.Where(m => m.CustomerId == customerId && m.CancelDate == null).Count() > 0;
+ // }
diff --git a/wwwroot/js/app.customers.js b/wwwroot/js/app.customers.js
index edc1f35..7db5285 100644
--- a/wwwroot/js/app.customers.js
+++ b/wwwroot/js/app.customers.js
@@ -23,10 +23,31 @@ app.customers = (function() {
//
generateCard = function(obj) {
var editUrl = "#!/customerEdit/" + obj.id;
- var cardClass = obj.active
- ? "border-primary text-primary"
- : "border-secondary text-secondary";
- var urlClass = obj.active ? "" : "text-secondary";
+
+ var cardClass = "";
+ var urlClass = "";
+
+ //LAPSED
+ if (obj.active && obj.lapsed) {
+ cardClass = "border-warning text-warning";
+ urlClass = "text-warning";
+ }
+
+ //ACTIVE
+ if (obj.active && !obj.lapsed) {
+ cardClass = "border-primary text-primary";
+ }
+
+ //INACTIVE
+ if (!obj.active) {
+ cardClass = "border-primary text-primary";
+ urlClass = "text-secondary";
+ }
+
+ // var cardClass = obj.active
+ // ? "border-primary text-primary"
+ // : "border-secondary text-secondary";
+ // var urlClass = obj.active ? "" : "text-secondary";
return (
'
-
-
+
+
+
Active
+
+
+
+
Lapsed
+
+
+
+
+
+
+ Inactive
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wwwroot/js/templates/templates.js b/wwwroot/js/templates/templates.js
index e5ca789..a88ed43 100644
--- a/wwwroot/js/templates/templates.js
+++ b/wwwroot/js/templates/templates.js
@@ -1,2 +1,2 @@
-!function(){var n=Handlebars.template,e=Handlebars.templates=Handlebars.templates||{};e["app.authenticate"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n
\n
Login \n
\n
'},useData:!0}),e["app.customerEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
'},useData:!0}),e["app.customers"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
'},useData:!0}),e["app.customerSiteEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n
\n \n
\n
\n
\n\n
\n State / Province \n \n
\n
\n
\n
\n \n \n Networked \n
\n
\n
\n
\n Database type \n \n
\n
\n
\n
\n
\n Server bits \n \n
\n
\n
\n
\n
\n
\n Hosting start \n \n
\n
\n
\n
\n Hosting end \n \n
\n
\n
\n \n
\n\n \n Save \n Delete \n
\n\n \n
'},useData:!0}),e["app.customerSites"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
'},useData:!0}),e["app.fourohfour"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return"
\n
404 NOT FOUND 404 \n"},useData:!0}),e["app.inbox"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
'},useData:!0}),e["app.license"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n
\n \n\n\n
\n\n
\n
\n \n AyaNova LITE \n
\n
\n
\n
\n License type \n \n New \n Renewal / Add-on \n Licensed trial \n Web requested trial \n \n
\n
\n
\n
\n Registered to \n \n
\n
\n\n\n
\n\n
\n
\n Email address \n \n
\n
\n\n\n
\n
\n Users \n \n 1 \n 5 \n 10 \n 15 \n 20 \n 50 \n 999 \n \n
\n
\n
\n\n
\n Support expires \n \n
\n
\n
\n
\n
\n\n
\n\n\n\n
\n
\n
\n
\n
\n
\n
\n\n
\n\n
\n\n\n\n\n\n \n\n
\n \n
'},useData:!0}),e["app.licenseRequestEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n
\n \n\n
\n
\n
\n Greeting message \n \n
\n
\n
\n
\n Keycode message \n \n
\n
\n\n
\n \n
'},useData:!0}),e["app.licenses"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
'},useData:!0}),e["app.licenseTemplates"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n
\n\n \n\n
\n
FULL KEY \n\n
\n New \n \n
\n
\n
\n
\n
\n Licensed Trial \n \n
\n
\n
\n
Full trial greeting \n\n
\n Greeting \n \n
\n\n
\n
\n\n
LITE KEY \n\n
\n Lite New \n \n
\n
\n
\n
\n Lite Add-On \n \n
\n
\n
\n
\n Lite Licensed Trial \n \n
\n
\n
\n
Lite trial greeting \n\n
\n Lite Greeting \n \n
\n
\n\n\n\n
\n\n\n \n Save \n
\n\n \n
'},useData:!0}),e["app.licenseView"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
'},useData:!0}),e["app.mailEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n
\n \n Message \n \n
\n\n \n Send to \n \n
\n \n\n\n \n
'},useData:!0}),e["app.purchaseEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n
\n \n\n
\n
\n Product name \n \n
\n
\n
\n
\n Product code \n \n
\n
\n
\n
\n Sales order number \n \n
\n
\n
\n
\n
\n
\n \n \n Renew notice sent \n
\n
\n
\n
\n Subscription expire \n \n
\n
\n
\n
\n Cancel date \n \n
\n
\n
\n
\n Coupon code \n \n
\n
\n
\n
\n ShareIt Order \n \n
\n
\n\n\n\n
\n \n Save \n Delete \n Renew \n
\n \n
'},useData:!0}),e["app.purchases"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
'},useData:!0}),e["app.reportData"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
'},useData:!0}),e["app.reportDataExpires"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n\n'},useData:!0}),e["app.reportDataProdEmail"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n
\n \n
\n
Note: this will fetch all support and admin email addresses \n \n\n
\n Include \'Do not contact\' emails \n \n
\n\n
\n Products: \n
\n \n\n
\n\n
\n\n
\n\n \n
'},useData:!0}),e["app.rfcaseEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){
-return'
\n
\n \n \n \n
\n\n \n\n
\n\n
\n\n\n
\n
\n Priority \n \n 1 \n 2 \n 3 \n 4 \n 5 \n \n
\n
\n\n\n
\n\n
\n\n
\n
\n Released in version \n \n
\n
\n\n
\n
\n Release notes \n \n
\n
\n\n\n\n\n\n\n
\n\n
\n\n \n Save \n Delete \n
\n\n \n\n\n\n
\n \n \n
Upload attachments:
\n
\n
\n \n \n\n
'},useData:!0}),e["app.rfcases"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'
\n\n
\n\n\n
\n\n
\n\n
\n
\n Priority \n \n All \n 1 \n 2 \n 3 \n 4 \n 5 \n \n
\n
\n\n
\n\n
\n
\n
\n\n
\n
'},useData:!0}),e["app.rfsettings"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,l,a,o){return'