mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 04:20:55 +00:00
27 lines
511 B
Plaintext
27 lines
511 B
Plaintext
@page "/PrinterPage/{PrinterId:int}"
|
|
@using CartriX.Shared.Models
|
|
@using CartriX.Shared.RequestsToApi
|
|
|
|
@if (printer is null)
|
|
{
|
|
<h1>Loading...</h1>
|
|
}
|
|
else
|
|
{
|
|
<h1>@printer.PrinterName</h1>
|
|
}
|
|
|
|
@code {
|
|
[Parameter] public int PrinterId { get; set; }
|
|
private Printer? printer;
|
|
|
|
protected override async Task OnParametersSetAsync()
|
|
{
|
|
if (PrinterId > 0)
|
|
{
|
|
printer = await PrinterApiRequest.PrinterByIdAsync(PrinterId);
|
|
StateHasChanged();
|
|
}
|
|
}
|
|
}
|