From 3c07a2580d45ebdac95a24127938c7ca0bb1c731 Mon Sep 17 00:00:00 2001 From: Harald Nagel Date: Wed, 30 Oct 2024 17:10:02 -0700 Subject: [PATCH] Fix and improve reporting --- .../MissionControl/ReportingController.cs | 8 + .../Reporting/ReportCriteriaViewModel.cs | 57 +-- .../Views/Events/AddEditStreaming.cshtml | 4 +- .../MissionControl/Views/Events/Create.cshtml | 2 +- .../MissionControl/Views/Events/Edit.cshtml | 2 +- .../Views/Participants/Household.cshtml | 6 +- .../ActivityByProgramCriteria.cshtml | 60 +-- .../Views/Reporting/BadgeCriteria.cshtml | 366 +++++++++--------- .../Reporting/BadgeTopScoresCriteria.cshtml | 349 +++++++++-------- .../CommunityExperienceCriteria.cshtml | 14 +- .../CurrentStatusByProgramCriteria.cshtml | 18 +- .../Reporting/CurrentStatusCriteria.cshtml | 14 +- .../Reporting/GroupVendorCodeCriteria.cshtml | 10 +- ...antCountandMinutesByProgramCriteria.cshtml | 14 +- .../Reporting/ParticipantPrizeCriteria.cshtml | 12 +- .../ParticipantProgressCriteria.cshtml | 68 ++-- .../PrizeRedemptionCountCriteria.cshtml | 39 +- .../Reporting/PrizeRedemptionCriteria.cshtml | 16 +- ...rationsAndAchieversBySchoolCriteria.cshtml | 14 +- .../RegistrationsAndAchieversCriteria.cshtml | 61 +-- ...RemainingVendorPrizePick-upCriteria.cshtml | 14 +- .../Views/Reporting/TopScoresCriteria.cshtml | 16 +- .../VendorCodeByProgramCriteria.cshtml | 10 +- .../VendorCodeDonationsCriteria.cshtml | 12 +- .../VendorPendingPrizeCriteria.cshtml | 4 +- .../Views/Reporting/View.cshtml | 16 +- .../MissionControl/Views/Shared/Job.cshtml | 35 +- .../Views/Shared/_Layout.cshtml | 8 +- src/GRA.Web/Scripts/gra.js | 51 ++- src/GRA.Web/Styles/gra.css | 4 + 30 files changed, 685 insertions(+), 619 deletions(-) diff --git a/src/GRA.Controllers/MissionControl/ReportingController.cs b/src/GRA.Controllers/MissionControl/ReportingController.cs index 3628f0784..cf10adabb 100644 --- a/src/GRA.Controllers/MissionControl/ReportingController.cs +++ b/src/GRA.Controllers/MissionControl/ReportingController.cs @@ -60,6 +60,14 @@ public ReportingController(ILogger logger, PageTitle = "Reporting"; } + public static string Name + { + get + { + return "Reporting"; + } + } + [HttpGet] public async Task Configure(int id) { diff --git a/src/GRA.Controllers/ViewModel/MissionControl/Reporting/ReportCriteriaViewModel.cs b/src/GRA.Controllers/ViewModel/MissionControl/Reporting/ReportCriteriaViewModel.cs index 821e29328..669233258 100644 --- a/src/GRA.Controllers/ViewModel/MissionControl/Reporting/ReportCriteriaViewModel.cs +++ b/src/GRA.Controllers/ViewModel/MissionControl/Reporting/ReportCriteriaViewModel.cs @@ -8,53 +8,58 @@ namespace GRA.Controllers.ViewModel.MissionControl.Reporting { public class ReportCriteriaViewModel { - public int ReportId { get; set; } + public string BadgeRequiredList { get; set; } - [DisplayName("Start Date")] - public DateTime? StartDate { get; set; } + [DisplayName("Select a branch")] + public int? BranchId { get; set; } + + public SelectList BranchList { get; set; } + public string ChallengeRequiredList { get; set; } [DisplayName("End Date")] public DateTime? EndDate { get; set; } - public DateTime ProgramStartDate { get; set; } - - [DisplayName("Select a system")] - public int? SystemId { get; set; } + [DisplayName("Select a group")] + public int? GroupInfoId { get; set; } - [DisplayName("Select a branch")] - public int? BranchId { get; set; } + public SelectList GroupInfosList { get; set; } + public SelectList PrizeList { get; set; } [DisplayName("Select a program")] public int? ProgramId { get; set; } + public SelectList ProgramList { get; set; } + public DateTime ProgramStartDate { get; set; } + + [DisplayName("Badges to Report")] + public ICollection ReportBadges { get; set; } + + public int ReportId { get; set; } + [DisplayName("Select a school district")] public int? SchoolDistrictId { get; set; } + public SelectList SchoolDistrictList { get; set; } + [DisplayName("Select a school")] public int? SchoolId { get; set; } - [DisplayName("Select a group")] - public int? GroupInfoId { get; set; } + public SelectList SchoolList { get; set; } - [DisplayName("Select a vendor code")] - public int? VendorCodeTypeId { get; set; } + [DisplayName("Start Date")] + public DateTime? StartDate { get; set; } - [DisplayName("Select triggers")] - public List TriggerList { get; set; } + [DisplayName("Select a system")] + public int? SystemId { get; set; } public SelectList SystemList { get; set; } - public SelectList BranchList { get; set; } - public SelectList ProgramList { get; set; } - public SelectList SchoolDistrictList { get; set; } - public SelectList SchoolList { get; set; } - public SelectList GroupInfosList { get; set; } - public SelectList VendorCodeTypeList { get; set; } - public SelectList PrizeList { get; set; } - [DisplayName("Badges to Report")] - public ICollection ReportBadges { get; set; } + [DisplayName("Select triggers (use SHIFT or CTRL to select multiple items)")] + public List TriggerList { get; set; } - public string BadgeRequiredList { get; set; } - public string ChallengeRequiredList { get; set; } + [DisplayName("Select a vendor code")] + public int? VendorCodeTypeId { get; set; } + + public SelectList VendorCodeTypeList { get; set; } } } diff --git a/src/GRA.Web/Areas/MissionControl/Views/Events/AddEditStreaming.cshtml b/src/GRA.Web/Areas/MissionControl/Views/Events/AddEditStreaming.cshtml index be82643ff..696a5d832 100644 --- a/src/GRA.Web/Areas/MissionControl/Views/Events/AddEditStreaming.cshtml +++ b/src/GRA.Web/Areas/MissionControl/Views/Events/AddEditStreaming.cshtml @@ -846,8 +846,8 @@ $(".challengeScope").on("click", function (e) { e.preventDefault(); - $(this).siblings().removeClass("active"); - $(this).addClass().addClass("active"); + $(this).siblings().children().removeClass("active"); + $(this).children().addClass("active"); challengeScope = $(this).attr("id"); page = 1; UpdateChallengeList(); diff --git a/src/GRA.Web/Areas/MissionControl/Views/Events/Create.cshtml b/src/GRA.Web/Areas/MissionControl/Views/Events/Create.cshtml index cffaa6260..6bba8487d 100644 --- a/src/GRA.Web/Areas/MissionControl/Views/Events/Create.cshtml +++ b/src/GRA.Web/Areas/MissionControl/Views/Events/Create.cshtml @@ -989,7 +989,7 @@ $(".challengeScope").on("click", function (e) { e.preventDefault(); $(this).siblings().children().removeClass("active"); - $(this).children().addClass().addClass("active"); + $(this).children().addClass("active"); challengeScope = $(this).attr("id"); page = 1; UpdateChallengeList(); diff --git a/src/GRA.Web/Areas/MissionControl/Views/Events/Edit.cshtml b/src/GRA.Web/Areas/MissionControl/Views/Events/Edit.cshtml index 7eecee135..c8dc40236 100644 --- a/src/GRA.Web/Areas/MissionControl/Views/Events/Edit.cshtml +++ b/src/GRA.Web/Areas/MissionControl/Views/Events/Edit.cshtml @@ -828,7 +828,7 @@ $(".challengeScope").on("click", function (e) { e.preventDefault(); $(this).siblings().children().removeClass("active"); - $(this).children().addClass().addClass("active"); + $(this).children().addClass("active"); challengeScope = $(this).attr("id"); page = 1; UpdateChallengeList(); diff --git a/src/GRA.Web/Areas/MissionControl/Views/Participants/Household.cshtml b/src/GRA.Web/Areas/MissionControl/Views/Participants/Household.cshtml index 96d225bc4..01898fd89 100644 --- a/src/GRA.Web/Areas/MissionControl/Views/Participants/Household.cshtml +++ b/src/GRA.Web/Areas/MissionControl/Views/Participants/Household.cshtml @@ -1125,7 +1125,7 @@ $("#All").on("click", function () { if (systemId != null) { $(this).siblings().removeClass("active"); - $(this).addClass().addClass("active"); + $(this).addClass("active"); $("#systemText").text("System"); $("#branchText").text("Branch"); if (systemId != defaultSystemId) { @@ -1144,7 +1144,7 @@ if (systemId == null || branchId != null) { var navPill = $(this).parent().parent().parent(); navPill.siblings().removeClass("active"); - navPill.addClass().addClass("active"); + navPill.addClass("active"); if (branchId != null) { $("#branchText").text("Branch"); } @@ -1166,7 +1166,7 @@ if (branchId == null) { var navPill = $(this).parent().parent().parent(); navPill.siblings().removeClass("active"); - navPill.addClass().addClass("active"); + navPill.addClass("active"); if (systemId == null) { systemId = defaultSystemId; $("#systemText").text($(".system-selector").first().text()); diff --git a/src/GRA.Web/Areas/MissionControl/Views/Reporting/ActivityByProgramCriteria.cshtml b/src/GRA.Web/Areas/MissionControl/Views/Reporting/ActivityByProgramCriteria.cshtml index 1e719d7fb..54680587a 100644 --- a/src/GRA.Web/Areas/MissionControl/Views/Reporting/ActivityByProgramCriteria.cshtml +++ b/src/GRA.Web/Areas/MissionControl/Views/Reporting/ActivityByProgramCriteria.cshtml @@ -1,42 +1,13 @@ @model GRA.Controllers.ViewModel.MissionControl.Reporting.ReportCriteriaViewModel -
+ - - -
+
-
+
- Entire program - Last 7 days + +
-
-
+
+
-
- -
+
-
+
-
- -
+
-
+
+
+ +
+ + +
-
-
- -
-
- -
-
-
-
-
-

- Searching for '' -

-
-
-
-
-
-
+
- +
+
+

+ Searching for: +

+
+
+
+
+
@@ -200,8 +207,8 @@ } \ No newline at end of file diff --git a/src/GRA.Web/Areas/MissionControl/Views/Reporting/PrizeRedemptionCountCriteria.cshtml b/src/GRA.Web/Areas/MissionControl/Views/Reporting/PrizeRedemptionCountCriteria.cshtml index 1b87aef0f..517dbee9e 100644 --- a/src/GRA.Web/Areas/MissionControl/Views/Reporting/PrizeRedemptionCountCriteria.cshtml +++ b/src/GRA.Web/Areas/MissionControl/Views/Reporting/PrizeRedemptionCountCriteria.cshtml @@ -1,9 +1,13 @@ @model GRA.Controllers.ViewModel.MissionControl.Reporting.ReportCriteriaViewModel -
+ -
+
- +
-
+
- -@section scripts { - -} \ No newline at end of file diff --git a/src/GRA.Web/Areas/MissionControl/Views/Reporting/PrizeRedemptionCriteria.cshtml b/src/GRA.Web/Areas/MissionControl/Views/Reporting/PrizeRedemptionCriteria.cshtml index 47d688054..1871e6523 100644 --- a/src/GRA.Web/Areas/MissionControl/Views/Reporting/PrizeRedemptionCriteria.cshtml +++ b/src/GRA.Web/Areas/MissionControl/Views/Reporting/PrizeRedemptionCriteria.cshtml @@ -1,9 +1,13 @@ @model GRA.Controllers.ViewModel.MissionControl.Reporting.ReportCriteriaViewModel -
+ -
+
@@ -20,7 +24,7 @@
-
+
+
-
-
+
+
-
- -
+
-
+
-
- -
+
-
+
-
+
@@ -20,7 +24,7 @@
-
+