Fix kiosk intake routing, view names, and SignalR diagnostics
Three bugs identified:
1. Routing: /Kiosk/Intake/{token}/{action} had no matching route — 4-segment
URL fell through the default 3-segment {controller}/{action}/{id?} route.
Added explicit kiosk_intake route in Program.cs.
2. View names: Contact/Job/Terms/Confirmation actions returned View(model)
which resolved to Views/Kiosk/{Action}.cshtml — those files don't exist.
Views live in Views/Kiosk/Intake/. Fixed all six return statements.
3. Diagnostics: conn dot now starts gray ("Connecting...") and turns green
only when SignalR actually connects. Red + message if no company ID or
connection fails. Makes it easy to confirm the hub connection is live.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -727,6 +727,12 @@ app.UseMiddleware<PowderCoating.Web.Middleware.MustChangePasswordMiddleware>();
|
||||
// Track authenticated user presence (throttled, in-memory)
|
||||
app.UseMiddleware<PowderCoating.Web.Middleware.OnlineUserMiddleware>();
|
||||
|
||||
// Kiosk intake steps use /Kiosk/Intake/{token}/{action} so the token is a path segment
|
||||
app.MapControllerRoute(
|
||||
name: "kiosk_intake",
|
||||
pattern: "Kiosk/Intake/{token}/{action}",
|
||||
defaults: new { controller = "Kiosk" });
|
||||
|
||||
app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
Reference in New Issue
Block a user