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");
@ -646,6 +646,16 @@ namespace BankYouBankruptCashierApp.Controllers
});
}
#endregion
}
#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,8 +362,8 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
}
return Redirect("ReportSuccess");
}
//отчёт клиента по снятиям
[HttpPost]
@ -377,8 +380,8 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
}
return Redirect("ReportSuccess");
}
#endregion
@ -399,8 +402,8 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
}
return Redirect("ReportSuccess");
}
//отчёт клиента по пополнениям
[HttpPost]
@ -417,8 +420,8 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
}
return Redirect("ReportSuccess");
}
//отчёт клиента по снятиям
[HttpPost]
@ -435,8 +438,8 @@ namespace BankYouBankruptClientApp.Controllers
Email = APIClient.Client.Email
});
return Redirect("~/Home/Enter");
}
return Redirect("ReportSuccess");
}
#endregion
@ -535,6 +538,16 @@ namespace BankYouBankruptClientApp.Controllers
});
}
#endregion
}
#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>