исправленный фронтенд работника. Даша спасибо за хедер

This commit is contained in:
Николай 2023-04-03 18:03:17 +04:00
parent 8cddd1067c
commit ff8041fe1a
13 changed files with 393 additions and 688 deletions

View File

@ -65,17 +65,11 @@ namespace HardwareShopClientApp.Controllers
[HttpPost] [HttpPost]
public void Builds(int id) public void Builds(int id)
{ {
Response.Redirect("Build"); Response.Redirect("LinkPurchase");
} }
[HttpGet] [HttpGet]
public IActionResult Build() public IActionResult LinkPurchase()
{
return View();
}
[HttpGet]
public IActionResult linkingBuild()
{ {
return View(); return View();
} }

View File

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Магазин компьютерной техники</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="stylesheet" href="~/HardwareShopClientApp.styles.css" asp-append-version="true" />
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container-fluid">
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Покупки</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Сборки</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Комментарии</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">Получение списка</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">Отчёт</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="container">
<main role="main" class="pb-3">
@RenderBody()
</main>
</div>
<footer b-xtjzatmnc3="" class="border-top footer text-muted">
<div class="container">
© 2023 - "Ты ж программист" - Магазин компьютерной техники <a href="/Home/Privacy">Privacy</a>
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>

View File

@ -1,78 +0,0 @@

