доделал(≧∀≦)v

This commit is contained in:
Milana Ievlewa 2024-05-01 19:02:05 +03:00
parent b65a2539c5
commit 4232520c3c
23 changed files with 209 additions and 622 deletions

View File

@ -13,9 +13,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonBusinessLogic",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeautySalonRestApi", "BeatySalonRestApi\BeautySalonRestApi.csproj", "{CF01D7E3-0253-4140-A472-C2CCD0C317B9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StaffMemberWebApp", "StaffMemberWebApp\StaffMemberWebApp.csproj", "{2DBE4FBF-BA61-4CCD-8AE7-DFA74AB2FA32}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StaffMemberWebApp", "StaffMemberWebApp\StaffMemberWebApp.csproj", "{1D290AE2-6C45-4FAE-9F2A-7088B820D8F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientWebApp", "ClientWebApp\ClientWebApp.csproj", "{B561ED93-1C27-43C5-A243-F120248683C0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientWebApp", "ClientWebApp\ClientWebApp.csproj", "{274D43C4-43DE-46D8-9CB9-57A1EE96A4E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -43,14 +43,14 @@ Global
{CF01D7E3-0253-4140-A472-C2CCD0C317B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF01D7E3-0253-4140-A472-C2CCD0C317B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF01D7E3-0253-4140-A472-C2CCD0C317B9}.Release|Any CPU.Build.0 = Release|Any CPU
{2DBE4FBF-BA61-4CCD-8AE7-DFA74AB2FA32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DBE4FBF-BA61-4CCD-8AE7-DFA74AB2FA32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DBE4FBF-BA61-4CCD-8AE7-DFA74AB2FA32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DBE4FBF-BA61-4CCD-8AE7-DFA74AB2FA32}.Release|Any CPU.Build.0 = Release|Any CPU
{B561ED93-1C27-43C5-A243-F120248683C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B561ED93-1C27-43C5-A243-F120248683C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B561ED93-1C27-43C5-A243-F120248683C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B561ED93-1C27-43C5-A243-F120248683C0}.Release|Any CPU.Build.0 = Release|Any CPU
{1D290AE2-6C45-4FAE-9F2A-7088B820D8F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D290AE2-6C45-4FAE-9F2A-7088B820D8F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D290AE2-6C45-4FAE-9F2A-7088B820D8F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D290AE2-6C45-4FAE-9F2A-7088B820D8F0}.Release|Any CPU.Build.0 = Release|Any CPU
{274D43C4-43DE-46D8-9CB9-57A1EE96A4E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{274D43C4-43DE-46D8-9CB9-57A1EE96A4E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{274D43C4-43DE-46D8-9CB9-57A1EE96A4E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{274D43C4-43DE-46D8-9CB9-57A1EE96A4E6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -1,68 +0,0 @@
using BeautySalonContracts.ViewModels;
using Newtonsoft.Json;
using System.Net.Http.Headers;
using System.Text;
namespace BeutySalonClientApp
{
public class APIClient
{
private static readonly HttpClient _client = new();
public static ClientViewModel? Client { get; set; } = null;
public static void Connect(IConfiguration configuration)
{
_client.BaseAddress = new Uri(configuration["IPAddress"]!);
_client.DefaultRequestHeaders.Accept.Clear();
_client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}
public static T? GetRequest<T>(string requestUrl)
{
var response = _client.GetAsync(requestUrl);
var result = response.Result.Content.ReadAsStringAsync().Result;
Console.WriteLine(requestUrl);
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 = _client.PostAsync(requestUrl, data);
var result = response.Result.Content.ReadAsStringAsync().Result;
if (!response.Result.IsSuccessStatusCode)
{
throw new Exception(result);
}
}
public static O? PostRequestWithResult<I, O>(string requestUrl, I model)
{
var json = JsonConvert.SerializeObject(model);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = _client.PostAsync(requestUrl, data);
var result = response.Result.Content.ReadAsStringAsync().Result;
if (response.Result.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<O>(result);
}
else
{
return default;
}
}
}
}

View File

@ -1,19 +0,0 @@
@{
ViewData["Title"] = "Вход";
}
<h4 class="fw-bold">Вход в приложение</h4>
<form method="post">
<div class="mb-3">
<label for="login" class="form-label">Логин:</label>
<input id="login" name="login" type="text" class="form-control" aria-label="Login">
</div>
<div class="mb-3">
<label for="password" class="form-label">Пароль:</label>
<input id="password" name="password" type="password" class="form-control" aria-label="Password">
</div>
<button type="submit" class="btn button-primary">
Войти
</button>
</form>

View File

@ -1,44 +0,0 @@
@using BeautySalonContracts.ViewModels
@{
ViewData["Title"] = "Оценки";
}
<h4 class="fw-bold">Оценки</h4>
<div class="d-flex flex-wrap align-items-center justify-content-between">
<div class="d-flex mb-2 gap-1">
<a asp-controller="Evaluation" asp-action="Create" class="button-primary">
Создать
</a>
<a id="update-button" class="button-primary">
Обновить
</a>
<button id="delete-button" class="button-primary me-5">
Удалить
</button>
</div>
</div>
<div class="border">
<table class="table mb-0">
<thead>
<tr>
<th>Баллы за процедуру</th>
<th>Баллы за косметику</th>
<th>Процедура</th>
</tr>
</thead>
<tbody>
@foreach (var item in ViewBag.Rating)
{
<tr class="table-row" id="row-@item.Id">
<td>@item.PointsProcedure</td>
<td>@item.PointsCosmetics</td>
<td>@item.ProcedureName</td>
</tr>
}
</tbody>
</table>
</div>
<script src="~/js/rating.js" asp-append-version="true"></script>

View File

@ -1,44 +0,0 @@

@{
ViewData["Title"] = "FormationDinner";
}
<div class="text-center">
<h1 class="display-4">Формирование заказов</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<p>
<a asp-action="Create">Создать заказ</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Дата создания
</th>
<th>
Цена
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
}
</tbody>
</table>
}
</div>

View File

@ -1,44 +0,0 @@
@using BeautySalonContracts.ViewModels
@{
ViewData["Title"] = "Заказы";
}
<h4 class="fw-bold">Заказы</h4>
<div class="d-flex flex-wrap align-items-center justify-content-between">
<div class="d-flex mb-2 gap-1">
<a asp-controller="Order" asp-action="Create" class="button-primary">
Создать
</a>
<a id="update-button" class="button-primary">
Обновить
</a>
<button id="delete-button" class="button-primary me-5">
Удалить
</button>
</div>
</div>
<div class="border">
<table class="table mb-0">
<thead>
<tr>
<th>Номер заказа</th>
<th>Дата заказа</th>
<th>Сумма заказа</th>
</tr>
</thead>
<tbody>
@foreach (var item in ViewBag.Order)
{
<tr class="table-row" id="row-@item.Id">
<td>@item.Id</td>
<td>@item.OrderDate</td>
<td>@item.OrderAmount</td>
</tr>
}
</tbody>
</table>
</div>
<script src="~/js/order.js" asp-append-version="true"></script>

View File

@ -0,0 +1,6 @@
@{
ViewData["Title"] = "Privacy Policy";
}
<h1>@ViewData["Title"]</h1>
<p>Use this page to detail your site's privacy policy.</p>

View File

@ -1,44 +0,0 @@
@using BeautySalonContracts.ViewModels
@{
ViewData["Title"] = "Процедуры";
}
<h4 class="fw-bold">Процедуры</h4>
<div class="d-flex flex-wrap align-items-center justify-content-between">
<div class="d-flex mb-2 gap-1">
<a asp-controller="Procedure" asp-action="Create" class="button-primary">
Создать
</a>
<a id="update-button" class="button-primary">
Обновить
</a>
<button id="delete-button" class="button-primary me-5">
Удалить
</button>
</div>
</div>
<div class="border">
<table class="table mb-0">
<thead>
<tr>
<th>Наименование процедуры</th>
<th>Длительность процедуры</th>
<th>Цена процедуры</th>
</tr>
</thead>
<tbody>
@foreach (var item in ViewBag.Procedure)
{
<tr class="table-row" id="row-@item.Id">
<td>@item.ProcedureName</td>
<td>@item.ProcedureDuration</td>
<td>@item.ProcedurePrice</td>
</tr>
}
</tbody>
</table>
</div>
<script src="~/js/procedure.js" asp-append-version="true"></script>

View File

@ -1,25 +0,0 @@
@{
ViewData["Title"] = "Регистрация";
}
<h4 class="fw-bold">Регистрация</h4>
<form method="post">
<div class="mb-3">
<label for="login" class="form-label">Логин:</label>
<input id="login" name="login" type="text" class="form-control" aria-label="Login">
</div>
<div class="mb-3">
<label for="password" class="form-label">Пароль:</label>
<input id="password" name="password" type="password" class="form-control" aria-label="Password">
</div>
<div class="mb-3">
<label for="email" class="form-label">Адрес электронной почты:</label>
<input id="email" name="email" type="email" class="form-control" aria-label="Email">
</div>
<div>
<button type="submit" class="btn button-primary">
Регистрация
</button>
</div>
</form>

View File

@ -1,75 +0,0 @@
@{
ViewData["Title"] = "Заказ";
}
<h4 class="fw-bold">Создать заказ</h4>
<p class="mb-0 fw-bold">Выбранные услуги:</p>
<div>
<table class="table mb-0">
<thead>
<tr>
<th>Название</th>
<th>Стоимость</th>
<th>Количество</th>
<th></th>
</tr>
</thead>
<tbody id="service-tbody">
<tr>
<td>Не выбрано</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<p class="mb-0 fw-bold">Добавить услугу:</p>
<p class="mb-0">Наименование:</p>
<select class="form-select mb-0" id="service-select"></select>
<p class="mb-0">Количество:</p>
<input type="number" min="1" value="1" id="service-count-input" class="form-control mb-2" />
<button id="add-service-button" class="button-primary">
Добавить
</button>
<p class="mb-0 fw-bold">Выбранные процедуры:</p>
<div>
<table class="table mb-0">
<thead>
<tr>
<th>Название</th>
<th>Стоимость</th>
<th>Количество</th>
<th></th>
</tr>
</thead>
<tbody id="procedure-tbody">
<tr>
<td>Не выбрано</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<p class="mb-0 fw-bold">Привязать процедуру:</p>
<p class="mb-0">Наименование:</p>
<select class="form-select mb-0" id="procedure-select"></select>
<p class="mb-0">Количество:</p>
<input type="number" min="1" value="1" id="procedure-count-input" class="form-control mb-2" />
<button id="add-procedure-button" class="button-primary">
Привязать
</button>
<p class="mb-0 fw-bold">Стоимость заказа:</p>
<input type="number" step="0.01" id="price-input" class="form-control mb-2" value="0.01" readonly />
<button id="create-button" class="button-primary">
Создать
</button>
<script src="~/js/order-create.js" asp-append-version="true"></script>

View File

@ -1,77 +0,0 @@
@{
ViewData["Title"] = "Заказ";
}
<h4 class="fw-bold">Обновить заказ</h4>
<p class="mb-0 fw-bold">Выбранные услуги:</p>
<div>
<table class="table mb-0">
<thead>
<tr>
<th>Название</th>
<th>Стоимость</th>
<th>Количество</th>
<th></th>
</tr>
</thead>
<tbody id="service-tbody">
<tr>
<td>Не выбрано</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<p class="mb-0 fw-bold">Добавить услугу:</p>
<p class="mb-0">Наименование:</p>
<select class="form-select mb-0" id="service-select"></select>
<p class="mb-0">Количество:</p>
<input type="number" min="1" value="1" id="service-count-input" class="form-control mb-2" />
<button id="add-service-button" class="button-primary">
Добавить
</button>
<p class="mb-0 fw-bold">Выбранные процедуры:</p>
<div>
<table class="table mb-0">
<thead>
<tr>
<th>Название</th>
<th>Стоимость</th>
<th>Количество</th>
<th></th>
</tr>
</thead>
<tbody id="procedure-tbody">
<tr>
<td>Не выбрано</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<p class="mb-0 fw-bold">Добавить процедуру:</p>
<p class="mb-0">Наименование:</p>
<select class="form-select mb-0" id="procedure-select"></select>
<p class="mb-0">Количество:</p>
<input type="number" min="1" value="1" id="procedure-count-input" class="form-control mb-2" />
<button id="add-procedure-button" class="button-primary">
Добавить
</button>
<p class="mb-0 fw-bold">Стоимость заказа:</p>
<input type="number" step="0.01" id="price-input" class="form-control mb-2" value="0.01" readonly />
<button id="update-button" class="button-primary">
Обновить
</button>
<input id="id" value="@ViewBag.Id" style="display: none;" />
<script src="~/js/order-update.js" asp-append-version="true"></script>

View File

@ -1,51 +0,0 @@
@{
ViewData["Title"] = "Процедура";
}
<h4 class="fw-bold">Обновить процедуру</h4>
<p class="mb-0">Название процедуры:</p>
<input id="name-input" class="form-control mb-2" />
<p class="mb-0 fw-bold">Выбранная косметика:</p>
<div>
<table class="table mb-0">
<thead>
<tr>
<th>Бренд</th>
<th>Наименование косметики</th>
<th>Стоимость</th>
<th>Количество</th>
<th></th>
</tr>
</thead>
<tbody id="tbody">
<tr>
<td>Не выбрано</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<p class="mb-0 fw-bold">Добавить косметику:</p>
<p class="mb-0">Наименование:</p>
<select class="form-select mb-0" id="cosmetic-select"></select>
<p class="mb-0">Количество:</p>
<input type="number" min="1" value="1" id="count-input" class="form-control mb-2" />
<button id="add-button" class="button-primary">
Добавить
</button>
<p class="mb-0 fw-bold">Стоимость процедуры:</p>
<input type="number" step="0.01" id="price-input" class="form-control mb-2" value="0.01" readonly />
<button id="update-button" class="button-primary">
Обновить
</button>
<input id="id" value="@ViewBag.Id" style="display: none;" />
<script src="~/js/procedure-update.js" asp-append-version="true"></script>

View File

@ -1,25 +0,0 @@
@{
ViewData["Title"] = "Оценка";
}
<h4 class="fw-bold">Создать оценку</h4>
<form method="post" asp-controller="Rating" asp-action="Create">
<p class="mb-0">Баллы за процедуру:</p>
<input type="number" min="0" max="10" step="0.01" name="pointsProcedure" class="form-control mb-2" />
<p class="mb-0">Баллы за косметику:</p>
<input type="number" min="0" max="10" step="0.01" name="pointsCosmetics" class="form-control mb-2" />
<p class="mb-0">Процедура:</p>
<select class="form-select mb-2" name="procedureId">
@foreach (var procedure in @ViewBag.Procedure)
{
<option value="@procedure.Id">
@(procedure.ProcedureName); @(procedure.ProcedurePrice) р.
</option>
}
</select>
<button class="button-primary text-button">
Создать
</button>
</form>

View File

@ -1,38 +0,0 @@
@{
ViewData["Title"] = "Оценка";
}
<h4 class="fw-bold">Обновить оценку</h4>
<form method="post" asp-controller="Rating" asp-action="Create">
<input name="id" value="@ViewBag.Rating.Id" style="display: none;" />
<p class="mb-0">Баллы за процедуру:</p>
<input type="number" min="0" max="10" step="0.01" name="pointsProcedure" class="form-control mb-2"
value="@ViewBag.Rating.PointsProcedure.ToString("0.00").Replace(",", ".")" />
<p class="mb-0">Баллы за косметику:</p>
<input type="number" min="0" max="10" step="0.01" name="pointsCosmetics" class="form-control mb-2"
value="@ViewBag.Rating.PointsCosmetics.ToString("0.00").Replace(",", ".")" />
<p class="mb-0">Процедура:</p>
<select class="form-select mb-2" name="procedureId">
@foreach (var procedure in @ViewBag.Procedure)
{
@if (procedure.Id == ViewBag.Rating.ProcedureId)
{
<option value="@procedure.Id" selected>
@(procedure.ProcedureName); @(procedure.ProcedurePrice) р.
</option>
}
else
{
<option value="@procedure.Id">
@(procedure.ProcedureName); @(procedure.ProcedurePrice) р.
</option>
}
}
</select>
<button class="button-primary text-button">
Обновить
</button>
</form>
<script src="~/js/rating.js" asp-append-version="true"></script>

View File

@ -3,22 +3,16 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - BeutySalonClientApp</title>
<title>@ViewData["Title"] - ClientWebApp</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="~/BeutySalonClientApp.styles.css" asp-append-version="true" />
<link rel="stylesheet" href="~/ClientWebApp.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">
<div class="d-flex flex-column">
<a class="navbar-brand fw-weight-bold py-0 px-2" asp-area="" asp-controller="Home" asp-action="Index">Вы Ужасны</a>
<div class="px-2">ClientApp</div>
</div>
<div class="mx-2">
<img src="https://png.pngtree.com/png-clipart/20191120/original/pngtree-spider-glyph-icon-vector-png-image_5056646.jpg" alt="mdo" width="35" height="35" class="rounded-circle">
</div>
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">ClientWebApp</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>
@ -26,25 +20,10 @@
<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="Register">Регистрация</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Авторизация</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Procedure">Процедуры</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Order">Заказы</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Rating">Оценки</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="ServiceList">Список</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Report">Отчет</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</li>
</ul>
</div>
@ -59,7 +38,7 @@
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2023 - BeutySalonClientApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
&copy; 2024 - ClientWebApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>

View File

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

View File

@ -3,8 +3,8 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:48777",
"sslPort": 44352
"applicationUrl": "http://localhost:57735",
"sslPort": 44336
}
},
"profiles": {
@ -12,7 +12,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7237;http://localhost:5264",
"applicationUrl": "https://localhost:7065;http://localhost:5059",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

View File

@ -6,4 +6,37 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<None Include="Views\Cosmetic\Create.cshtml" />
<None Include="Views\Cosmetic\Update.cshtml" />
<None Include="Views\Home\Cosmetic.cshtml" />
<None Include="Views\Home\Enter.cshtml" />
<None Include="Views\Home\Index.cshtml" />
<None Include="Views\Home\LaborCosts.cshtml" />
<None Include="Views\Home\ListCosmetics.cshtml" />
<None Include="Views\Home\Privacy.cshtml" />
<None Include="Views\Home\Register.cshtml" />
<None Include="Views\Home\Report.cshtml" />
<None Include="Views\Home\Service.cshtml" />
<None Include="Views\LaborCosts\Create.cshtml" />
<None Include="Views\LaborCosts\Update.cshtml" />
<None Include="Views\Service\Bind.cshtml" />
<None Include="Views\Service\Create.cshtml" />
<None Include="Views\Service\Update.cshtml" />
<None Include="Views\Shared\Error.cshtml" />
<None Include="Views\Shared\_Layout.cshtml" />
<None Include="Views\Shared\_ValidationScriptsPartial.cshtml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BeautySalonBusinessLogic\BeautySalonBusinessLogic.csproj" />
<ProjectReference Include="..\BeautySalonContracts\BeautySalonContracts.csproj" />
<ProjectReference Include="..\BeautySalonDatabaseImplement\BeautySalonDatabaseImplement.csproj" />
<ProjectReference Include="..\BeautySalonDataModels\BeautySalonDataModels.csproj" />
</ItemGroup>
</Project>

View File

@ -1,8 +1,8 @@
@{
ViewData["Title"] = "Home Page";
ViewData["Title"] = "HomePage";
}
<h1 class="display-4 text-center">текст в центре окей</h1>
<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>
</div>
<p><img src="https://sun9-39.userapi.com/impg/o2-mQK-4UlJ0wpYtHij7XS_LcKdrXrr4Rs1Yuw/WKELgu4v8do.jpg?size=1200x859&quality=96&sign=447006c6f7985c41d834b01b0d6d7993&type=album" alt="Logo" /></p>
</div>

View File

@ -0,0 +1,52 @@
@{
ViewData["Title"] = "Список косметики по процедурам";
}
<h4 class="fw-bold">Список косметики по процедурам</h4>
@{
if (ViewBag.IsAllowed == false)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<div class="mb-2">
<button id="word-button" class="button-primary">
Word
</button>
<button id="excel-button" class="button-primary">
Excel
</button>
</div>
<p class="mb-0">Выбранные процедуры:</p>
<div class="table-shell border">
<table class="table mb-0">
<thead class="table-head">
<tr>
<th>Наименование</th>
<th>Стоимость</th>
<th></th>
</tr>
</thead>
<tbody id="tbody">
<tr>
<td>Не выбрано</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<p class="mb-0">Добавить процедуру:</p>
<div class="d-flex gap-1 mb-2">
<select class="form-select mb-0" id="procedure-select"></select>
<button id="add-button" class="button-primary">
Добавить
</button>
</div>
<script src="~/js/list.js" asp-append-version="true"></script>
}

View File

@ -0,0 +1,48 @@
@{
ViewData["Title"] = "Report";
}
<h4 class="fw-bold">Отчет по услугам</h4>
<div class="d-flex flex-wrap gap-1 align-items-end mb-2">
<div class="mb-2">
<p class="mb-0">Дата начала:</p>
<input id="date-from-input" class="form-control" type="date" />
</div>
<div class="mb-2">
<p class="mb-0">Дата конца:</p>
<input id="date-to-input" class="form-control" type="date" />
</div>
<button id="generate-button" class="button-primary mb-2">
Показать
</button>
<button id="send-by-mail-button" class="button-primary mb-2">
На почту
</button>
</div>
<p class="mb-0">
<span>За период с&nbsp;</span>
<span id="date-from-span" class="fw-bold">...</span>
<span>&nbsp;по&nbsp;</span>
<span id="date-to-span" class="fw-bold">...</span>
</p>
<div class="table-shell mb-2 border">
<table class="table mb-0">
<thead class="table-head">
<tr>
<th>Дата создания</th>
<th>Услуга</th>
<th>Стоимость</th>
<th>Бренд косметики</th>
<th>Наименование</th>
<th>Стоимость косметики</th>
<th>Процедуры</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
<script src="~/js/report.js" asp-append-version="true"></script>

View File

@ -1,19 +1,24 @@
@{
ViewData["Title"] = "Процедура";
@{
ViewData["Title"] = "Binding";
}
<h4 class="fw-bold">Создать процедуру</h4>
<h4 class="fw-bold">Связать услугу с косметикой</h4>
<p class="mb-0">Название процедуры:</p>
<input id="name-input" class="form-control mb-2" />
<p class="mb-0 fw-bold">Выбранная косметика:</p>
<div>
<p class="mb-0">
<span>Id услуги:&nbsp;</span>
<span id="id">@ViewBag.ServiceId</span>
</p>
<p>
<span>Наименование услуги:&nbsp;</span>
<span id="service-name-span"></span>
</p>
<p class="mb-0">Привязанная косметика:</p>
<div class="table-shell mb-2 border">
<table class="table mb-0">
<thead>
<thead class="table-head">
<tr>
<th>Бренд</th>
<th>Наименование косметики</th>
<th>Наименование</th>
<th>Стоимость</th>
<th>Количество</th>
<th></th>
@ -31,7 +36,7 @@
</table>
</div>
<p class="mb-0 fw-bold">Добавить косметику:</p>
<p class="mb-0">Добавить косметику:</p>
<p class="mb-0">Наименование:</p>
<select class="form-select mb-0" id="cosmetic-select"></select>
<p class="mb-0">Количество:</p>
@ -40,10 +45,8 @@
Добавить
</button>
<p class="mb-0 fw-bold">Стоимость процедуры:</p>
<input type="number" step="0.01" id="price-input" class="form-control mb-2" value="0.01" readonly />
<button id="create-button" class="button-primary">
Создать
<button id="bind-button" class="button-primary text-button">
Привязать
</button>
<script src="~/js/procedure-create.js" asp-append-version="true"></script>
<script src="~/js/bind.js" asp-append-version="true"></script>

View File

@ -3,16 +3,22 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - StaffMemberWebApp</title>
<title>@ViewData["Title"] - StaffMemberApp</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="~/StaffMemberWebApp.styles.css" asp-append-version="true" />
<link rel="stylesheet" href="~/BeutySalonStaffMemberApp.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">StaffMemberWebApp</a>
<div class="d-flex flex-column">
<a class="navbar-brand fw-weight-bold py-0 px-2" asp-area="" asp-controller="Home" asp-action="Index">Вы Ужасны</a>
<div class="px-2">StaffMemberApp</div>
</div>
<div class="mx-2">
<img src="https://sun9-24.userapi.com/impg/AyVABOovpEhT_XRKJ5-AfQopMZCzJ1w9xOjNzw/XtXFrtPMWhc.jpg?size=1080x1092&quality=95&sign=822391009593062bec0a7ce08018b334&type=album" alt="mdo" width="35" height="35" class="rounded-circle">
</div>
<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>
@ -20,10 +26,25 @@
<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>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Авторизация</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Service">Услуги</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="LaborCosts">Трудозатраты</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Cosmetic">Косметика</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="ListCosmetics">Список</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Report">Отчет</a>
</li>
</ul>
</div>
@ -38,7 +59,7 @@
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2024 - StaffMemberWebApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
&copy; 2024 - StaffMemberApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>