105 lines
3.2 KiB
Plaintext
105 lines
3.2 KiB
Plaintext
@page "/performance"
|
|
@using Microsoft.AspNetCore.Authorization
|
|
@using Indotalent.Infrastructure.Authorization.Identity
|
|
@attribute [Authorize(Roles = $"{ApplicationRoles.Admin},{ApplicationRoles.Member}")]
|
|
@using Indotalent.Features.Performance.Appraisal.Components
|
|
@using Indotalent.Features.Performance.Evaluation
|
|
@using Indotalent.Features.Performance.Appraisal
|
|
@using Indotalent.Features.Performance.Evaluation.Components
|
|
@using Indotalent.Features.Performance.Promotion
|
|
@using Indotalent.Features.Performance.Promotion.Components
|
|
@using Indotalent.Features.Performance.Transfer
|
|
@using Indotalent.Features.Performance.Transfer.Components
|
|
@using MudBlazor
|
|
@inject NavigationManager NavigationManager
|
|
|
|
<style>
|
|
.clean-white-tabs .mud-tabs-toolbar {
|
|
background-color: white !important;
|
|
border-bottom: 2px solid #DCEBFA;
|
|
border-radius: 0px !important;
|
|
}
|
|
|
|
.clean-white-tabs .mud-tab {
|
|
color: #94a3b8 !important;
|
|
text-transform: none;
|
|
font-weight: 500;
|
|
min-width: 150px;
|
|
border-radius: 0px !important;
|
|
}
|
|
|
|
.clean-white-tabs .mud-tab-active {
|
|
color: var(--mud-palette-primary) !important;
|
|
font-weight: 800;
|
|
}
|
|
|
|
.clean-white-tabs .mud-tabs-slider {
|
|
background-color: var(--mud-palette-primary) !important;
|
|
height: 3px !important;
|
|
bottom: 0;
|
|
}
|
|
</style>
|
|
|
|
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="mt-2 mb-8">
|
|
|
|
<div class="clean-white-tabs">
|
|
<MudTabs Elevation="0"
|
|
ActivePanelIndex="@_activeTabIndex"
|
|
ActivePanelIndexChanged="OnTabChanged"
|
|
ApplyEffectsToContainer="true"
|
|
TabPanelsClass="pt-4">
|
|
|
|
<MudTabPanel Text="Evaluation" Icon="@Icons.Material.Outlined.RateReview">
|
|
<EvaluationPage />
|
|
</MudTabPanel>
|
|
|
|
<MudTabPanel Text="Appraisal" Icon="@Icons.Material.Outlined.MonetizationOn">
|
|
<AppraisalPage />
|
|
</MudTabPanel>
|
|
|
|
<MudTabPanel Text="Promotion" Icon="@Icons.Material.Outlined.TrendingUp">
|
|
<PromotionPage />
|
|
</MudTabPanel>
|
|
|
|
<MudTabPanel Text="Transfer" Icon="@Icons.Material.Outlined.SwapHoriz">
|
|
<TransferPage />
|
|
</MudTabPanel>
|
|
|
|
</MudTabs>
|
|
</div>
|
|
</MudContainer>
|
|
|
|
@code {
|
|
private int _activeTabIndex = 0;
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
var uri = NavigationManager.ToAbsoluteUri(NavigationManager.Uri);
|
|
if (Microsoft.AspNetCore.WebUtilities.QueryHelpers.ParseQuery(uri.Query).TryGetValue("tab", out var tabValue))
|
|
{
|
|
_activeTabIndex = tabValue.ToString().ToLower() switch
|
|
{
|
|
"evaluation" => 0,
|
|
"appraisal" => 1,
|
|
"promotion" => 2,
|
|
"transfer" => 3,
|
|
_ => 0
|
|
};
|
|
}
|
|
}
|
|
|
|
private void OnTabChanged(int index)
|
|
{
|
|
_activeTabIndex = index;
|
|
string tabName = index switch
|
|
{
|
|
0 => "evaluation",
|
|
1 => "appraisal",
|
|
2 => "promotion",
|
|
3 => "transfer",
|
|
_ => "evaluation"
|
|
};
|
|
|
|
NavigationManager.NavigateTo($"/performance?tab={tabName}", replace: false);
|
|
}
|
|
} |