This commit is contained in:
shadowik 2023-05-17 13:47:31 +04:00
commit 1f9307fb0e
5 changed files with 103 additions and 4 deletions

View File

@ -33,8 +33,6 @@ namespace BankYouBankruptCashierApp
{ {
throw new Exception(result); throw new Exception(result);
} }
return JsonConvert.DeserializeObject<T>("");
} }
//Post-запрос //Post-запрос

View File

@ -234,5 +234,29 @@ namespace BankYouBankruptCashierApp.Controllers
return View(APICashier.GetRequest<List<DebitingViewModel>>($"/api/Account/FindOpenDebiting")); return View(APICashier.GetRequest<List<DebitingViewModel>>($"/api/Account/FindOpenDebiting"));
} }
//для страницы "Заявки на зачисление"
[HttpGet]
public IActionResult Crediting()
{
if (APICashier.Cashier == null)
{
throw new Exception("Вы как сюда попали? Суда вход только авторизованным");
}
return View(APICashier.GetRequest<List<CreditingViewModel>>($"/api/Account/FindOpenCrediting"));
}
//для страницы "Переводы"
[HttpGet]
public IActionResult MoneyTransfers()
{
if (APICashier.Cashier == null)
{
throw new Exception("Вы как сюда попали? Суда вход только авторизованным");
}
return View(APICashier.GetRequest<List<DebitingViewModel>>($"/api/Account/FindOpenDebiting"));
}
} }
} }

View File

@ -0,0 +1,67 @@
@using BankYouBankruptContracts.ViewModels
@model List<CreditingViewModel>
@{
ViewData["Title"] = "Заявки на зачисление";
}
<div class="text-center">
<h1 class="display-4">Заявки</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Сначала авторизируйтесь</h3>
return;
}
<p>
<a asp-action="Create">Одобрение заявки</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер заявки
</th>
<th>
Номер карты
</th>
<th>
Сумма зачисления
</th>
<th>
Дата открытия заявки
</th>
<th>
Статус заявки
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.CardNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.Sum)
</td>
<td>
@Html.DisplayFor(modelItem => item.DateOpen)
</td>
<td>
@Html.DisplayFor(modelItem => item.Status)
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -3,13 +3,13 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - BankYouBankruptCashierApp</title> <title>@ViewData["Title"]</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" /> <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" /> <link rel="stylesheet" href="~/css/site.css" />
<script src="~/lib/jquery/dist/jquery.min.js"></script> <script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
</head> </head>
<body> <body class="MyBody">
<header> <header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"> <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container"> <div class="container">
@ -28,6 +28,12 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Debiting">Заявки на снятие</a> <a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Debiting">Заявки на снятие</a>
</li> </li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Crediting">Заявки на начисление</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="MoneyTransfers">Переводы</a>
</li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="CreateReport">Отчёт</a> <a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="CreateReport">Отчёт</a>
</li> </li>

View File

@ -15,4 +15,8 @@ html {
body { body {
margin-bottom: 60px; margin-bottom: 60px;
}
.MyBody{
} }