cbs icon indicating copy to clipboard operation
cbs copied to clipboard

When looking at ONLY success or error or unknown number in the platform it should be possible to export ONLY success, error and unknown numbers

Open tineml opened this issue 5 years ago • 1 comments

image

tineml avatar Jun 06 '19 10:06 tineml

Use the CaseReportStatus enum instead of HealthRiskId when filtering on success and error

            public Func<CaseReportForListing, bool> FilterPredicate
            {
                get
                {
                    switch (Filter?.ToLower())
                    {
                        case "success":
                            return _ => _.HealthRiskId != HealthRiskId.NotSet && _.HealthRisk != "Unknown";
                        case "error":
                            return _ => _.HealthRiskId == HealthRiskId.NotSet || _.HealthRisk == "Unknown";
                        case "unknownSender":
                            return _ => _.DataCollectorId == DataCollectorId.NotSet || _.DataCollectorDisplayName == "Unknown";
                        case "all":
                        default:
                            return _ => true;
                    }
                }
            }

And add download parameters to the request when sending from frontend.

        public class DownloadParameters
        {
            public string Format { get; set; }
            public string Filter { get; set; }
            public string SortBy { get; set; }
            public string Order { get; set; }
       }

gardnk avatar Jun 06 '19 11:06 gardnk