забыл до этого сделать коммит))) доделал веб

This commit is contained in:
spacyboy 2024-05-01 22:04:27 +04:00
parent ddc21a6666
commit 9afbae92a5
25 changed files with 959 additions and 18 deletions

@ -0,0 +1,50 @@
using CarCenterContracts.ViewModels;
using Newtonsoft.Json;
using System.Net.Http.Headers;
using System.Text;
namespace CarCenterManagerApp
{
public class APIClient
{
private static readonly HttpClient _manager = new();
public static ManagerViewModel? manager { get; set; } = null;
public static void Connect(IConfiguration configuration)
{
_manager.BaseAddress = new Uri(configuration["IPAddress"]);
_manager.DefaultRequestHeaders.Accept.Clear();
_manager.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}
public static T? GetRequest<T>(string requestUrl)
{
var response = _manager.GetAsync(requestUrl);
var result = response.Result.Content.ReadAsStringAsync().Result;
if (response.Result.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<T>(result);
}
else
{
throw new Exception(result);
}
}
public static void PostRequest<T>(string requestUrl, T model)
{
var json = JsonConvert.SerializeObject(model);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = _manager.PostAsync(requestUrl, data);
var result = response.Result.Content.ReadAsStringAsync().Result;
if (!response.Result.IsSuccessStatusCode)
{
throw new Exception(result);
}
}
}
}

