diff --git a/CulinaryCommandApp/Components/Pages/Assignments/AdminAssignTask.razor b/CulinaryCommandApp/Components/Pages/Assignments/AdminAssignTask.razor index 3b73c89..9480631 100644 --- a/CulinaryCommandApp/Components/Pages/Assignments/AdminAssignTask.razor +++ b/CulinaryCommandApp/Components/Pages/Assignments/AdminAssignTask.razor @@ -4,13 +4,16 @@ @using CulinaryCommand.Services @using CulinaryCommand.Data.Enums; @using CulinaryCommand.Services.UserContextSpace +@using CulinaryCommandApp.Recipe.Services; +@using CulinaryCommandApp.Recipe.Services.Interfaces; +@using CulinaryCommandApp.Recipe.Entities; @inject IUserContextService UserCtx @inject NavigationManager Nav @inject ILocationService LocationService @inject IUserService UserService @inject LocationState LocationState @inject ITaskAssignmentService TaskService -@inject RecipeService RecipeService +@inject IRecipeService RecipeService @implements IDisposable @rendermode InteractiveServer @@ -346,11 +349,8 @@ else try { - var all = await RecipeService.GetAllAsync(); - recipes = all - .Where(r => r.LocationId == selectedLocationId.Value) - .OrderBy(r => r.Title) - .ToList(); + recipes = await RecipeService.GetAllByLocationIdAsync(selectedLocationId.Value); + recipes = recipes.OrderBy(r => r.Title).ToList(); } catch { diff --git a/CulinaryCommandApp/Components/Pages/EmployeeView.razor b/CulinaryCommandApp/Components/Pages/EmployeeView.razor new file mode 100644 index 0000000..82f700d --- /dev/null +++ b/CulinaryCommandApp/Components/Pages/EmployeeView.razor @@ -0,0 +1,64 @@ +@rendermode InteractiveServer + +@using CulinaryCommand.Components.Custom +@using CulinaryCommand.Services.UserContextSpace +@using CulinaryCommand.Services + +@inject IUserContextService UserCtx +@inject LocationState LocationState + +
No location assigned. Please contact your manager.
+ } + else + { +Welcome to @LocationState.CurrentLocation.Name.
+ +Loading...
-} -else -{ -Loading...
-} -else -{ -| Title | -Category | -Type | -Yield | -- |
|---|---|---|---|---|
| @r.Title | -@r.Category | -@r.RecipeType | -@FormatYield(r) | -- - @if (priv) - { - - - } - | -
Loading...
- } - else - { -No ingredients added.
- } - else - { -No steps added.
- } - else - { -| Name | +Abbreviation | ++ |
|---|---|---|
| @unit.Name | +@unit.Abbreviation | ++ + | +
Manage your ingredient catalog
+@(LocationState.CurrentLocation is not null ? $"{LocationState.CurrentLocation.Name} β ingredient catalog" : "Manage your ingredient catalog")