From 39d152ca4854efb51c6f1791f0b63f7fc831176e Mon Sep 17 00:00:00 2001 From: Daniel Wathen Date: Thu, 26 Jan 2023 15:05:27 -0700 Subject: [PATCH] Made breadcrumbs dynamic and moved it to a shared partial view. --- .../HelperClasses/APIHelperFunctions.cs | 14 +++++++++- ReportingServices.UI/Views/Home/Index.cshtml | 7 +---- .../Views/PlanningReport/Index.cshtml | 8 +----- .../WeeklyPartChangesReport.cshtml | 9 +------ .../Views/ProductionReport/DailyReport.cshtml | 9 +------ .../ProductionReport/EditDailyReport.cshtml | 9 +------ .../ProductionReport/HoldLotReport.cshtml | 9 +------ .../Views/ProductionReport/Index.cshtml | 8 +----- .../Views/ProductionReport/NCRReport.cshtml | 9 +------ .../Views/Shared/_BreadCrumbs.cshtml | 26 +++++++++++++++++++ .../Views/_ViewImports.cshtml | 1 + .../wwwroot/Assets/SLLTools.json | 2 +- ReportingServices.UI/wwwroot/css/site.css | 21 +++++++++++++++ 13 files changed, 70 insertions(+), 62 deletions(-) create mode 100644 ReportingServices.UI/Views/Shared/_BreadCrumbs.cshtml diff --git a/ReportingServices.Shared/HelperClasses/APIHelperFunctions.cs b/ReportingServices.Shared/HelperClasses/APIHelperFunctions.cs index 0ca641b..fe17a22 100644 --- a/ReportingServices.Shared/HelperClasses/APIHelperFunctions.cs +++ b/ReportingServices.Shared/HelperClasses/APIHelperFunctions.cs @@ -1,4 +1,6 @@ -namespace ReportingServices.Shared.HelperClasses; +using System.Text.RegularExpressions; + +namespace ReportingServices.Shared.HelperClasses; public static class APIHelperFunctions { @@ -50,4 +52,14 @@ public static class APIHelperFunctions return temp; } + + public static string SplitOnCamelCase(string input) + { + Regex r = new(@" + (?<=[A-Z])(?=[A-Z][a-z]) | + (?<=[^A-Z])(?=[A-Z]) | + (?<=[A-Za-z])(?=[^A-Za-z])", RegexOptions.IgnorePatternWhitespace); + + return r.Replace(input, " "); + } } \ No newline at end of file diff --git a/ReportingServices.UI/Views/Home/Index.cshtml b/ReportingServices.UI/Views/Home/Index.cshtml index 89e3f69..847ad7f 100644 --- a/ReportingServices.UI/Views/Home/Index.cshtml +++ b/ReportingServices.UI/Views/Home/Index.cshtml @@ -2,12 +2,7 @@ ViewData["Title"] = "Home Page | Mesa Reporting Services"; } -
- -
-
+
diff --git a/ReportingServices.UI/Views/PlanningReport/Index.cshtml b/ReportingServices.UI/Views/PlanningReport/Index.cshtml index d621956..7e4176a 100644 --- a/ReportingServices.UI/Views/PlanningReport/Index.cshtml +++ b/ReportingServices.UI/Views/PlanningReport/Index.cshtml @@ -2,13 +2,7 @@ ViewData["Title"] = "Planning Reports | Mesa Reporting Services"; } -
- -
-
+
diff --git a/ReportingServices.UI/Views/PlanningReport/WeeklyPartChangesReport.cshtml b/ReportingServices.UI/Views/PlanningReport/WeeklyPartChangesReport.cshtml index 32c200e..f9be3e1 100644 --- a/ReportingServices.UI/Views/PlanningReport/WeeklyPartChangesReport.cshtml +++ b/ReportingServices.UI/Views/PlanningReport/WeeklyPartChangesReport.cshtml @@ -4,14 +4,7 @@ ViewData["Title"] = "Weekly Part Changes | Mesa Reporting Services"; } -
- -
-
+

Weekly Part Changes

diff --git a/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml b/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml index 5d3f86e..033b488 100644 --- a/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml +++ b/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml @@ -23,14 +23,7 @@ ViewData["Title"] = "Daily Passdown | Mesa Reporting Services"; } -
- -
-
+

Daily Report

