From 2b4d00fbacec981b3b826b152902194b2d920c13 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Wed, 17 May 2023 17:13:57 +0400 Subject: [PATCH] Checking debitings. --- .../Controllers/HomeController.cs | 12 ++++ .../Views/Home/Debiting.cshtml | 67 +++++++++++++++++++ .../Views/Shared/_Layout.cshtml | 7 +- 3 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Debiting.cshtml diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs index 50a6d42..7bbcac9 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs @@ -222,5 +222,17 @@ namespace BankYouBankruptCashierApp.Controllers Response.Redirect("Index"); } + + //для страницы "Заявки на снятие" + [HttpGet] + public IActionResult Debiting() + { + if (APICashier.Cashier == null) + { + throw new Exception("Вы как сюда попали? Суда вход только авторизованным"); + } + + return View(APICashier.GetRequest>($"/api/Account/FindOpenDebiting")); + } } } \ No newline at end of file diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Debiting.cshtml b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Debiting.cshtml new file mode 100644 index 0000000..5a3aee5 --- /dev/null +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Debiting.cshtml @@ -0,0 +1,67 @@ +@using BankYouBankruptContracts.ViewModels + +@model List + +@{ + ViewData["Title"] = "Заявки на снятия"; +} + +
+

Заявки

+
+ +
+ @{ + if (Model == null) + { +

Сначала авторизируйтесь

+ return; + } +

+ Одобрение заявки +

+ + + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + } + +
+ Номер заявки + + Номер карты + + Сумма снятия + + Дата открытия заявки + + Статус заявки +
+ @Html.DisplayFor(modelItem => item.Id) + + @Html.DisplayFor(modelItem => item.CardNumber) + + @Html.DisplayFor(modelItem => item.Sum) + + @Html.DisplayFor(modelItem => item.DateOpen) + + @Html.DisplayFor(modelItem => item.Status) +
+ } +
diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Shared/_Layout.cshtml b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Shared/_Layout.cshtml index a32b0aa..7d1003e 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Shared/_Layout.cshtml +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Shared/_Layout.cshtml @@ -25,11 +25,14 @@ +