From 4232520c3c49d26a17694a68d3df89f48381dd66 Mon Sep 17 00:00:00 2001 From: K Date: Wed, 1 May 2024 19:02:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB(?= =?UTF-8?q?=E2=89=A7=E2=88=80=E2=89=A6)v?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeautySalonView/BeautySalonView.sln | 20 ++--- BeautySalonView/ClientWebApp/APIClient.cs | 68 ---------------- .../ClientWebApp/Views/Home/Enter.cshtml | 19 ----- .../ClientWebApp/Views/Home/Evaluation.cshtml | 44 ----------- .../Views/Home/FormationOrder.cshtml | 44 ----------- .../ClientWebApp/Views/Home/Order.cshtml | 44 ----------- .../ClientWebApp/Views/Home/Privacy.cshtml | 6 ++ .../ClientWebApp/Views/Home/Procedure.cshtml | 44 ----------- .../ClientWebApp/Views/Home/Register.cshtml | 25 ------ .../ClientWebApp/Views/Order/Create.cshtml | 75 ------------------ .../ClientWebApp/Views/Order/Update.cshtml | 77 ------------------- .../Views/Procedure/Update.cshtml | 51 ------------ .../ClientWebApp/Views/Rating/Create.cshtml | 25 ------ .../ClientWebApp/Views/Rating/Update.cshtml | 38 --------- .../ClientWebApp/Views/Shared/_Layout.cshtml | 33 ++------ BeautySalonView/ClientWebApp/appsettings.json | 3 +- .../Properties/launchSettings.json | 6 +- .../StaffMemberWebApp.csproj | 33 ++++++++ .../StaffMemberWebApp/Views/Home/Index.cshtml | 8 +- .../Views/Home/ListCosmetics.cshtml | 52 +++++++++++++ .../Views/Home/Report.cshtml | 48 ++++++++++++ .../Views/Service/Bind.cshtml} | 35 +++++---- .../Views/Shared/_Layout.cshtml | 33 ++++++-- 23 files changed, 209 insertions(+), 622 deletions(-) delete mode 100644 BeautySalonView/ClientWebApp/APIClient.cs delete mode 100644 BeautySalonView/ClientWebApp/Views/Home/Enter.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Home/Evaluation.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Home/FormationOrder.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Home/Order.cshtml create mode 100644 BeautySalonView/ClientWebApp/Views/Home/Privacy.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Home/Procedure.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Home/Register.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Order/Create.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Order/Update.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Procedure/Update.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Rating/Create.cshtml delete mode 100644 BeautySalonView/ClientWebApp/Views/Rating/Update.cshtml create mode 100644 BeautySalonView/StaffMemberWebApp/Views/Home/ListCosmetics.cshtml create mode 100644 BeautySalonView/StaffMemberWebApp/Views/Home/Report.cshtml rename BeautySalonView/{ClientWebApp/Views/Procedure/Create.cshtml => StaffMemberWebApp/Views/Service/Bind.cshtml} (51%) diff --git a/BeautySalonView/BeautySalonView.sln b/BeautySalonView/BeautySalonView.sln index 73d1008..af61013 100644 --- a/BeautySalonView/BeautySalonView.sln +++ b/BeautySalonView/BeautySalonView.sln @@ -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 diff --git a/BeautySalonView/ClientWebApp/APIClient.cs b/BeautySalonView/ClientWebApp/APIClient.cs deleted file mode 100644 index f46ca64..0000000 --- a/BeautySalonView/ClientWebApp/APIClient.cs +++ /dev/null @@ -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(string requestUrl) - { - var response = _client.GetAsync(requestUrl); - var result = response.Result.Content.ReadAsStringAsync().Result; - Console.WriteLine(requestUrl); - if (response.Result.IsSuccessStatusCode) - { - return JsonConvert.DeserializeObject(result); - } - else - { - throw new Exception(result); - } - } - - public static void PostRequest(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(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(result); - } - else - { - return default; - } - } - } -} diff --git a/BeautySalonView/ClientWebApp/Views/Home/Enter.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Enter.cshtml deleted file mode 100644 index 57576f8..0000000 --- a/BeautySalonView/ClientWebApp/Views/Home/Enter.cshtml +++ /dev/null @@ -1,19 +0,0 @@ -@{ - ViewData["Title"] = "Вход"; -} - -

