mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
Начал работу над списко принтеров
This commit is contained in:
1 parent
24adf91ad9
commit
a21834508d
11 files changed
+92
-20
No files matched your search
@@ -1,6 +1,7 @@
|
||||
@page "/Printers"
|
||||
@using CartriX.Web.Pages.PrintersPage.Components
|
||||
@inject HttpClient http
|
||||
@inject IJSRuntime JS
|
||||
|
||||
<style>
|
||||
.printer-grid {
|
||||
@@ -12,14 +13,34 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
@if (isPhone)
|
||||
{
|
||||
<RadzenFab Icon="add" Text="Добавить принтер" />
|
||||
}
|
||||
|
||||
|
||||
<RadzenStack AlignItems="AlignItems.Stretch">
|
||||
<RadzenCard Style="padding: 8px;">
|
||||
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.SpaceBetween">
|
||||
<RadzenText Text="Местоположения" TextStyle="TextStyle.DisplayH5" />
|
||||
@if (!isPhone)
|
||||
{
|
||||
<RadzenButton Text="Добавить принтер"/>
|
||||
}
|
||||
</RadzenStack>
|
||||
</RadzenCard>
|
||||
@foreach (var location in locationItems)
|
||||
{
|
||||
<RadzenPanel AllowCollapse="true" Style="padding: 8px;">
|
||||
<RadzenPanel AllowCollapse="true" Collapsed="true" Style="padding: 8px;">
|
||||
<HeaderTemplate>
|
||||
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center">
|
||||
<RadzenText Text="@($"{location.Name}")" TextStyle="TextStyle.DisplayH6" />
|
||||
<RadzenBadge Text="@($"Количесво принтеров: {location.Printers.Count}")" />
|
||||
<RadzenStack Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.SpaceBetween">
|
||||
<RadzenStack Orientation="Orientation.Vertical" Gap="8">
|
||||
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" Gap="8">
|
||||
<RadzenIcon Icon="deployed_code" />
|
||||
<RadzenText Text="@($"{location.Name}")" TextStyle="TextStyle.DisplayH6" />
|
||||
</RadzenStack>
|
||||
<RadzenBadge Text="@($"Количесво принтеров: {location.Printers.Count}")" Style="margin-right: 8px" />
|
||||
</RadzenStack>
|
||||
</RadzenStack>
|
||||
</HeaderTemplate>
|
||||
<ChildContent>
|
||||
@@ -35,12 +56,15 @@
|
||||
</RadzenStack>
|
||||
|
||||
@code {
|
||||
|
||||
List<Shared.Models.Location.LocationItem> locationItems = new();
|
||||
bool isPhone = false;
|
||||
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
isPhone = await JS.InvokeAsync<bool>("getDeviceInfo");
|
||||
await GetLocations();
|
||||
|
||||
}
|
||||
|
||||
async Task GetLocations()
|
||||
|
||||
Reference in new issue
Block a user