29 lines
938 B
C#
29 lines
938 B
C#
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.JSInterop;
|
|
using OI.Metrology.View.Models;
|
|
|
|
namespace OI.Metrology.View;
|
|
|
|
public partial class AwaitingDisposition
|
|
{
|
|
|
|
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
|
[Inject] protected HttpClient? HttpClient { get; set; }
|
|
[Inject] protected AppSettings? AppSettings { get; set; }
|
|
[Inject] protected ILogger<AwaitingDisposition>? Logger { get; set; }
|
|
|
|
protected override Task OnAfterRenderAsync(bool firstRender)
|
|
{
|
|
if (firstRender)
|
|
{
|
|
if (JSRuntime is null)
|
|
throw new NullReferenceException(nameof(JSRuntime));
|
|
if (AppSettings is null)
|
|
throw new NullReferenceException(nameof(AppSettings));
|
|
return JSRuntime.InvokeVoidAsync("initAwaitingDisposition", AppSettings.ApiUrl).AsTask();
|
|
}
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
} |