Вход в приложение

- -
-
- - -
-
- - -
- -
\ No newline at end of file diff --git a/BeautySalonView/ClientWebApp/Views/Home/Evaluation.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Evaluation.cshtml deleted file mode 100644 index d219f55..0000000 --- a/BeautySalonView/ClientWebApp/Views/Home/Evaluation.cshtml +++ /dev/null @@ -1,44 +0,0 @@ -@using BeautySalonContracts.ViewModels - -@{ - ViewData["Title"] = "Оценки"; -} - -

Оценки

- -
- -
-
- - - - - - - - - - @foreach (var item in ViewBag.Rating) - { - - - - - - } - -
Баллы за процедуруБаллы за косметикуПроцедура
@item.PointsProcedure@item.PointsCosmetics@item.ProcedureName
-
- - diff --git a/BeautySalonView/ClientWebApp/Views/Home/FormationOrder.cshtml b/BeautySalonView/ClientWebApp/Views/Home/FormationOrder.cshtml deleted file mode 100644 index ba03400..0000000 --- a/BeautySalonView/ClientWebApp/Views/Home/FormationOrder.cshtml +++ /dev/null @@ -1,44 +0,0 @@ - -@{ - ViewData["Title"] = "FormationDinner"; -} - -
-

Формирование заказов

-
- - -
- @{ - if (Model == null) - { -

Авторизируйтесь

- return; - } - -

- Создать заказ -

- - - - - - - - - - @foreach (var item in Model) - { - - } - -
- Номер - - Дата создания - - Цена -
- } -
\ No newline at end of file diff --git a/BeautySalonView/ClientWebApp/Views/Home/Order.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Order.cshtml deleted file mode 100644 index e601dbc..0000000 --- a/BeautySalonView/ClientWebApp/Views/Home/Order.cshtml +++ /dev/null @@ -1,44 +0,0 @@ -@using BeautySalonContracts.ViewModels - -@{ - ViewData["Title"] = "Заказы"; -} - -

Заказы

- -
- -
-
- - - - - - - - - - @foreach (var item in ViewBag.Order) - { - - - - - - } - -
Номер заказаДата заказаСумма заказа
@item.Id@item.OrderDate@item.OrderAmount
-
- - diff --git a/BeautySalonView/ClientWebApp/Views/Home/Privacy.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Privacy.cshtml new file mode 100644 index 0000000..af4fb19 --- /dev/null +++ b/BeautySalonView/ClientWebApp/Views/Home/Privacy.cshtml @@ -0,0 +1,6 @@ +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/BeautySalonView/ClientWebApp/Views/Home/Procedure.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Procedure.cshtml deleted file mode 100644 index 100469e..0000000 --- a/BeautySalonView/ClientWebApp/Views/Home/Procedure.cshtml +++ /dev/null @@ -1,44 +0,0 @@ -@using BeautySalonContracts.ViewModels - -@{ - ViewData["Title"] = "Процедуры"; -} - -

Процедуры

- -
- -
-
- - - - - - - - - - @foreach (var item in ViewBag.Procedure) - { - - - - - - } - -
Наименование процедурыДлительность процедурыЦена процедуры
@item.ProcedureName@item.ProcedureDuration@item.ProcedurePrice
-
- - diff --git a/BeautySalonView/ClientWebApp/Views/Home/Register.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Register.cshtml deleted file mode 100644 index 87f3b84..0000000 --- a/BeautySalonView/ClientWebApp/Views/Home/Register.cshtml +++ /dev/null @@ -1,25 +0,0 @@ -@{ - ViewData["Title"] = "Регистрация"; -} - -

Регистрация

- -
-
- - -
-
- - -
-
- - -
-
- -
-
diff --git a/BeautySalonView/ClientWebApp/Views/Order/Create.cshtml b/BeautySalonView/ClientWebApp/Views/Order/Create.cshtml deleted file mode 100644 index 7cddaad..0000000 --- a/BeautySalonView/ClientWebApp/Views/Order/Create.cshtml +++ /dev/null @@ -1,75 +0,0 @@ -@{ - ViewData["Title"] = "Заказ"; -} - -

