45 lines
1.0 KiB
Plaintext
45 lines
1.0 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 required Guid Id { get; set; }
|
|
|
|
// bool _isUserLoggedIn;
|
|
// int _userType = 0;
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
if (!_sessionService.IsAuthenticated) return;
|
|
|
|
var check = _sessionService.User?.UserModelDto.UserProductMappings.Any(x => x.ProductId == Id) ?? false;
|
|
if (!check) return;
|
|
|
|
base.OnInitialized();
|
|
}
|
|
|
|
}
|
|
|