From f9784d0b0d639d9210b52ec3faf14126287f310c Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 7 Jun 2022 23:10:52 +0000 Subject: [PATCH] exclude inactive customers from email address list for selected product codes report --- Controllers/ReportController.cs | 22 ++++++- notes/deploy.txt | 4 +- util/RfVersion.cs | 2 +- wwwroot/default.htm | 112 ++++++++++++++++---------------- 4 files changed, 79 insertions(+), 61 deletions(-) diff --git a/Controllers/ReportController.cs b/Controllers/ReportController.cs index c41491e..61a8478 100644 --- a/Controllers/ReportController.cs +++ b/Controllers/ReportController.cs @@ -71,7 +71,7 @@ namespace rockfishCore.Controllers [HttpPost("emailsforproductcodes")] public JsonResult GetUniqueEmailsByProductCodes([FromBody] requestEmailsForProductCodes req) { - var customerList = _context.Customer.Select(p => new { p.Id, p.DoNotContact }); + var customerList = _context.Customer.Select(p => new { p.Id, p.DoNotContact, p.Active }); List rawCustomerIds = new List(); @@ -88,10 +88,26 @@ namespace rockfishCore.Controllers //container for the raw email lists built serially List rawEmails = new List(); +/* +Test for QBI and renewal with version 6.13 before new code to remove non active's: +mikem@alpine-optics.com,yamilef@alpine-optics.com,davidb@alpine-optics.com,eli@data-serv.com,jasonc@energycontrol.com,renah@energycontrol.com,nmizrahi@energycontrol.com,sherri@entryguardsystems.com, +error@error-cr.com,bfairman@fairmanassociates.com,info@fouralarm.ca,scott@fouralarm.ca,angela@fouralarm.ca,matt.levis0@gmail.com,hartcomputersme@gmail.com,steve@grafixsolutions.net, +spasandleisure@hotmail.com,service@intermedex.com,bos@iss-central.com,ronkingmail2@netscape.net,fernando@pegasusind.com,admin@pegasusind.com,jdragan@pro-ees.com,imcleod@redskye.co.uk, +amcleod@redskye.co.uk,rena@sensorfact.com,sales@solveit.ie,austin@solveit.ie,ericg@straighttalktech.com,shootnsharp@thesoileaus.com,skyliner575600@yahoo.com,chad@zapmgames.com + +After these changes: +mikem@alpine-optics.com,yamilef@alpine-optics.com,davidb@alpine-optics.com,eli@data-serv.com,sherri@entryguardsystems.com,bfairman@fairmanassociates.com,info@fouralarm.ca,scott@fouralarm.ca, +angela@fouralarm.ca,matt.levis0@gmail.com,hartcomputersme@gmail.com,steve@grafixsolutions.net,spasandleisure@hotmail.com,service@intermedex.com,bos@iss-central.com,ronkingmail2@netscape.net, +fernando@pegasusind.com,admin@pegasusind.com,jdragan@pro-ees.com,imcleod@redskye.co.uk,amcleod@redskye.co.uk,shootnsharp@thesoileaus.com,skyliner575600@yahoo.com,chad@zapmgames.com + + +*/ foreach (long cid in uniqueCustomerIds) { - //skip if do not contact and not explicitly including do not contact - if (customerList.First(p => p.Id == cid).DoNotContact && req.ckNoContact != true) + //get customer record + var customerRecord=customerList.First(p => p.Id == cid); + //skip if not present, not active or do not contact and not explicitly including do not contact + if (customerRecord==null || customerRecord.Active==false ||( customerRecord.DoNotContact && req.ckNoContact != true)) continue; //get all raw email values for this client from db diff --git a/notes/deploy.txt b/notes/deploy.txt index 705f2a3..b37f980 100644 --- a/notes/deploy.txt +++ b/notes/deploy.txt @@ -28,7 +28,9 @@ in rockfish.last to copy over all current rockfish files and folders: root@ubuntu-s-1vcpu-1gb-amd-sfo3-01:/srv/coreapps/rockfish.last# cp -a ../rockfish/. . -2.9) delete all in rockfish folder except db folder +2.9) delete all in rockfish folder except db folder AND ** JSON CONFIG FILES ** + +If it won't start it's likely the .json config files are not present, copy back from rockfish.last 3) COPY Copy over to production server, safest is all files from publish into /srv/coreapps/rockfish diff --git a/util/RfVersion.cs b/util/RfVersion.cs index 9dc5fb8..7da0afa 100644 --- a/util/RfVersion.cs +++ b/util/RfVersion.cs @@ -2,7 +2,7 @@ namespace rockfishCore.Util { public static class RfVersion { - public const string NumberOnly="6.13"; + public const string NumberOnly="6.14"; public const string Full = "Rockfish server " + NumberOnly; } } \ No newline at end of file diff --git a/wwwroot/default.htm b/wwwroot/default.htm index 16d74f4..74f2061 100644 --- a/wwwroot/default.htm +++ b/wwwroot/default.htm @@ -11,73 +11,73 @@ Rockfish loading.... - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + \ No newline at end of file