This commit is contained in:
@@ -1,7 +1,21 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using TaxBaik.Application.Services;
|
||||
using TaxBaik.Domain.Entities;
|
||||
using TaxBaik.Web.Services;
|
||||
namespace TaxBaik.Web.Pages.Admin.Inquiries;
|
||||
[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
|
||||
public class IndexModel : PageModel { }
|
||||
|
||||
namespace TaxBaik.Web.Pages.Admin.Inquiries;
|
||||
|
||||
[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
|
||||
public class IndexModel(InquiryService inquiryService) : PageModel
|
||||
{
|
||||
public List<Inquiry> Items { get; private set; } = [];
|
||||
public string? Status { get; set; }
|
||||
|
||||
public async Task OnGetAsync(string? status = null, CancellationToken ct = default)
|
||||
{
|
||||
Status = status;
|
||||
var (items, _) = await inquiryService.GetPagedAsync(1, 100, status, ct);
|
||||
Items = items.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user