* Turned off Login as it is not working
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
@page "/CustomerOrder/{CustomerOrderId:guid}"
|
||||
|
||||
@attribute [Authorize]
|
||||
|
||||
@inject CustomerOrderService CustomerOrderService
|
||||
@inject ScheduleOrderService ScheduleOrderService
|
||||
@inject NavigationManager NavigationManager
|
||||
@@ -224,14 +222,14 @@
|
||||
StateHasChanged();
|
||||
_isVisible = false;
|
||||
|
||||
ClaimsPrincipal currentUser = CustomAuthenticationStateProvider.GetCurrentUser();
|
||||
|
||||
if (currentUser.Identity?.IsAuthenticated == false)
|
||||
{
|
||||
NavigationManager.NavigateTo("/Unauthorized");
|
||||
}
|
||||
else
|
||||
{
|
||||
// ClaimsPrincipal currentUser = CustomAuthenticationStateProvider.GetCurrentUser();
|
||||
//
|
||||
// if (currentUser.Identity?.IsAuthenticated == false)
|
||||
// {
|
||||
// NavigationManager.NavigateTo("/Unauthorized");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
CustomerOrderDto? customerOrder = await CustomerOrderService.GetCustomerOrderAsync(CustomerOrderId);
|
||||
|
||||
if (customerOrder != null)
|
||||
@@ -239,7 +237,9 @@
|
||||
CustomerOrderDto = customerOrder;
|
||||
_customerOrderLines = CustomerOrderDto.CustomerOrderLines.ToList() ?? [];
|
||||
}
|
||||
}
|
||||
|
||||
StateHasChanged();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user