@page "/user/hoteladmin/{id:guid}"
@using TIAMSharedUI.Shared
@using TIAMWebApp.Shared.Application.Interfaces;
@using TIAMSharedUI.Shared.Components.BaseComponents
@inherits UserBasePageComponent
@layout AdminLayout
@inject IUserDataService UserDataService
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();
}
}