50 lines
1.1 KiB
Plaintext
50 lines
1.1 KiB
Plaintext
@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
|
|
<PageTitle>HotelAdmin</PageTitle>
|
|
|
|
<div class="text-center m-5">
|
|
<h1>Dashboard</h1>
|
|
<h2 style="font-size:small">Have a nice day!</h2>
|
|
</div>
|
|
|
|
<!--We need to check if the user is owner of a swerviceprovider-->
|
|
|
|
<div class="container-fluid">
|
|
|
|
<HotelComponent Id="@id"></HotelComponent>
|
|
|
|
<!-- Stats admin-->
|
|
<hr />
|
|
|
|
</div>
|
|
|
|
|
|
@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();
|
|
|
|
}
|
|
|
|
}
|
|
|