From 75b0a8afe231e10d8d7f1f40dbee77c1540bedb8 Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Thu, 14 May 2026 21:00:43 -0400 Subject: [PATCH] Fix kiosk inactivity timer for remote sessions; make Intakes table mobile-responsive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remote sessions (customer's phone) no longer get the 45-second inactivity redirect that requires a KioskDevice cookie — would have landed them on an error page. Intakes staff table hides non-essential columns on small screens so the primary customer/status/actions columns are visible without horizontal scrolling. Co-Authored-By: Claude Sonnet 4.6 --- .../Controllers/KioskController.cs | 11 +++++-- .../Views/Kiosk/Intakes.cshtml | 32 +++++++++++-------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/PowderCoating.Web/Controllers/KioskController.cs b/src/PowderCoating.Web/Controllers/KioskController.cs index 0f18df7..bbbcb9b 100644 --- a/src/PowderCoating.Web/Controllers/KioskController.cs +++ b/src/PowderCoating.Web/Controllers/KioskController.cs @@ -916,8 +916,13 @@ public class KioskController : Controller ViewBag.SessionToken = session.SessionToken; ViewBag.SessionType = session.SessionType; - // Reset to Welcome screen after 45 s of inactivity on any intake step. - // The Welcome screen itself stays on indefinitely (no timeout override there). - ViewBag.InactivityTimeoutMs = 45_000; + // In-person kiosk: reset to Welcome screen after 45 s of inactivity so an + // abandoned tablet doesn't stay on a customer's half-filled form indefinitely. + // Remote sessions: customer is on their own phone — never redirect; they may + // take several minutes between steps and have no KioskDevice cookie anyway. + if (session.SessionType == KioskSessionType.InPerson) + ViewBag.InactivityTimeoutMs = 45_000; + else + ViewBag.ShowInactivityTimer = false; } } diff --git a/src/PowderCoating.Web/Views/Kiosk/Intakes.cshtml b/src/PowderCoating.Web/Views/Kiosk/Intakes.cshtml index bdc7955..ab84791 100644 --- a/src/PowderCoating.Web/Views/Kiosk/Intakes.cshtml +++ b/src/PowderCoating.Web/Views/Kiosk/Intakes.cshtml @@ -5,7 +5,7 @@ string activeFilter = ViewBag.ActiveFilter as string ?? "all"; } -
+
@@ -57,13 +57,13 @@ - + - - - + + + - + @@ -71,7 +71,7 @@ @foreach (var s in Model) { - - - - -
DateDate CustomerContactProjectTypeContactProjectType StatusSMSSMS Actions
+ @(s.SubmittedAt?.ToLocalTime().ToString("MM/dd/yy h:mm tt") ?? s.ExpiresAt.AddHours(-2).ToLocalTime().ToString("MM/dd/yy h:mm tt")) @@ -82,8 +82,12 @@ Customer matched } + @* Show date inline on mobile since the Date column is hidden *@ +
+ @(s.SubmittedAt?.ToLocalTime().ToString("MM/dd/yy h:mm tt") ?? s.ExpiresAt.AddHours(-2).ToLocalTime().ToString("MM/dd/yy h:mm tt")) +
+ @if (!string.IsNullOrEmpty(s.CustomerPhone)) {
@s.CustomerPhone
@@ -93,11 +97,11 @@
@s.CustomerEmail
}
+ @s.JobDescriptionSnippet + @if (s.SessionType == KioskSessionType.InPerson) { @@ -129,7 +133,7 @@ Expired } + @if (s.SmsOptIn) { @@ -143,19 +147,19 @@ @if (s.LinkedJobId.HasValue) { - View Job + View JobJob } @if (s.LinkedQuoteId.HasValue) { - View Quote + View QuoteQuote } @if (s.LinkedCustomerId.HasValue) { - Customer + Customer }