mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
Подготовил проект к работе
This commit is contained in:
1 parent
213c590e95
commit
3d043f0016
50 files changed
+22
-7413
No files matched your search
@@ -1,45 +1,8 @@
|
||||
@page "/"
|
||||
@page "/Dashboard"
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@attribute [Authorize(Roles = "Administrator")]
|
||||
|
||||
@inject HttpClient httpClient
|
||||
|
||||
<RadzenCard Variant="Variant.Flat">
|
||||
<RadzenStack>
|
||||
<RadzenLabel />
|
||||
<RadzenChart>
|
||||
<RadzenAreaSeries Smooth="false"
|
||||
Data="@dataPerPrinteds"
|
||||
Interpolation="Interpolation.Spline"
|
||||
CategoryProperty="DateString"
|
||||
LineType="LineType.Solid"
|
||||
ValueProperty="countPrinted"
|
||||
Title="Страниц распечатано">
|
||||
<RadzenCategoryAxis LabelRotation="45"/>
|
||||
<RadzenLegend Visible="false"/>
|
||||
<RadzenMarkers Visible="true" MarkerType="MarkerType.Auto"/>
|
||||
<RadzenSeriesDataLabels Visible="@(dataPerPrinteds?.Any() ?? false)" />
|
||||
</RadzenAreaSeries>
|
||||
</RadzenChart>
|
||||
</RadzenStack>
|
||||
</RadzenCard>
|
||||
@page "/"
|
||||
@page "/dashboard"
|
||||
|
||||
<h3>Dashboard</h3>
|
||||
|
||||
@code {
|
||||
List<DTOs.PrinterCounterRecord.noId>? dataPerPrinteds;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var response = await httpClient.GetAsync(ApiRoutes.Report.GetReportToDatePerCountPrinted);
|
||||
dataPerPrinteds = JsonConvert.DeserializeObject<List<DTOs.PrinterCounterRecord.noId>>(await response.Content.ReadAsStringAsync());
|
||||
|
||||
dataPerPrinteds = dataPerPrinteds?.OrderBy(x => x.date).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user