* Turned off Login as it is not working

This commit is contained in:
2025-03-01 06:35:28 +01:00
parent b8fbb789ad
commit f321677447
19 changed files with 122 additions and 154 deletions

View File

@@ -1,5 +1,4 @@
@page "/ScheduleOrder/{ScheduleOrderId:int}"
@attribute [Authorize]
@using System.Security.Claims
@using Microsoft.AspNetCore.Authorization
@@ -128,14 +127,14 @@
{
if (firstRender)
{
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
// {
ScheduleOrderDto = await ScheduleOrderService.GetScheduleOrderAsync(ScheduleOrderId);
_scheduleOrderDetails = ScheduleOrderDto?.ScheduleOrderDetails;
@@ -149,7 +148,7 @@
scheduleOrderDetailDto.RecipientName = ScheduleOrderDto?.RecipientName;
scheduleOrderDetailDto.PurchaserName = ScheduleOrderDto?.PurchaserCode;
}
}
// }
StateHasChanged();
}