This commit is contained in:
Programmist73 2023-05-20 04:49:06 +04:00
commit b883756179
4 changed files with 72 additions and 18 deletions

View File

@ -510,7 +510,7 @@ namespace BankYouBankruptCashierApp.Controllers
Email = APICashier.Cashier.Email
});
return Redirect("~/Home/Enter");
return Redirect("ReportSuccess");
}
//создание excel отчёта у касира
@ -528,7 +528,7 @@ namespace BankYouBankruptCashierApp.Controllers
Email = APICashier.Cashier.Email
});
return Redirect("~/Home/Enter");
return Redirect("ReportSuccess");
}
[HttpPost]
@ -536,7 +536,7 @@ namespace BankYouBankruptCashierApp.Controllers
{
if (APICashier.Cashier == null)
{
return Redirect("~/Home/Enter");
return Redirect("ReportSuccess");
}
ViewBag.Accounts = APICashier.GetRequest<List<AccountViewModel>>("/api/Account/GetAllAccounts");
@ -647,5 +647,15 @@ namespace BankYouBankruptCashierApp.Controllers
}
#endregion
[HttpGet]
public IActionResult ReportSuccess()
{
if (APICashier.Cashier == null)
{
throw new Exception("Не авторизованы");
}
return View();
}
}
}

View File

@ -0,0 +1,15 @@
@{
ViewData["Title"] = "Отправка отчета";
}
<div class="text-center">
@{
if (APICashier.Cashier == null)
{
<h3 class="display-4">Сначала авторизируйтесь</h3>
return;
}
}
<h3 class="display-4">Отчeт был отправлен на почту @APICashier.Cashier.Email</h3>
</div>

View File

@ -341,9 +341,12 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
return Redirect("ReportSuccess");
}
//отчёт клиента по пополнениям
[HttpPost]
public IActionResult CreateCreditingExcelReport(List<CheckboxViewModel> cards)
@ -359,7 +362,7 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
return Redirect("ReportSuccess");
}
//отчёт клиента по снятиям
@ -377,7 +380,7 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
return Redirect("ReportSuccess");
}
#endregion
@ -399,7 +402,7 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
return Redirect("ReportSuccess");
}
//отчёт клиента по пополнениям
@ -417,7 +420,7 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
return Redirect("ReportSuccess");
}
//отчёт клиента по снятиям
@ -435,7 +438,7 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
return Redirect("ReportSuccess");
}
#endregion
@ -536,5 +539,15 @@ namespace BankYouBankruptClientApp.Controllers
}
#endregion
[HttpGet]
public IActionResult ReportSuccess()
{
if (APIClient.Client == null)
{
throw new Exception("Не авторизованы");
}
return View();
}
}
}

View File

@ -0,0 +1,16 @@
@using BankYouBankruptСlientApp
@{
ViewData["Title"] = "Отправка отчета";
}
<div class="text-center">
@{
if (APIClient.Client == null)
{
<h3 class="display-4">Сначала авторизируйтесь</h3>
return;
}
}
<h3 class="display-4">Отчeт был отправлен на почту @APIClient.Client.Email</h3>
</div>