Files
gpw_next/GPW.CORE.UI/Pages/ForceReset.razor
T
2022-01-26 14:38:18 +01:00

40 lines
808 B
Plaintext

@page "/ForceReset"
@attribute [Authorize]
@using CORE.Data.DbModels
@using UI.Data
@inject GpwDataService GDataServ
@inject NavigationManager NavManager
@inject MessageService AppMServ
<div class="card">
<div class="card-header">
Data Reset
</div>
<div class="card-body">
<h1>@message</h1>
<LoadingData></LoadingData>
</div>
</div>
@code {
protected string message = "Resetting Cache!";
protected override async Task OnInitializedAsync()
{
await GDataServ.InvalidateAllCache();
AppMServ.clonedRA = null;
AppMServ.recordRA = null;
//AppMServ.RigaDip = null;
message = "Reset done!";
// attendo 500 msec
await Task.Delay(500);
// passo a pagina home
NavManager.NavigateTo("Planner");
}
}