diff --git a/CulinaryCommandApp/Components/Layout/Home.razor b/CulinaryCommandApp/Components/Layout/Home.razor
index f14e477..45089f5 100644
--- a/CulinaryCommandApp/Components/Layout/Home.razor
+++ b/CulinaryCommandApp/Components/Layout/Home.razor
@@ -231,7 +231,13 @@
var ctx = await UserCtx.GetAsync();
if (ctx.User?.Id != null)
{
- Nav.NavigateTo("/dashboard", forceLoad: true);
+ if (ctx.User?.Role == "Employee") {
+ Nav.NavigateTo("/tasks");
+ }
+ else {
+ Console.WriteLine("DEBUG: dashboard nav. Role: " + ctx.User?.Role);
+ Nav.NavigateTo("/dashboard", forceLoad: true);
+ }
}
}
}
diff --git a/CulinaryCommandApp/Components/Layout/NavMenu.razor b/CulinaryCommandApp/Components/Layout/NavMenu.razor
index 399dd38..0b05486 100644
--- a/CulinaryCommandApp/Components/Layout/NavMenu.razor
+++ b/CulinaryCommandApp/Components/Layout/NavMenu.razor
@@ -20,80 +20,67 @@
Purchase Orders
-
}
+ @* all users have access for now *@
+
+
+ MarginEdge
+
+
diff --git a/CulinaryCommandApp/Components/Pages/EmployeeView.razor b/CulinaryCommandApp/Components/Pages/EmployeeView.razor
deleted file mode 100644
index 4de9701..0000000
--- a/CulinaryCommandApp/Components/Pages/EmployeeView.razor
+++ /dev/null
@@ -1,35 +0,0 @@
-@rendermode InteractiveServer
-@implements IDisposable
-
-
Employee Dashboard
-
Welcome,
-
-
- - View your active tasks and prep items
- - Check your assigned location:
- - Submit updates to your manager
-
-
-
-@code {
- [Inject] private CulinaryCommand.Services.LocationState LocationState { get; set; } = default!;
-
- private async void HandleLocationStateChanged()
- {
- await InvokeAsync(async () =>
- {
- StateHasChanged();
- });
- }
-
- protected override void OnInitialized()
- {
- // Subscribe to the change event
- LocationState.OnChange += HandleLocationStateChanged;
- }
-
- public void Dispose()
- {
- LocationState.OnChange -= HandleLocationStateChanged;
- }
-}
diff --git a/CulinaryCommandApp/Components/Pages/PostLogin.razor b/CulinaryCommandApp/Components/Pages/PostLogin.razor
index c438889..539d719 100644
--- a/CulinaryCommandApp/Components/Pages/PostLogin.razor
+++ b/CulinaryCommandApp/Components/Pages/PostLogin.razor
@@ -62,7 +62,13 @@
// JS-safe now (we're in OnAfterRender)
await LocationState.SetLocationsAsync(ctx.AccessibleLocations);
- var target = (ctx.AccessibleLocations?.Any() == true) ? "/dashboard" : "/onboarding";
+ var target = (ctx.AccessibleLocations?.Any() == false) ? "/onboarding" : "/dashboard";
+ if (target == "/dashboard") {
+ if (ctx.User?.Role == "Employee") {
+ target = "/tasks";
+ }
+ }
+
status = $"Redirecting to {target}…";
StateHasChanged();