From c8915e86381d4975384b2ed74501d2b33f525fee Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 18 Jun 2026 19:46:27 -0400 Subject: [PATCH] refactor(centralui): add @namespace to KeysetPager/DateTimeRangeFilter + InvariantCulture parse (T35b/c review) --- .../Components/Shared/DateTimeRangeFilter.razor | 4 +++- .../Components/Shared/KeysetPager.razor | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Shared/DateTimeRangeFilter.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Shared/DateTimeRangeFilter.razor index 9c940f9d..68d6de2a 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Shared/DateTimeRangeFilter.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Shared/DateTimeRangeFilter.razor @@ -1,3 +1,5 @@ +@namespace ZB.MOM.WW.ScadaBridge.CentralUI.Components.Shared + @* Reusable from/to datetime-local input pair for filter bars. INPUT-ONLY: emits raw DateTime? (Unspecified kind) via FromChanged / ToChanged. UTC conversion is the caller's responsibility — no Apply button, no service injection. *@ @@ -52,6 +54,6 @@ if (string.IsNullOrWhiteSpace(raw)) return null; - return DateTime.TryParse(raw, out var dt) ? dt : null; + return DateTime.TryParse(raw, System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out var dt) ? dt : null; } } diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Shared/KeysetPager.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Shared/KeysetPager.razor index 586f2814..9587602d 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Shared/KeysetPager.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Shared/KeysetPager.razor @@ -1,3 +1,5 @@ +@namespace ZB.MOM.WW.ScadaBridge.CentralUI.Components.Shared + @* Reusable keyset (cursor) pagination button bar — purely presentational. All cursor/navigation logic lives in the consuming page via callbacks. *@