Создать заказ

- -

Выбранные услуги:

-
- - - - - - - - - - - - - - - - - -
НазваниеСтоимостьКоличество
Не выбрано
-
- -

Добавить услугу:

-

Наименование:

- -

Количество:

- - - -

Выбранные процедуры:

-
- - - - - - - - - - - - - - - - - -
НазваниеСтоимостьКоличество
Не выбрано
-
- -

Привязать процедуру:

-

Наименование:

- -

Количество:

- - - -

Стоимость заказа:

- - - - diff --git a/BeautySalonView/ClientWebApp/Views/Order/Update.cshtml b/BeautySalonView/ClientWebApp/Views/Order/Update.cshtml deleted file mode 100644 index e3e7755..0000000 --- a/BeautySalonView/ClientWebApp/Views/Order/Update.cshtml +++ /dev/null @@ -1,77 +0,0 @@ -@{ - ViewData["Title"] = "Заказ"; -} - -

Обновить заказ

- -

Выбранные услуги:

-
- - - - - - - - - - - - - - - - - -
НазваниеСтоимостьКоличество
Не выбрано
-
- -

Добавить услугу:

-

Наименование:

- -

Количество:

- - - -

Выбранные процедуры:

-
- - - - - - - - - - - - - - - - - -
НазваниеСтоимостьКоличество
Не выбрано
-
- -

Добавить процедуру:

-

Наименование:

- -

Количество:

- - - -

Стоимость заказа:

- - - - - - diff --git a/BeautySalonView/ClientWebApp/Views/Procedure/Update.cshtml b/BeautySalonView/ClientWebApp/Views/Procedure/Update.cshtml deleted file mode 100644 index 9459926..0000000 --- a/BeautySalonView/ClientWebApp/Views/Procedure/Update.cshtml +++ /dev/null @@ -1,51 +0,0 @@ -@{ - ViewData["Title"] = "Процедура"; -} - -

Обновить процедуру

- -

Название процедуры:

- - -

Выбранная косметика:

-
- - - - - - - - - - - - - - - - - - - -
БрендНаименование косметикиСтоимостьКоличество
Не выбрано
-
- -

Добавить косметику:

-

Наименование:

- -

Количество:

- - - -

Стоимость процедуры:

- - - - - - diff --git a/BeautySalonView/ClientWebApp/Views/Rating/Create.cshtml b/BeautySalonView/ClientWebApp/Views/Rating/Create.cshtml deleted file mode 100644 index fab79d7..0000000 --- a/BeautySalonView/ClientWebApp/Views/Rating/Create.cshtml +++ /dev/null @@ -1,25 +0,0 @@ -@{ - ViewData["Title"] = "Оценка"; -} - -

Создать оценку

- -
-

Баллы за процедуру:

- -

Баллы за косметику:

- -

Процедура:

- - -
- diff --git a/BeautySalonView/ClientWebApp/Views/Rating/Update.cshtml b/BeautySalonView/ClientWebApp/Views/Rating/Update.cshtml deleted file mode 100644 index 955aac5..0000000 --- a/BeautySalonView/ClientWebApp/Views/Rating/Update.cshtml +++ /dev/null @@ -1,38 +0,0 @@ -@{ - ViewData["Title"] = "Оценка"; -} - -

Обновить оценку

- -
- -

Баллы за процедуру:

- -

Баллы за косметику:

- -

Процедура:

- - -
- - \ No newline at end of file diff --git a/BeautySalonView/ClientWebApp/Views/Shared/_Layout.cshtml b/BeautySalonView/ClientWebApp/Views/Shared/_Layout.cshtml index c28d453..a1a4eb5 100644 --- a/BeautySalonView/ClientWebApp/Views/Shared/_Layout.cshtml +++ b/BeautySalonView/ClientWebApp/Views/Shared/_Layout.cshtml @@ -3,22 +3,16 @@ - @ViewData["Title"] - BeutySalonClientApp + @ViewData["Title"] - ClientWebApp - +