diff --git a/ReportingServices.UI/Views/ProductionReport/EditDailyReport.cshtml b/ReportingServices.UI/Views/ProductionReport/EditDailyReport.cshtml index 3bb5775..cb59cc6 100644 --- a/ReportingServices.UI/Views/ProductionReport/EditDailyReport.cshtml +++ b/ReportingServices.UI/Views/ProductionReport/EditDailyReport.cshtml @@ -4,14 +4,7 @@ ViewData["Title"] = "Edit Daily Passdown | Mesa Reporting Services"; } -
- -
-
+
diff --git a/ReportingServices.UI/Views/ProductionReport/HoldLotReport.cshtml b/ReportingServices.UI/Views/ProductionReport/HoldLotReport.cshtml index 3f4cef6..f614a32 100644 --- a/ReportingServices.UI/Views/ProductionReport/HoldLotReport.cshtml +++ b/ReportingServices.UI/Views/ProductionReport/HoldLotReport.cshtml @@ -4,14 +4,7 @@ ViewData["Title"] = "Hold Lot Report | Mesa Reporting Services"; } -
- -
-
+

Hold Lots



diff --git a/ReportingServices.UI/Views/ProductionReport/Index.cshtml b/ReportingServices.UI/Views/ProductionReport/Index.cshtml index 97ef8aa..70dad3f 100644 --- a/ReportingServices.UI/Views/ProductionReport/Index.cshtml +++ b/ReportingServices.UI/Views/ProductionReport/Index.cshtml @@ -2,13 +2,7 @@ ViewData["Title"] = "Production Reports | Mesa Reporting Services"; } -
- -
-
+
diff --git a/ReportingServices.UI/Views/ProductionReport/NCRReport.cshtml b/ReportingServices.UI/Views/ProductionReport/NCRReport.cshtml index f871115..fd9c0d8 100644 --- a/ReportingServices.UI/Views/ProductionReport/NCRReport.cshtml +++ b/ReportingServices.UI/Views/ProductionReport/NCRReport.cshtml @@ -4,14 +4,7 @@ ViewData["Title"] = "Open NCR Report | Mesa Reporting Services"; } -
- -
-
+

Open NCRs


diff --git a/ReportingServices.UI/Views/Shared/_BreadCrumbs.cshtml b/ReportingServices.UI/Views/Shared/_BreadCrumbs.cshtml new file mode 100644 index 0000000..cea5cfb --- /dev/null +++ b/ReportingServices.UI/Views/Shared/_BreadCrumbs.cshtml @@ -0,0 +1,26 @@ +@{ + string myClass = ""; +} + +
+ +
+
\ No newline at end of file diff --git a/ReportingServices.UI/Views/_ViewImports.cshtml b/ReportingServices.UI/Views/_ViewImports.cshtml index 3a4ecb3..2cf1841 100644 --- a/ReportingServices.UI/Views/_ViewImports.cshtml +++ b/ReportingServices.UI/Views/_ViewImports.cshtml @@ -3,4 +3,5 @@ @using ReportingServices.Shared.Models.PlanningReport @using ReportingServices.Shared.Models.ProductionReport @using ReportingServices.Shared.ViewModels.ProductionReport +@using ReportingServices.Shared.HelperClasses @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/ReportingServices.UI/wwwroot/Assets/SLLTools.json b/ReportingServices.UI/wwwroot/Assets/SLLTools.json index c8ea3d9..61d6446 100644 --- a/ReportingServices.UI/wwwroot/Assets/SLLTools.json +++ b/ReportingServices.UI/wwwroot/Assets/SLLTools.json @@ -1 +1 @@ -[{"Date":"2023-01-23T00:00:00-07:00","ASM":7,"HTR":16},{"Date":"2023-01-24T00:00:00-07:00","ASM":7,"HTR":15}] \ No newline at end of file +[{"Date":"2023-01-23T00:00:00-07:00","ASM":7,"HTR":16},{"Date":"2023-01-24T00:00:00-07:00","ASM":7,"HTR":15},{"Date":"2023-01-26T00:00:00-07:00","ASM":7,"HTR":14}] \ No newline at end of file diff --git a/ReportingServices.UI/wwwroot/css/site.css b/ReportingServices.UI/wwwroot/css/site.css index 7b16ee2..401957c 100644 --- a/ReportingServices.UI/wwwroot/css/site.css +++ b/ReportingServices.UI/wwwroot/css/site.css @@ -104,4 +104,25 @@ body { .tableDowntime { color: rgb(212, 111, 35); background-color: rgba(212, 111, 35, 0.3); +} + +.disableLink a:link { + color: grey; + text-decoration: none; +} + +.disableLink a:visited { + color: grey; + text-decoration: none; +} + +.disableLink a:hover { + color: grey; + text-decoration: none; + cursor: default; +} + +.disableLink a:active { + color: grey; + text-decoration: none; } \ No newline at end of file