TourIAm/TIAMSharedUI/Pages/User/Admin.razor

126 lines
4.1 KiB
Plaintext

@page "/user/admin"
@using Microsoft.AspNetCore.Authorization
@using TIAM.Models.Dtos.Users
@using TIAMSharedUI.Shared
@using TIAMWebApp.Shared.Application.Interfaces;
@using TIAMSharedUI.Shared.Components.BaseComponents
@inherits UserBasePageComponent
@layout AdminLayout
@inject IPopulationStructureDataProvider DataProvider
@inject ISupplierService SupplierService
@inject IUserDataService UserDataService
<PageTitle>Administration</PageTitle>
<div class="text-center m-5">
<h1>Control panel</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">
<div class="row py-3">
<div class=" col-12 col-xl-12">
<div class="p-5 text-center">
<h1 class="mb-3">Welcome @myUser.UserDto.EmailAddress</h1>
<h4 class="mb-3">Good to see you here :)</h4>
<a data-mdb-ripple-init class="btn btn-primary" href="" role="button">Call to action</a>
</div>
</div>
<div class=" col-12 col-xl-3">
<div class="card">
<div class="card-header py-2 px-4">
<div class="d-flex justify-content-between align-items-center">
<div>
<span class="fw-bold text-body">Overview</span>
<p class="text-muted mb-0">Your transfers and such</p>
</div>
</div>
</div>
<div class="card-body card-admin-body py-2 px-4">
<div class="d-flex flex-row mb-4 pb-2">
<div class="flex-fill">
<h5 class="bold">Upcoming transfers</h5>
<p class="text-muted">You have 0 upcoming transfers</p>
</div>
<div>
<!--img class="align-self-center img-fluid"
src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
</div>
</div>
<div class="d-flex flex-row mb-4 pb-2">
<div class="flex-fill">
<h5 class="bold">Companies</h5>
<p class="text-muted">You have 0 companies</p>
</div>
<div>
<!--img class="align-self-center img-fluid"
src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
</div>
</div>
<div class="d-flex flex-row mb-4 pb-2">
<div class="flex-fill">
<h5 class="bold">Hotels</h5>
<p class="text-muted">You have 0 hotels</p>
</div>
<div>
<!--img class="align-self-center img-fluid"
src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
</div>
</div>
<div class="d-flex flex-row mb-4 pb-2">
<h4> Some <span class="small text-muted"> conclusion </span></h4>
</div>
</div>
<div class="card-footer py-2 px-4">
<div class="d-flex justify-content-between">
<a href="#!">Modify</a>
<div class="border-start h-100"></div>
</div>
</div>
</div>
</div>
</div>
</div>
@code {
bool isUserLoggedIn;
int userType = 0;
private UserModelDtoDetail? myUser;
protected override async Task OnInitializedAsync()
{
if(_sessionService.User != null)
{
myUser = _sessionService.User.UserModelDto;
}
await base.OnInitializedAsync();
}
}