@page "/user/hoteladmin/{id:guid}"
@using TIAMSharedUI.Shared
@using TIAMWebApp.Shared.Application.Interfaces;
@layout AdminLayout
@inject IUserDataService UserDataService
@inject ISessionService SessionService
HotelAdmin
Dashboard
Have a nice day!
@code {
[Parameter] public Guid id { get; set; }
bool isUserLoggedIn;
int userType = 0;
protected override void OnInitialized()
{
//check if Id matches with userproductmapping
if (!SessionService.IsAuthenticated)
{
return;
}
var check = SessionService.User.UserModelDto.UserProductMappings.Any(x => x.ProductId == id);
if (!check)
{
return;
}
base.OnInitialized();
}
}