Ну чето красивое

This commit is contained in:
dasha 2023-04-03 00:56:06 +04:00
parent 800a21389a
commit d0aa59742c
13 changed files with 227 additions and 200 deletions

View File

@ -11,6 +11,20 @@ namespace HardwareShopClientApp.Controllers
_logger = logger;
}
public IActionResult CreateGood()
{
return View();
}
public IActionResult LinkBuilds()
{
return View();
}
public IActionResult CreateComponent()
{
return View();
}
public IActionResult MainStorekeeper()
{
return View();

View File

@ -7,6 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.13" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

View File

@ -0,0 +1,57 @@
<!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="Storekeeper" asp-action="Components">Комплектующие</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Goods">Товары</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Orders">Заказы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="ListBuilds">Получение списка</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Report">Отчет</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,40 +1,7 @@
@using HardwareShopContracts.ViewModels
@{
ViewData["Title"] = "Комплектующие";
}
@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="Storekeeper" asp-action="Components">Комплектующие</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Goods">Товары</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Orders">Заказы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="ListBuilds">Получение списка</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Report">Отчет</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
}
<div class="text-center">
@ -45,8 +12,11 @@
<div class="text-center">
@{
<p>
<a asp-action="Create">Создать комплектующее</a>
</p>
<a asp-action="CreateComponent" class="mx-2">Создать комплектующее</a>
<a asp-action="Components" class="mx-2">Изменить комплектующее</a>
<a asp-action="Components" class="mx-2">Удалить комплектующее</a>
<a asp-action="LinkBuilds" class="mx-2">Привязка сборок</a>
</p>
<table class="table">
<thead>
<tr>
@ -56,6 +26,9 @@
<th>
Цена
</th>
<th>
Сборки
</th>
</tr>
</thead>
<tbody>

View File

@ -0,0 +1,22 @@
@{
ViewData["Title"] = "Создание комплектующего";
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
}
<div class="text-center">
<h2 class="display-4">Создание комплектующего</h2>
</div>
<form method="post" class="d-flex flex-column align-items-center">
<div class="col-sm-3">
<label class="form-label">Название</label>
<input type="text" class="form-control" name="email">
</div>
<div class="col-sm-3">
<label class="form-label">Стоимость</label>
<input type="number" step="0.01" class="form-control" name="cost">
</div>
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
<button type="submit" class="btn btn-primary mt-3 px-4">Подтвердить</button>
</div>
</form>

View File

@ -0,0 +1,32 @@
@{
ViewData["Title"] = "Создание товара";
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
}
<div class="text-center">
<h2 class="display-4">Создание товара</h2>
</div>
<form method="post" class="d-flex flex-column align-items-center">
<div class="col-sm-3">
<label class="form-label">Название</label>
<input type="text" class="form-control" name="email">
</div>
<div class="col-sm-3">
<label class="form-label">Цена</label>
<input type="number" step="0.01" class="form-control" name="price" readonly>
</div>
<table class="table table-hover">
<thead>
<tr>
<th id="name" scope="col">Комплектующее</th>
<th id="cost" scope="col">Стоимость</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
<button type="submit" class="btn btn-primary mt-3 px-4">Подтвердить</button>
</div>
</form>

View File

@ -0,0 +1,26 @@
@{
ViewData["Title"] = "Создание заказа";
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
}
<div class="text-center">
<h2 class="display-4">Создание заказа</h2>
</div>
<form method="post" class="d-flex flex-column align-items-center">
<div class="col-sm-3">
<label class="form-label">Товар</label>
<select class="form-control" name="good"></select>
</div>
<div class="col-sm-3">
<label class="form-label">Количество</label>
<input type="number" class="form-control" name="count">
</div>
<div class="col-sm-3">
<label class="form-label">Сумма</label>
<input type="number" step="0.01" class="form-control" name="sum" readonly>
</div>
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
<button type="submit" class="btn btn-primary mt-3 px-4">Подтвердить</button>
</div>
</form>

View File

@ -1,41 +1,36 @@
@using HardwareShopContracts.ViewModels
@{
ViewData["Title"] = "Товары";
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
}
@model List<GoodViewModel>
<div class="text-center">
<h1 class="display-4">Товары</h1>
</div>
@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="Storekeeper" asp-action="Components">Комплектующие</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Goods">Товары</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Orders">Заказы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="ListBuilds">Получение списка</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Report">Отчет</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<div>
привет, мы в товарах
<div class="text-center">
@{
<p>
<a asp-action="CreateGood" class="mx-2">Создать товар</a>
<a asp-action="Goods" class="mx-2">Изменить товар</a>
<a asp-action="Goods" class="mx-2">Удалить товар</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Название
</th>
<th>
Цена
</th>
<th>
Комплектующие
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
}
</div>

View File

@ -0,0 +1,29 @@
@using HardwareShopContracts.ViewModels
@{
ViewData["Title"] = "Привязка сборок";
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
}
<div class="text-center">
<h1 class="display-4">Привязка сборок</h1>
</div>
<form method="post" class="d-flex flex-column align-items-center">
<div class="col-sm-3">
<label class="form-label">Комплектующее</label>
<select class="form-control" name="component"></select>
</div>
<table class="table table-hover">
<thead>
<tr>
<th id="name" scope="col">Сборка</th>
<th id="price" scope="col">Цена</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
<button type="submit" class="btn btn-primary mt-3 px-4">Подтвердить</button>
</div>
</form>

View File

@ -1,41 +1,9 @@
@using HardwareShopContracts.ViewModels
@{
ViewData["Title"] = "Получение списка";
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
}
@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="Storekeeper" asp-action="Components">Комплектующие</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Goods">Товары</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Orders">Заказы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="ListBuilds">Получение списка</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Report">Отчет</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<div class="text-center">
<h1 class="display-4">Список сборок</h1>
</div>

View File

@ -1,35 +1,8 @@
@{
ViewData["Title"] = "Основная страница для кладовщиков";
ViewData["Title"] = "Основная - Кладовщик";
Layout = "~/Views/Shared/_LayoutStorekeeper.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="Storekeeper" asp-action="Components">Комплектующие</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Goods">Товары</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Orders">Заказы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="ListBuilds">Получение списка</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Report">Отчет</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<div class="d-flex justify-content-center">
<img src="../images/logo.png"/>
</div>

View File

@ -1,41 +1,9 @@
@using HardwareShopContracts.ViewModels
@{
ViewData["Title"] = "Заказы";
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
}
@model List<OrderViewModel>
@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="Storekeeper" asp-action="Components">Комплектующие</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Goods">Товары</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Orders">Заказы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="ListBuilds">Получение списка</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Report">Отчет</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
}
<div>
привет, мы в заказах
</div>

View File

@ -1,36 +1,5 @@
@using HardwareShopContracts.ViewModels
@{
ViewData["Title"] = "Отчет";
}
@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="Storekeeper" asp-action="Components">Комплектующие</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Goods">Товары</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Orders">Заказы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="ListBuilds">Получение списка</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Storekeeper" asp-action="Report">Отчет</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
}