Докинул отчеты
This commit is contained in:
parent
26ff7a9296
commit
852cb2e9a7
@ -8,7 +8,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="Views\Home\CardCreate.cshtml" />
|
||||
<Content Remove="Views\Home\Operation.cshtml" />
|
||||
<Content Remove="Views\Home\Register.cshtml" />
|
||||
<Content Remove="Views\Home\Requests.cshtml" />
|
||||
</ItemGroup>
|
||||
@ -33,10 +32,6 @@
|
||||
<_ContentIncludedByDefault Remove="Views\Home\Requests.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Views\Home\Operation.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Views\Home\CardCreate.cshtml" />
|
||||
<None Include="Views\Home\Register.cshtml" />
|
||||
|
@ -16,25 +16,105 @@ namespace BankClientApp.Controllers
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
if (APIClient.Client == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View(new List<CardViewModel>());
|
||||
}
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[HttpGet]
|
||||
public IActionResult Enter()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void Enter(string login, string password)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public IActionResult Privacy()
|
||||
[HttpGet]
|
||||
public IActionResult Register()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult CardCreate()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult CardUpdate()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult CardDelete()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Operation()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult OperationCreate()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult OperationUpdate()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult OperationDelete()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult OperationTransfer()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Requests()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult RequestCreate()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult RequestUpdate()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult RequestDelete()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Report()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult TransferListReport()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
@ -8,15 +8,14 @@
|
||||
</div>
|
||||
<div class="text-center">
|
||||
@{
|
||||
if (Model == null)
|
||||
{
|
||||
<h3 class="display-4">Авторизируйтесь</h3>
|
||||
return;
|
||||
}
|
||||
// if (Model == null)
|
||||
// {
|
||||
// <h3 class="display-4">Авторизируйтесь</h3>
|
||||
// return;
|
||||
// }
|
||||
<p>
|
||||
<a asp-action="CardCreate">Создать карту</a>
|
||||
<a asp-action="CardUpdate">Обновить карту</a>
|
||||
//todo мб убрать
|
||||
<a asp-action="CardDelete">Удалить карту</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
|
@ -1,4 +1,4 @@
|
||||
@using BankContracts.ViewModels
|
||||
@using BankContracts.ViewModels,
|
||||
@model List<OperationViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Operation";
|
||||
|
20
Bank/BankClientApp/Views/Home/OperationDelete.cshtml
Normal file
20
Bank/BankClientApp/Views/Home/OperationDelete.cshtml
Normal file
@ -0,0 +1,20 @@
|
||||
//todo выводить список только для выбранного клиента
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "OperationDelete";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Удаление операции</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Операция:</div>
|
||||
<div class="col-8">
|
||||
<select id="operation" name="operation" class="form-control" asp-items="@(new SelectList(@ViewBag.Operations, "Id", "Id"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-8"><input type="submit" value="Удалить" class="btn btn-danger" /></div>
|
||||
</div>
|
||||
</form>
|
20
Bank/BankClientApp/Views/Home/OperationUpdate.cshtml
Normal file
20
Bank/BankClientApp/Views/Home/OperationUpdate.cshtml
Normal file
@ -0,0 +1,20 @@
|
||||
//todo выводить список только для выбранного клиента
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "OperationDelete";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Удаление операции</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Карта:</div>
|
||||
<div class="col-8">
|
||||
<select id="card" name="card" class="form-control" asp-items="@(new SelectList(@ViewBag.Cards, "Id", "Number"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-8"><input type="submit" value="Удалить" class="btn btn-danger" /></div>
|
||||
</div>
|
||||
</form>
|
59
Bank/BankClientApp/Views/Home/Report.cshtml
Normal file
59
Bank/BankClientApp/Views/Home/Report.cshtml
Normal file
@ -0,0 +1,59 @@
|
||||
@{
|
||||
ViewData["Title"] = "Report";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h3 class="display-4">Список карт с расшифровкой по операциям и заявкам</h3>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
@{
|
||||
if (Model == null)
|
||||
{
|
||||
<h4 class="display-4">Авторизуйтесь!</h4>
|
||||
return;
|
||||
}
|
||||
<div class="row mb-5">
|
||||
<div class="col-4">Начальная дата:</div>
|
||||
<div class="col-8">
|
||||
<input type="date" id="startDate" name="startDate" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-5">
|
||||
<div class="col-4">Конечная дата:</div>
|
||||
<div class="col-8">
|
||||
<input type="date" id="endDate" name="endDate" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер
|
||||
</th>
|
||||
<th>
|
||||
Дата
|
||||
</th>
|
||||
<th>
|
||||
Карта
|
||||
</th>
|
||||
<th>
|
||||
Операция
|
||||
</th>
|
||||
<th>
|
||||
Заявка
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
будет заполняться вьюшками отчета
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Создать отчет" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Отправить на почту" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
@ -6,21 +6,20 @@
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Номер:</div>
|
||||
<div class="col-4">Сумма:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="number" id="number" />
|
||||
<input type="number" name="sum" id="sum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">CVV:</div>
|
||||
<div class="col-4">Карты:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="cvv" id="cvv" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">PIN:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="pin" id="pin" />
|
||||
<select name="cards" class="form-control" multiple size="5" id="cards">
|
||||
@foreach (var card in ViewBag.Cards)
|
||||
{
|
||||
<option value="@card.Id">@card.Number</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
20
Bank/BankClientApp/Views/Home/RequestDelete.cshtml
Normal file
20
Bank/BankClientApp/Views/Home/RequestDelete.cshtml
Normal file
@ -0,0 +1,20 @@
|
||||
//todo выводить список только для выбранного клиента
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "RequestDelete";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Удаление запрос</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Запрос:</div>
|
||||
<div class="col-8">
|
||||
<select id="request" name="request" class="form-control" asp-items="@(new SelectList(@ViewBag.Requests, "Id", "Id"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-8"><input type="submit" value="Удалить" class="btn btn-danger" /></div>
|
||||
</div>
|
||||
</form>
|
68
Bank/BankClientApp/Views/Home/RequestUpdate.cshtml
Normal file
68
Bank/BankClientApp/Views/Home/RequestUpdate.cshtml
Normal file
@ -0,0 +1,68 @@
|
||||
@{
|
||||
ViewData["Title"] = "CardCreate";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создание карты</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Услуга:</div>
|
||||
<div class="col-8">
|
||||
<select id="request" name="request" class="form-control" asp-items="@(new SelectList(@ViewBag.Request, "Id", "Id"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Сумма:</div>
|
||||
<div class="col-8">
|
||||
<input type="number" name="sum" id="sum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Карты:</div>
|
||||
<div class="col-8">
|
||||
<select name="cards" class="form-control" multiple size="5" id="cards">
|
||||
@foreach (var card in ViewBag.Cards)
|
||||
{
|
||||
<option value="@card.Id" data-name="@card.Number">@card.Number</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Создать" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script>
|
||||
function check() {
|
||||
var cards = $('#cards').val();
|
||||
$("#cards option:selected").removeAttr("selected");
|
||||
if (cards) {
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "/Home/GetCards",
|
||||
data: { serviceId: service },
|
||||
success: function (result) {
|
||||
console.log(result.item2);
|
||||
$('#name').val(result.item1.serviceName);
|
||||
$('#price').val(result.item1.price);
|
||||
$.map(result.item2, function (n) {
|
||||
console.log("#" + n);
|
||||
$(`option[data-name=${n}]`).attr("selected", "selected")
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
}
|
||||
check();
|
||||
$('#request').on('change', function () {
|
||||
check();
|
||||
});
|
||||
</script>
|
||||
}
|
27
Bank/BankClientApp/Views/Home/TransferListReport.cshtml
Normal file
27
Bank/BankClientApp/Views/Home/TransferListReport.cshtml
Normal file
@ -0,0 +1,27 @@
|
||||
@using BankContracts.ViewModels;
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "TransferListReport";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создать списки переводов по картам</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Карты:</div>
|
||||
<div class="col-8">
|
||||
<select name="cards" class="form-control" multiple size="5" id="cards">
|
||||
@foreach (var card in ViewBag.Cards)
|
||||
{
|
||||
<option value="@card.Id">@card.Number</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Word" class="btn btn-primary" /></div>
|
||||
<div class="col-4"><input type="submit" value="Excel" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
Loading…
Reference in New Issue
Block a user