@using HardwareShopContracts.ViewModels
@{
ViewData["Title"] = "Build";
}
@model List<ComponentViewModel>
@section Header {
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container-fluid"><a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Purchases</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Builds</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Comments</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">listComponents</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">WorkerReport</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="linkingBuild">linkingBuild</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<form class="d-flex justify-content-evenly">
<div class=" col-sm-8">
<div class="text-center">
<h2 class="display-4">Комплектующие</h2>
</div>
<div class="col-sm-3">
<label class="form-label">Название сборки</label>
<input type="text" class="form-control" name="buildName">
</div>
<div class="text-center" name="id">
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Комплектующее
</th>
<th>
Цена
</th>
<th>
Логин пользователя
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<button type="submit" class="btn btn-primary mt-3 px-4">Save</button>
</form>

View File

@ -1,81 +1,61 @@
@using HardwareShopContracts.ViewModels @{
@{
ViewData["Title"] = "Builds"; ViewData["Title"] = "Builds";
Layout = "~/Views/Shared/_LayoutWorker.cshtml";
} }
@model List<BuildViewModel> <form method="post" class="d-flex justify-content-evenly">
<div class=" col-sm-8">
<div class="text-center">
<h2 class="display-4">Сборки</h2>
</div>
<div class="text-center" name="id">
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Цена
</th>
<th>
Название
</th>
<th>
Логин пользователя
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="text-center d-flex flex-column mt-5">
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Добавить</button>
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
<button type="submit" class="btn btn-primary btn-lg mb-5">Привязать сборку</button>
</div>
@section Header { <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<header> <div class="modal-dialog">
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"> <div class="modal-content">
<div class="container-fluid"><a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a> <div class="modal-header">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent" <h5 class="modal-title" id="exampleModalLabel">Сборка</h5>
aria-expanded="false" aria-label="Toggle navigation"> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
<span class="navbar-toggler-icon"></span> </div>
</button> <div class="modal-body">
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between"> <label class="form-label">Название</label>
<ul class="navbar-nav flex-grow-1"> <input type="text" class="form-control">
<li class="nav-item"> </div>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Purchases</a> <div class="modal-footer">
</li> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<li class="nav-item"> <button type="button" class="btn btn-primary">Добавить</button>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Builds</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Comments</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">listComponents</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">WorkerReport</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="linkingBuild">linkingBuild</a>
</li>
</ul>
</div> </div>
</div> </div>
</nav>
</header>
}
<form method="post" class="d-flex justify-content-evenly">
<div class=" col-sm-8">
<div class="text-center">
<h2 class="display-4">Сборки</h2>
</div>
<div class="text-center" name="id">
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Дата оплаты
</th>
<th>
Сумма
</th>
<th>
Статус
</th>
<th>
Логин пользователя
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div> </div>
<div class="text-center d-flex flex-column mt-5"> </div>
<button type="submit" class="btn btn-primary btn-lg mb-5">Добавить</button> </form>
<button type="submit" class="btn btn-primary btn-lg mb-5">Изменить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Привязать сборку</button>
</div>
</form>

View File

@ -1,105 +1,70 @@
@using HardwareShopContracts.ViewModels @{
@{
ViewData["Title"] = "Comments"; ViewData["Title"] = "Comments";
Layout = "~/Views/Shared/_LayoutWorker.cshtml";
} }
@model List<CommentViewModel>
@section Header {
<header> <form method="post" class="d-flex justify-content-evenly">
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"> <div class=" col-sm-8">
<div class="container-fluid"><a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a> <div class="text-center">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent" <h2 class="display-4">Комментарии</h2>
aria-expanded="false" aria-label="Toggle navigation"> </div>
<span class="navbar-toggler-icon"></span> <div class="text-center" name="id">
</button> <table class="table">
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between"> <thead>
<ul class="navbar-nav flex-grow-1"> <tr>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Purchases</a> Номер
</li> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Builds</a> Текст
</li> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Comments</a> Название сборки к которой относиться комментарий
</li> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">listComponents</a> Логин пользователя
</li> </th>
<li class="nav-item"> </tr>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">WorkerReport</a> </thead>
</li> <tbody>
<li class="nav-item"> </tbody>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="linkingBuild">linkingBuild</a> </table>
</li> </div>
</ul> </div>
<div class="text-center d-flex flex-column mt-5">
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Добавить</button>
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
</div>
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Комментарий</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
</div> </div>
</div> <div class="modal-body">
</nav> <div>
</header> <label class="form-label">Сборка</label>
} <select class="form-select">
<form method="post" class="d-flex justify-content-evenly"> <option value="1">Сборка 1</option>
<div class=" col-sm-8"> <option value="2">Сборка 2</option>
<div class="text-center"> </select>
<h2 class="display-4">Комментарии</h2>
</div>
<div class="text-center" name="id">
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Текст
</th>
<th>
Название сборки
</th>
<th>
Логин пользователя
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="text-center d-flex flex-column mt-5">
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Добавить</button>
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
</div>
<!-- Модальное окно -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Комментарий</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
</div> </div>
<div class="modal-body"> <div>
<div> <label class="form-label">Текст</label>
<label class="form-label">Сборка</label> <input type="text" class="form-control">
<select class="form-select" name="role">
<option value="1">Сборка 1</option>
<option value="2">Сборка 2</option>
</select>
</div>
<div>
<label class="form-label">Текст</label>
<input type="text" class="form-control" name="text">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="button" class="btn btn-primary">Сохранить</button>
</div> </div>
</div> </div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="button" class="btn btn-primary">Сохранить</button>
</div>
</div> </div>
</div> </div>
</form> </div>
</form>

View File

@ -0,0 +1,84 @@

@{
ViewData["Title"] = "LinkPurchase";
Layout = "~/Views/Shared/_LayoutWorker.cshtml";
}
<form class="d-flex justify-content-evenly">
<div class=" col-sm-8">
<div class="text-center">
<h2 class="display-4">Выбранные покупки</h2>
</div>
<div>
<label class="form-label">Сборка</label>
<select class="form-select" name="role">
<option value="1">Сборка 1</option>
<option value="2">Сборка 2</option>
</select>
</div>
<div class="text-center" name="id">
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Дата оплаты
</th>
<th>
Сумма
</th>
<th>
Статус
</th>
<th>
Логин пользователя
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="text-center d-flex flex-column mt-5">
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Добавить</button>
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
<button type="submit" class="btn btn-primary btn-lg mb-5">Сохранить</button>
</div>
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Покупка</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
</div>
<div class="modal-body">
<div>
<label class="form-label">Покупка</label>
<select class="form-select">
<option value="1">Покупка 1</option>
<option value="2">Покупка 2</option>
</select>
</div>
<div>
<label class="form-label">Количество</label>
<input type="number" class="form-control">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="button" class="btn btn-primary">Сохранить</button>
</div>
</div>
</div>
</div>
</form>

View File

@ -1,39 +1,5 @@
@{ @{
ViewData["Title"] = "MainWorker"; ViewData["Title"] = "MainWorker";
} Layout = "~/Views/Shared/_LayoutWorker.cshtml";
@section Header {
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container-fluid"><a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Purchases</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Builds</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Comments</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">listComponents</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">WorkerReport</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="linkingBuild">linkingBuild</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
} }

View File

@ -1,73 +1,37 @@
@using HardwareShopContracts.ViewModels @{
@{
ViewData["Title"] = "Purchase"; ViewData["Title"] = "Purchase";
Layout = "~/Views/Shared/_LayoutWorker.cshtml";
} }
@model List<GoodViewModel> <form class="d-flex justify-content-evenly">
<div class=" col-sm-8">
@section Header { <div class="text-center">
<header> <h2 class="display-4">Товары</h2>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"> </div>
<div class="container-fluid"><a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a> <div class="text-center" name="id">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent" <table class="table">
aria-expanded="false" aria-label="Toggle navigation"> <thead>
<span class="navbar-toggler-icon"></span> <tr>
</button> <th>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between"> Номер
<ul class="navbar-nav flex-grow-1"> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Purchases</a> Название товара
</li> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Builds</a> Цена
</li> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Comments</a> Логин пользователя
</li> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">listComponents</a> Количество
</li> </th>
<li class="nav-item"> </tr>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">WorkerReport</a> </thead>
</li> <tbody>
<li class="nav-item"> </tbody>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="linkingBuild">linkingBuild</a> </table>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<form class="d-flex justify-content-evenly">
<div class=" col-sm-8">
<div class="text-center">
<h2 class="display-4">Товары</h2>
</div>
<div class="text-center" name="id">
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Название товара
</th>
<th>
Цена
</th>
<th>
Логин пользователя
</th>
<th>
Количество
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div> </div>
</div> </div>
<div class="text-center d-flex flex-column mt-5"> <div class="text-center d-flex flex-column mt-5">
@ -75,9 +39,8 @@
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button> <button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button> <button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button> <button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Сохрванить</button>
</div> </div>
<!-- Модальное окно -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
@ -88,14 +51,14 @@
<div class="modal-body"> <div class="modal-body">
<div> <div>
<label class="form-label">Товар</label> <label class="form-label">Товар</label>
<select class="form-select" name="role"> <select class="form-select">
<option value="1">Товар 1</option> <option value="1">Товар 1</option>
<option value="2">Товар 2</option> <option value="2">Товар 2</option>
</select> </select>
</div> </div>
<div> <div>
<label class="form-label">Количество</label> <label class="form-label">Количество</label>
<input type="number" class="form-control" name="count"> <input type="number" class="form-control">
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@ -105,5 +68,4 @@
</div> </div>
</div> </div>
</div> </div>
</form> </form>

View File

@ -1,73 +1,37 @@
@using HardwareShopContracts.ViewModels @{
@{
ViewData["Title"] = "Purchases"; ViewData["Title"] = "Purchases";
Layout = "~/Views/Shared/_LayoutWorker.cshtml";
} }
@model List<PurchaseViewModel>
@section Header {
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container-fluid"><a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Purchases</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Builds</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Comments</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">listComponents</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">WorkerReport</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="linkingBuild">linkingBuild</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<form method="post" class="d-flex justify-content-evenly"> <form method="post" class="d-flex justify-content-evenly">
<div class="col-sm-8"> <div class="col-sm-8">
<div class="text-center"> <div class="text-center">
<h2 class="display-4">Покупки</h2> <h2 class="display-4">Покупки</h2>
</div> </div>
<div class="text-center" name="id"> <div class="text-center" name="id">
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th> <th>
Номер Номер
</th> </th>
<th> <th>
Дата оплаты Дата оплаты
</th> </th>
<th> <th>
Сумма Сумма
</th> </th>
<th> <th>
Статус Статус
</th> </th>
<th> <th>
Логин пользователя Логин пользователя
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="text-center d-flex flex-column mt-5"> <div class="text-center d-flex flex-column mt-5">

View File

@ -1,51 +1,15 @@
@using HardwareShopContracts.ViewModels @{
@{
ViewData["Title"] = "WorkerReport"; ViewData["Title"] = "WorkerReport";
Layout = "~/Views/Shared/_LayoutWorker.cshtml";
} }
@section Header { <form method="post" class="d-flex flex-column align-items-center">
<header> <div class="col-sm-3">
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"> <label class="form-label">С</label>
<div class="container-fluid"><a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a> <input type="date" class="form-control" name="dateFrom">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent" <label class="form-label">По</label>
aria-expanded="false" aria-label="Toggle navigation"> <input type="date" class="form-control" name="dateTo">
<span class="navbar-toggler-icon"></span> </div>
</button> <button type="submit" class="btn btn-primary mt-3 px-4">Вывод на страницу</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between"> <button type="submit" class="btn btn-primary mt-3 px-4">Отправить на почту</button>
<ul class="navbar-nav flex-grow-1"> </form>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Purchases</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Builds</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Comments</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">listComponents</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">WorkerReport</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="linkingBuild">linkingBuild</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<form method="post" class="d-flex flex-column align-items-center">
<div class="col-sm-3">
<label class="form-label">С</label>
<input type="date" class="form-control" name="dateFrom">
<label class="form-label">По</label>
<input type="date" class="form-control" name="dateTo">
</div>
<button type="submit" class="btn btn-primary mt-3 px-4">Вывод на страницу</button>
<button type="submit" class="btn btn-primary mt-3 px-4">Отправить на почту</button>
</form>

View File

@ -1,116 +0,0 @@

@using HardwareShopContracts.ViewModels
@{
ViewData["Title"] = "linkingBuild";
}
@model List<GoodViewModel>
@section Header {
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container-fluid"><a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Purchases</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Builds</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Comments</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">listComponents</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">WorkerReport</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="linkingBuild">linkingBuild</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<form class="d-flex justify-content-evenly">
<div class=" col-sm-8">
<div class="text-center">
<h2 class="display-4">Выбранные покупки</h2>
</div>
<div>
<label class="form-label">Сборка</label>
<select class="form-select" name="role">
<option value="1">Сборка 1</option>
<option value="2">Сборка 2</option>
</select>
</div>
<div class="text-center" name="id">
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Комплектующее
</th>
<th>
Цена
</th>
<th>
Логин пользователя
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="text-center d-flex flex-column mt-5">
<button type="submit" class="btn btn-primary btn-lg mb-5">Save</button>
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Добавить</button>
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
</div>
<!-- Модальное окно -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Покупка</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
</div>
<div class="modal-body">
<div>
<label class="form-label">Покупка</label>
<select class="form-select" name="purchase">
<option value="1">Покупка 1</option>
<option value="2">Покупка 2</option>
</select>
</div>
<div>
<label class="form-label">Количество</label>
<input type="number" class="form-control" name="count">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="button" class="btn btn-primary">Сохранить</button>
</div>
</div>
</div>
</div>
</form>

View File

@ -1,106 +1,68 @@
@using HardwareShopContracts.ViewModels @{
ViewData["Title"] = "ListComponents";
@{ Layout = "~/Views/Shared/_LayoutWorker.cshtml";
ViewData["Title"] = "listComponents";
} }
@model List<PurchaseViewModel> <form method="post" class="d-flex justify-content-evenly">
<div class=" col-sm-8">
@section Header { <div class="text-center">
<header> <h2 class="display-4">Покупки</h2>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"> </div>
<div class="container-fluid"><a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Магазин компьютерной техники "Ты ж программист"</a> <div class="text-center" name="id">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent" <table class="table">
aria-expanded="false" aria-label="Toggle navigation"> <thead>
<span class="navbar-toggler-icon"></span> <tr>
</button> <th>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between"> Номер
<ul class="navbar-nav flex-grow-1"> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Purchases">Purchases</a> Дата оплаты
</li> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Builds">Builds</a> Сумма
</li> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="Comments">Comments</a> Статус
</li> </th>
<li class="nav-item"> <th>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="listComponents">listComponents</a> Логин пользователя
</li> </th>
<li class="nav-item"> </tr>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="WorkerReport">WorkerReport</a> </thead>
</li> <tbody>
<li class="nav-item"> </tbody>
<a class="nav-link text-dark" asp-area="" asp-controller="Worker" asp-action="linkingBuild">linkingBuild</a> </table>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<form method="post" class="d-flex justify-content-evenly">
<div class=" col-sm-8">
<div class="text-center">
<h2 class="display-4">Покупки</h2>
</div>
<div class="text-center" name="id">
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Дата оплаты
</th>
<th>
Сумма
</th>
<th>
Статус
</th>
<th>
Логин пользователя
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div> </div>
</div> </div>
<div class="text-center d-flex flex-column mt-5"> <div class="text-center d-flex flex-column mt-5">
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Добавить</button> <button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Добавить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button> <button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button> <button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Сохранить в doc формате</button> <button type="button" class="btn btn-primary btn-lg mb-5">Сохранить в doc формате</button>
<button type="button" class="btn btn-primary btn-lg mb-5">Сохранить в xls формате</button> <button type="button" class="btn btn-primary btn-lg mb-5">Сохранить в xls формате</button>
</div> </div>
<!-- Модальное окно --> <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog">
<div class="modal-dialog"> <div class="modal-content">
<div class="modal-content"> <div class="modal-header">
<div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Покупка</h5>
<h5 class="modal-title" id="exampleModalLabel">Покупка</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button> </div>
</div> <div class="modal-body">
<div class="modal-body"> <div>
<div> <label class="form-label">Покупка</label>
<label class="form-label">Покупка</label> <select class="form-select">
<select class="form-select" name="role"> <option value="1">Покупка 1</option>
<option value="1">Покупка 1</option> <option value="2">Покупка 2</option>
<option value="2">Покупка 2</option> </select>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="button" class="btn btn-primary">Добавить</button>
</div> </div>
</div> </div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="button" class="btn btn-primary">Добавить</button>
</div>
</div> </div>
</div> </div>
</div>
</form> </form>

View File

@ -9,7 +9,7 @@ namespace HardwareShopContracts.ViewModels
[DisplayName("Цена")] [DisplayName("Цена")]
public double Price { get; set; } public double Price { get; set; }
[DisplayName("Название компонента")] [DisplayName("Название Сборки")]
public string BuildName { get; set; } = string.Empty; public string BuildName { get; set; } = string.Empty;
[DisplayName("Логин пользователя")] [DisplayName("Логин пользователя")]