FirstReportCards
This commit is contained in:
parent
83318a5c56
commit
08d0edf668
@ -142,7 +142,6 @@ namespace BankYouBankruptClientApp.Controllers
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Снятие средств
|
||||
|
||||
[HttpGet]
|
||||
@ -239,5 +238,18 @@ namespace BankYouBankruptClientApp.Controllers
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult ReportWithCards()
|
||||
{
|
||||
if (APIClient.Client == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
return View(new ReportClientCardsViewModel() {
|
||||
Cards = APIClient.GetRequest<List<CardViewModel>>($"api/Card/GetUsersCardsList?id={APIClient.Client.Id}")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
@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">
|
||||
@foreach (var item in Model.Cards)
|
||||
{
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault">
|
||||
<label class="form-check-label" for="flexSwitchCheckDefault">@item.Number</label>
|
||||
</div>
|
||||
|
||||
}
|
||||
</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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -24,19 +24,21 @@
|
||||
</a>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex flex-smrow-reverse">
|
||||
@{ if (authenticated) {
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="CardsList">Карты</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="DebitingList">Снятие средств</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="CreditingList">Пополнить средства</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
}
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="CardsList">Карты</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="DebitingList">Снятие средств</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="CreditingList">Пополнить средства</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="ReportWithCards">Отчет по картам</a>
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BankYouBankruptContracts.ViewModels
|
||||
{
|
||||
public class ReportClientCardsViewModel
|
||||
{
|
||||
public List<CardViewModel>? Cards { get; set; } = new();
|
||||
|
||||
public List<DebitingViewModel>? Debitings { get; set; } = new();
|
||||
|
||||
public List<CreditingViewModel>? Creditings { get; set; } = new();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user