This commit is contained in:
Programmist73 2023-05-18 00:48:07 +04:00
commit 1d17a40c17
3 changed files with 89 additions and 1 deletions

View File

@ -447,5 +447,18 @@ namespace BankYouBankruptCashierApp.Controllers
Response.Redirect("Index");
}
[HttpGet]
public IActionResult ReportWithAccounts()
{
if (APICashier.Cashier == null)
{
return Redirect("~/Home/Enter");
}
ViewBag.Accounts = APICashier.GetRequest<List<AccountViewModel>>("/api/Account/GetAllAccounts");
return View();
}
}
}

View File

@ -0,0 +1,60 @@
@using BankYouBankruptContracts.ViewModels
@model ReportClientCardsViewModel
@{
ViewData["Title"] = "Отчет по аккаунтам";
}
<div class="text-center">
<h1 class="display-4">Отчет</h1>
</div>
<div class="container" sf-type="container" sf-label="Bootstrap Container" sf-uid="2">
<div class="row" sf-type="container" sf-label="Row" sf-uid="3">
<div class="mb-4 mb-md-0 aos-init aos-animate col-md-3" sf-type="container" sf-label="Column" sf-anim-delay="1.5" data-aos="fade-down" data-aos-delay="400" sf-uid="4">
<div sf-type="container" sf-label="Container" class="py-15 h-100 bg-bg-2" sf-uid="5">
<form method="post">
<select id="accountId" name="accountId" class="form-control" asp-items="@(new SelectList(ViewBag.Accounts, "Id", "AccountNumber"))">
<option disabled selected>Выберите счёт</option>
</select>
<div>
<input class="btn btn-primary mt-3" type="submit" value="Submit" />
</div>
</form>
</div>
</div>
<div class="aos-init aos-animate col-md" sf-type="container" sf-label="Column" sf-anim-delay="2" data-aos="fade-down" data-aos-delay="500" sf-uid="8">
<div sf-type="container" sf-label="Container" class="py-15 h-100 bg-bg-2" sf-uid="9">
<table class="table">
<thead>
<tr>
<th>
Номер карты
</th>
<th>
Тип операции
</th>
<th>
Сумма
</th>
<th>
Статус
</th>
<th>
Дата открытия
</th>
<th>
Дата закрытия
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankYouBankruptContracts.ViewModels
{
public class ReportCashierAccountsViewModel
{
public List<CheckboxViewModel>? Accounts { get; set; } = new();
public List<ReportViewModel>? Operations { get; set; } = new();
}
}