You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
832 B
C#
28 lines
832 B
C#
using Expedience.Infrastructure;
|
|
using Expedience.Infrastructure.Models;
|
|
using Expedience.Web.Services;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using System.Diagnostics;
|
|
using static System.Runtime.InteropServices.JavaScript.JSType;
|
|
|
|
namespace Expedience.Web.Pages
|
|
{
|
|
public class IndexModel : PageModel
|
|
{
|
|
private readonly IApiService _apiService;
|
|
|
|
public List<DutyCompletionRecord>? DutyCompletionRecords { get; private set; }
|
|
|
|
public IndexModel(IApiService apiService)
|
|
{
|
|
_apiService = apiService;
|
|
}
|
|
|
|
public async Task OnGet(string? expac, CancellationToken cancellationToken)
|
|
{
|
|
if (expac == null) expac = "EW";
|
|
|
|
DutyCompletionRecords = await _apiService.GetDutyCompletionRecordsAsync(expac, cancellationToken);
|
|
}
|
|
}
|
|
} |