@ -23,6 +23,88 @@ namespace CarCenterManagerApp.Controllers
return View();
}
public IActionResult Register()
{
return View();
}
public IActionResult Enter()
{
return View();
}
public IActionResult CreateSale()
{
return View();
}
public IActionResult ListSales()
{
return View();
}
public IActionResult UpdateSale()
{
return View();
}
public IActionResult DeleteSale()
{
return View();
}
public IActionResult ListPreSaleWorks()
{
return View();
}
public IActionResult ListEmployees()
{
return View();
}
public IActionResult CreateEmployee()
{
return View();
}
public IActionResult UpdateEmployee()
{
return View();
}
public IActionResult DeleteEmployee()
{
return View();
}
public IActionResult CreatePreSaleWork()
{
return View();
}
public IActionResult UpdatePreSaleWork()
{
return View();
}
public IActionResult DeletePreSaleWork()
{
return View();
}
public IActionResult AddSaleToEmployee()
{
return View();
}
public IActionResult AddSaleToPreSaleWork()
{
return View();
}
public IActionResult AddEmployeeToPreSaleWork()
{
return View();
}
public IActionResult ListSalesToPdfFile()
{
return View();
}
public IActionResult ListSaleEmployeeToFile()
{
return View();
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{

@ -0,0 +1,26 @@
@using CarCenterContracts.ViewModels;
@using CarCenterDataModels.Models;
@{
ViewData["Title"] = "AddEmployeeToPreSaleWork";
}
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Сотрудник: </label>
</div>
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">ФИО сотрудника: </label>
</div>
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Специальность сотрудника: </label>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Добавить сотрудника" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</form>

@ -0,0 +1,43 @@
@using CarCenterContracts.ViewModels;
@using CarCenterDataModels.Models;
@{
ViewData["Title"] = "AddSaleToEmployee";
}
@model Tuple<List<EmployeeViewModel>, List<SaleViewModel>>
<div class="container">
<h2>Добавление продаж в сотрудника</h2>
<form method="post">
<div class="form-group">
<label for="employee">Выберите сотрудника</label>
</div>
<div class="form-group">
<label for="sale">Выберите сотрудника</label>
<div class="card">
<div class="card-body p-0">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">Дата продажи</th>
<th scope="col">Стоимость</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Добавить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</form>
</div>

@ -0,0 +1,36 @@
@using CarCenterContracts.ViewModels;
@using CarCenterDataModels.Models;
@{
ViewData["Title"] = "AddSaleToPreSaleWork";
}
@model Tuple<List<PreSaleWorkViewModel>, List<SaleViewModel>>
<div class="container">
<h2>Добавление продажи в предпродажную работу</h2>
<form method="post">
<div class="form-group">
<label for="preSaleWork">предпродажные работы:</label>
</div>
<div class="form-group">
<label>Продажи для предпродажной работы:</label>
<div class="table-responsive">
<table class="table">
<thead class="thead-dark">
<tr>
<th>Дата продажи</th>
<th>Стоимость</th>
</
<tbody>
</tbody>
</table>
</div>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Добавить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</form>
</div>

@ -0,0 +1,25 @@
@{
ViewData["Title"] = "CreateEmployee";
}
<form method="post">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">ФИО сотрудников</label>
</div>
<input type="text"
placeholder="Введите фио сотрудника"
name="employeeName"
class="form-control" />
<br>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-2">Специальность сотрудника</label>
</div>
<input type="number"
placeholder="Введите специальность сотрудника"
name="employeePrice"
class="form-control" />
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Сохранить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</form>

@ -0,0 +1,25 @@
@{
ViewData["Title"] = "CreatePreSaleWork";
}
<form method="post">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Тип предпродажной работы</label>
</div>
<input type="text"
placeholder="Введите тип предпродажной работы"
name="preSaleWorkName"
class="form-control" />
<br>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Стоимость предпродажной работы</label>
<input type="datetime-local"
placeholder="Выберите стоимость предпродажной работы"
name="bookingDate"
class="form-control" />
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Сохранить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</form>

@ -0,0 +1,25 @@
@{
ViewData["Title"] = "CreateSale";
}
<form method="post">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Дата продажи</label>
</div>
<input type="text"
placeholder="Введите дату продажи"
name="brandSale"
class="form-control" />
<br>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-2">Стоимость</label>
</div>
<input type="text"
placeholder="Введите стоимость"
name="model"
class="form-control" />
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Сохранить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</form>

@ -0,0 +1,18 @@
@{
ViewData["Title"] = "DeleteEmployee";
}
<form method="post">
<div class="container d-flex justify-content-center align-items-center0">
<div class="card-body">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Сотрудники: </label>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Сохранить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</div>
</div>
</form>

@ -0,0 +1,18 @@
@{
ViewData["Title"] = "DeletePreSaleWork";
}
<form method="post">
<div class="container d-flex justify-content-center align-items-center0">
<div class="card-body">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Предпродажная работа: </label>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Сохранить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</div>
</div>
</form>

@ -0,0 +1,17 @@
@{
ViewData["Title"] = "DeleteSale";
}
<form method="post">
<div class="container d-flex justify-content-center align-items-center0">
<div class="card-body">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Продажи: </label>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Сохранить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</div>
</div>
</form>

@ -0,0 +1,34 @@
@{
ViewData["Title"] = "Enter";
}
<div class="text-center">
<h2 class="u-text u-text-custom-color-1 u-text-default u-text-1">
Вход
</h2>
</div>
<form method="post">
<div class="container d-flex justify-content-center align-items-center">
<div class="card-body">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Логин</label>
<input type="text"
placeholder="Введите логин"
name="login"
class="form-control" />
</div>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-2">Пароль</label>
<input type="password"
placeholder="Введите пароль"
name="password"
class="form-control" />
</div>
<br>
<div class="form-group text-center" style="padding-bottom: 120px;">
<button type="submit" class="btn btn-outline-dark text-center d-flex justify-content-md-center">Войти</button>
</div>
</div>
</div>
</form>

@ -3,6 +3,6 @@
}
<div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
<h1 class="display-4">Добро пожаловать!</h1>
<h2 class="display-6">Автоцентр «Корыто»</h2>
</div>

@ -0,0 +1,55 @@
@using CarCenterContracts.ViewModels
@model List<EmployeeViewModel>
@{
ViewData["Title"] = "ListEmployees";
}
<section class="u-clearfix u-section-1" id="sec-e38b">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="u-clearfix u-layout-wrap u-layout-wrap-1">
<div class="u-layout">
<div class="u-layout-row">
<div class="u-container-style u-layout-cell u-size-48 u-layout-cell-1">
<div class="u-container-layout u-container-layout-1">
<div class="u-table u-table-responsive u-table-1">
<table class="table">
<thead class="thead-dark">
<tr style="height: 31px">
<th class="u-border-1 u-border-grey-50 u-table-cell">
Номер
</th>
<th class="u-border-1 u-border-grey-50 u-table-cell">
ФИО
</th>
<th class="u-border-1 u-border-grey-50 u-table-cell">
Специальность
</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<div class="u-container-style u-layout-cell u-size-12 u-layout-cell-2">
<div class="u-container-layout u-container-layout-2">
<a asp-area="" asp-controller="Home" asp-action="CreateEmployee"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Добавить</a>
&nbsp;
<a asp-area="" asp-controller="Home" asp-action="UpdateEmployee"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Изменить</a>
&nbsp;
<a asp-area="" asp-controller="Home" asp-action="DeleteEmployee"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Удалить</a>
&nbsp;
<a asp-area="" asp-controller="Home" asp-action="AddSaleToEmployee"
style="padding: 10 px"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Добавить продажу</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

@ -0,0 +1,58 @@
@using CarCenterContracts.ViewModels
@model List<PreSaleWorkViewModel>
@{
ViewData["Title"] = "ListPreSaleWorks";
}
<section class="u-clearfix u-section-1" id="sec-e38b">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="u-clearfix u-layout-wrap u-layout-wrap-1">
<div class="u-layout">
<div class="u-layout-row">
<div class="u-container-style u-layout-cell u-size-48 u-layout-cell-1">
<div class="u-container-layout u-container-layout-1">
<div class="u-table u-table-responsive u-table-1">
<table class="table">
<thead class="thead-dark">
<tr style="height: 31px">
<th class="u-border-1 u-border-grey-50 u-table-cell">
Номер
</th>
<th class="u-border-1 u-border-grey-50 u-table-cell">
Тип предпродажной работы
</th>
<th class="u-border-1 u-border-grey-50 u-table-cell">
Стоимость
</th>
</tr>
</thead>
<tbody class="u-table-body">
</tbody>
</table>
</div>
</div>
</div>
<div class="u-container-style u-layout-cell u-size-12 u-layout-cell-2">
<div class="u-container-layout u-container-layout-2">
<a asp-area="" asp-controller="Home" asp-action="CreatePreSaleWork"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Добавить</a>
&nbsp;
<a asp-area="" asp-controller="Home" asp-action="UpdatePreSaleWork"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Изменить</a>
&nbsp;
<a asp-area="" asp-controller="Home" asp-action="DeletePreSaleWork"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Удалить</a>
&nbsp;
<a asp-area="" asp-controller="Home" asp-action="AddSaleToPreSaleWork"
style="padding: 10 px"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Добавить продажи</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

@ -0,0 +1,48 @@
@using CarCenterContracts.ViewModels
@model List<SaleViewModel>
@{
ViewData["Title"] = "ListSaleEmployeeToFile";
}
<div class="text-center">
<div class="title">
<h2>Создание отчета по продажам</h2>
</div>
</div>
<div class="text-center">
<form method="post">
<div class="file-format">
<label class="form-label">Выберите формат файла:</label>
<div class="form-check">
<input class="form-check-input" type="radio" name="type" value="docx" id="docx">
<label class="form-check-label" for="docx">Word-файл</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="type" value="xlsx" id="xlsx" checked>
<label class="form-check-label" for="xlsx">Excel-файл</label>
</div>
</div>
<div class="table">
<table class="table table-hover">
<thead class="thead-light">
<tr>
<th scope="col"></th>
<th scope="col">дата продажи</th>
<th scope="col">стоимость</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<br>
<div class="d-flex justify-content-center">
<button type="submit" class="btn btn-block btn-outline-dark w-100">Создать</button>
</div>
</form>
</div>

@ -0,0 +1,51 @@
@using CarCenterContracts.ViewModels
@model List<SaleViewModel>
@{
ViewData["Title"] = "ListSales";
}
<section class="u-clearfix u-section-1" id="sec-e38b">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="u-clearfix u-layout-wrap u-layout-wrap-1">
<div class="u-layout">
<div class="u-layout-row">
<div class="u-container-style u-layout-cell u-size-48 u-layout-cell-1">
<div class="u-container-layout u-container-layout-1">
<div class="u-table u-table-responsive u-table-1">
<table class="table">
<thead class="thead-dark">
<tr style="height: 31px">
<th class="u-border-1 u-border-grey-50 u-table-cell">
Номер
</th>
<th class="u-border-1 u-border-grey-50 u-table-cell">
Дата продажи
</th>
<th class="u-border-1 u-border-grey-50 u-table-cell">
Стоимость
</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<div class="u-container-style u-layout-cell u-size-12 u-layout-cell-2">
<div class="u-container-layout u-container-layout-2">
<a asp-area="" asp-controller="Home" asp-action="CreateSale"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Добавить</a>
&nbsp;
<a asp-area="" asp-controller="Home" asp-action="UpdateSale"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Изменить</a>
&nbsp;
<a asp-area="" asp-controller="Home" asp-action="DeleteSale"
class="btn btn-outline-dark text-center d-flex justify-content-md-center">Удалить</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

@ -0,0 +1,49 @@
@using CarCenterContracts.ViewModels
@{
ViewData["Title"] = "ListSalesToPdfFile";
}
<div class="container">
<div class="text-center mb-4">
<h2 class="text-custom-color-1">Отчет по продажам за период</h2>
</div>
<form method="post">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="dateFrom" class="form-label text-custom-color-1">Начало периода:</label>
<input type="datetime-local" id="dateFrom" name="dateFrom" class="form-control" placeholder="Выберите дату начала периода">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="dateTo" class="form-label text-custom-color-1">Окончание периода:</label>
<input type="datetime-local" id="dateTo" name="dateTo" class="form-control" placeholder="Выберите дату окончания периода">
</div>
</div>
</div>
<div class="form-group mb-4">
<label for="headwaiterEmail" class="form-label text-custom-color-1">Введите почту:</label>
<input type="email" id="headwaiterEmail" name="headwaiterEmail" class="form-control" placeholder="Введите вашу почту">
</div>
<div class="row mb-4">
<div class="col-md-8"></div>
<div class="col-md-4">
<button type="submit" class="btn btn-outline-dark w-100 text-center d-flex justify-content-md-center">Отправить на почту</button>
</div>
</div>
<div class="row mb-4">
<div class="col-md-8"></div>
<div class="col-md-4">
<button type="button" id="demonstrate" class="btn btn-outline-dark w-100 text-center d-flex justify-content-md-center">Продемонстрировать</button>
</div>
</div>
<div id="report"></div>
</form>
</div>

@ -1,6 +1,69 @@
@{
ViewData["Title"] = "Privacy Policy";
}
<h1>@ViewData["Title"]</h1>
@using CarCenterContracts.ViewModels
<p>Use this page to detail your site's privacy policy.</p>
@model ManagerViewModel
@{
ViewData["Title"] = "Privacy";
}
<div class="text-center">
<h2 class="u-text u-text-custom-color-1 u-text-default u-text-1"> Мои данные </h2>
</div>
<form method="post">
<div class="container d-flex justify-content-center align-items-center">
<div class="card-body">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Логин</label>
<input type="text"
placeholder="Введите логин"
name="login"
@* value="@Model.ManagerLogin" *@
class="form-control" />
</div>
<div class="form-group">
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Электронная почта</label>
<input type="email"
placeholder="Введите электронную почту"
name="email"
@* value="@Model.ManagerEmail" *@
class="form-control" />
</div>
</div>
<div class="form-group">
<div class="u-form-group u-label-top u-form-group-3">
<label class="u-label u-text-custom-color-1 u-label-3">ФИО</label>
<input type="text"
placeholder="Введите ФИО"
name="fio"
@* value="@Model.ManagerFIO" *@
class="form-control" />
</div>
</div>
<div class="form-group">
<div class="u-form-group u-label-top u-form-group-4">
<label class="u-label u-text-custom-color-1 u-label-4">Номер телефона</label>
<input type="text"
name="telephone"
class="form-control"
@* value="@Model.ManagerNumber" *@
placeholder="Введите номер телефона" />
</div>
</div>
<div class="form-group">
<div class="u-form-group u-label-top u-form-group-5">
<label class="u-label u-text-custom-color-1 u-label-5">Пароль</label>
<input type="text"
placeholder="Введите пароль"
name="password"
@* value="@Model.ManagerPassword" *@
class="form-control" />
</div>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Изменить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</div>
</div>
</form>

@ -0,0 +1,51 @@
@{
ViewData["Title"] = "Register";
}
<div class="text-center">
<h2 class="u-text u-text-custom-color-1 u-text-default u-text-1"> Регистрация </h2>
</div>
<form method="post">
<div class="container d-flex justify-content-center align-items-center">
<div class="card-body">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Логин</label>
<input type="text"
placeholder="Введите логин"
name="login"
class="form-control" />
</div>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-2">Электронная почта</label>
<input type="email"
placeholder="Введите электронную почту"
name="email"
class="form-control" />
</div>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-3">ФИО</label>
<input type="text"
placeholder="Введите ФИО"
name="fio"
class="form-control" />
</div>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-4">Номер телефона</label>
<input type="text"
name="telephone"
class="form-control"
placeholder="Введите номер телефона" />
</div>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-5">Пароль</label>
<input type="password"
placeholder="Введите пароль"
name="password"
class="form-control" />
</div>
<br>
<div class="form-group text-center" style="padding-bottom: 120px;">
<button type="submit" class="btn btn-outline-dark text-center d-flex justify-content-md-center">Зарегистрироваться</button>
</div>
</div>
</div>
</form>

@ -0,0 +1,56 @@
@using CarCenterContracts.ViewModels;
@using CarCenterDataModels.Models;
@{
ViewData["Title"] = "UpdateEmployee";
}
<form method="post">
<div class="container d-flex justify-content-center align-items-center">
<div class="card-body">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Сотрудники: </label>
</div>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">ФИО сотрудников</label>
<input type="text"
id="employeeName"
placeholder="Введите фио сотрудника"
name="equipmenName"
class="form-control" />
</div>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-2">Цена сотрудники</label>
<input type="number"
id="equipmenPrice"
placeholder="Введите специальность сотрудника"
name="equipmenPrice"
class="form-control" />
</div>
<div class="u-table u-table-responsive u-table-1">
<label class="u-label u-text-custom-color-1 u-label-1">Продажа для сотрудников</label>
<table class="table">
<thead class="thead-dark">
<tr style="height: 44px">
<th class="u-border-1 u-border-grey-50 u-table-cell">
Дата
</th>
<th class="u-border-1 u-border-grey-50 u-table-cell">
Стоимость
</th>
</tr>
</thead>
<tbody class="u-table-body" id="table-elements">
</tbody>
</table>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Сохранить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</div>
</div>
</form>

@ -0,0 +1,45 @@
@using CarCenterContracts.ViewModels;
@using CarCenterDataModels.Models;
@{
ViewData["Title"] = "UpdatePreSaleWork";
}
<form method="post">
<div class="container">
<div class="card-body">
<div class="form-group">
<label for="preSaleWork">Предпродажные работы:</label>
</div>
<div class="form-group">
<label for="employee">Сотрудник:</label>
</div>
<div class="form-group">
<label for="preSaleWorkName">Название предпродажной работы:</label>
<input type="text" id="preSaleWorkName" name="preSaleWorkName" class="form-control" placeholder="Введите название предпродажной работы">
</div>
<div class="form-group">
<label>Продажи для предпродажной работы:</label>
<div class="table-responsive">
<table class="table">
<thead class="thead-dark">
<tr>
<th>Дата продажи</th>
<th>Стоимость</th>
</tr>
</thead>
<tbody id="table-elements" class="u-table-body">
</tbody>
</table>
</div>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Добавить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</div>
</div>
</form>

@ -0,0 +1,35 @@
@using CarCenterContracts.ViewModels;
@using CarCenterDataModels.Models;
@{
ViewData["Title"] = "UpdateSale";
}
<form method="post">
<div class="container d-flex justify-content-center align-items-center">
<div class="card-body">
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Продажи: </label>
</div>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-1">Дата продажи</label>
<input type="text"
id="brandSale"
placeholder="Введите дату продажи"
name="brandSale"
class="form-control" />
</div>
<div class="form-group">
<label class="u-label u-text-custom-color-1 u-label-2">Стоимость продажи</label>
<input type="text"
id="model"
placeholder="Введите стоимость"
name="model"
class="form-control"/>
</div>
<br>
<div class="u-container-layout u-container-layout-2">
<input type="submit" value="Сохранить" class="btn btn-outline-dark text-center d-flex justify-content-md-center" />
</div>
</div>
</div>
</form>

@ -12,20 +12,50 @@
<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">CarCenterManagerApp</a>
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">CarCenter</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="Home" asp-action="Index">Home</a>
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
<div class="navbar-nav">
<a class="nav-link " asp-area="" asp-controller="Home" asp-action="Index">Главное меню</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Справочники
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="nav-link " asp-area="" asp-controller="Home" asp-action="ListSales">Продажи</a></li>
<li><a class="nav-link " asp-area="" asp-controller="Home" asp-action="ListEmployees">Сотрудники</a></li>
<li><a class="nav-link " asp-area="" asp-controller="Home" asp-action="ListPreSaleWorks">Предпродажные работы</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Отчеты
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="nav-link " asp-area="" asp-controller="Home" asp-action="ListSaleEmployeeToFile">Отчет (word/excel) </a></li>
<li><a class="nav-link " asp-area="" asp-controller="Home" asp-action="ListSalesToPdfFile">Отчет (pdf) </a></li>
</ul>
</li>
</ul>
<a class="nav-link " asp-area="" asp-controller="Home" asp-action="AddEmployeeToPreSaleWork">Привязка сотрудников</a>
<a class="nav-link " asp-area="" asp-controller="Home" asp-action="Privacy">Менеджер</a>
<a class="nav-link " asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
<a class="nav-link " asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
</div>
</div>
</div>
</nav>
@ -38,7 +68,7 @@
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2024 - CarCenterManagerApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
&copy; 2024 - CarCenter - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>

@ -5,5 +5,6 @@
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
"AllowedHosts": "*",
"IPAddress": "http://localhost:5184/"
}