From 1271b3517d6f9274f4fa925ddeb4ad77fa308101 Mon Sep 17 00:00:00 2001 From: "DESKTOP-T0O5CDB\\DESK-555BD" Date: Tue, 9 Jan 2024 12:59:25 -0700 Subject: [PATCH 1/2] make report container smaller to accomodate for consolidated report below. --- Views/Vehicle/_CostMakeUpReport.cshtml | 2 +- Views/Vehicle/_Report.cshtml | 25 +++++++++++++------------ wwwroot/css/site.css | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Views/Vehicle/_CostMakeUpReport.cshtml b/Views/Vehicle/_CostMakeUpReport.cshtml index 2c27ef9..192a944 100644 --- a/Views/Vehicle/_CostMakeUpReport.cshtml +++ b/Views/Vehicle/_CostMakeUpReport.cshtml @@ -43,5 +43,5 @@ } else { -

No data found or all records have zero sums, insert records with non-zero sums to see visualizations here.

+

No data found or all records have zero sums, insert records with non-zero sums to see visualizations here.

} diff --git a/Views/Vehicle/_Report.cshtml b/Views/Vehicle/_Report.cshtml index 434582b..5dcd7ce 100644 --- a/Views/Vehicle/_Report.cshtml +++ b/Views/Vehicle/_Report.cshtml @@ -1,26 +1,26 @@ 
-
-
-
- -
-
+
-
-
-
- -
-
+
+
+
+
+
+
+
+
+
+
+
} else { -

No data found, insert some gas data to see visualizations here.

+

No data found, insert/select some data to see visualizations here.

} \ No newline at end of file diff --git a/Views/Vehicle/_ReminderMakeUpReport.cshtml b/Views/Vehicle/_ReminderMakeUpReport.cshtml new file mode 100644 index 0000000..00100bf --- /dev/null +++ b/Views/Vehicle/_ReminderMakeUpReport.cshtml @@ -0,0 +1,48 @@ +@model ReminderMakeUpForVehicle +@if (Model.UrgentCount + Model.VeryUrgentCount + Model.NotUrgentCount + Model.PastDueCount > 0) +{ + + +} +else +{ +

No data found, create reminders to see visualizations here.

+} diff --git a/Views/Vehicle/_Report.cshtml b/Views/Vehicle/_Report.cshtml index 5dcd7ce..4714338 100644 --- a/Views/Vehicle/_Report.cshtml +++ b/Views/Vehicle/_Report.cshtml @@ -1,37 +1,148 @@ -
-
+@model ReportViewModel +
+
+
+
+ +
+
+ @await Html.PartialAsync("_CostMakeUpReport", Model.CostMakeUpForVehicle)
-
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ @await Html.PartialAsync("_GasCostByMonthReport", Model.CostForVehicleByMonth)
-
+
-
+
+ +
+
+
+
+ @await Html.PartialAsync("_ReminderMakeUpReport", Model.ReminderMakeUpForVehicle)

-
\ No newline at end of file diff --git a/wwwroot/css/site.css b/wwwroot/css/site.css index b7b5339..1d00d53 100644 --- a/wwwroot/css/site.css +++ b/wwwroot/css/site.css @@ -36,6 +36,28 @@ html { overflow-x:auto; } +@media print { + .vehicleDetailTabContainer { + background-color: #fff; + height: 100%; + width: 100%; + position: absolute; + top: 0; + left: 0; + margin: 0; + font-size: 14px; + line-height: 18px; + color: #000 !important; + overflow: visible; + } + td { + color: #000 !important; + } + th { + color: #000 !important; + } +} + .chartContainer{ height:30vh; overflow:auto; @@ -57,6 +79,10 @@ html { } } +.reportsCheckBoxContainer { + padding: 0.375rem 2.25rem 0.375rem 0.75rem; +} + .bell-shake { animation: bellshake .5s; backface-visibility: hidden; @@ -99,4 +125,5 @@ html { 100% { transform: rotate(0); } -} \ No newline at end of file +} + diff --git a/wwwroot/js/vehicle.js b/wwwroot/js/vehicle.js index ff641cc..b4c76dd 100644 --- a/wwwroot/js/vehicle.js +++ b/wwwroot/js/vehicle.js @@ -22,7 +22,7 @@ $(document).ready(function () { getVehicleTaxRecords(vehicleId); break; case "report-tab": - getVehicleReport(); + getVehicleReport(vehicleId); break; case "reminder-tab": getVehicleReminders(vehicleId); @@ -115,8 +115,8 @@ function getVehicleReminders(vehicleId) { } }); } -function getVehicleReport() { - $.get(`/Vehicle/GetReportPartialView`, function (data) { +function getVehicleReport(vehicleId) { + $.get(`/Vehicle/GetReportPartialView?vehicleId=${vehicleId}`, function (data) { if (data) { $("#report-tab-pane").html(data); }