From 083b08ae7c19fcaae07de8f569e2d0adc12e6569 Mon Sep 17 00:00:00 2001 From: Yourdax Date: Tue, 27 Aug 2024 04:03:48 +0400 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=D0=B8=D0=BA=D0=B8=20+?= =?UTF-8?q?=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5=D0=B9=D1=81(?= =?UTF-8?q?=D1=81=D0=B0=D0=B9=D1=82)=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B4=D1=83=D0=BA=D1=82=D0=BE=D0=B2=20=D0=B8=20=D0=B1?= =?UTF-8?q?=D0=BB=D1=8E=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DiningRoom/DiningRoom.sln | 12 + .../MailWorker/AbstractMailWorker.cs | 62 +++ .../MailWorker/MailKitWorker.cs | 48 +++ .../Controllers/HomeController.cs | 114 ----- DiningRoom/DiningRoomClientApp/Program.cs | 31 -- .../Views/Home/Create.cshtml | 50 --- .../Views/Home/Enter.cshtml | 21 - .../Views/Home/Index.cshtml | 8 - .../Views/Home/Mails.cshtml | 54 --- .../Views/Home/Privacy.cshtml | 6 - .../Views/Home/Register.cshtml | 25 -- .../Views/Shared/_Layout.cshtml | 55 --- .../Views/_ViewImports.cshtml | 3 - .../BindingModels/MailConfigBindingModel.cs | 18 + .../BindingModels/MailSendInfoBindingModel.cs | 15 + .../Implements/ProductStorage.cs | 15 +- ... 20240827000029_InitialCreate.Designer.cs} | 2 +- ...ate.cs => 20240827000029_InitialCreate.cs} | 0 .../Models/Product.cs | 27 +- .../Controllers/CardController.cs | 105 ----- .../Controllers/ComponentController.cs | 82 ---- .../Controllers/DrinkController.cs | 82 ---- .../Controllers/MainController.cs | 401 ++++++++++++++++++ .../Controllers/OrderController.cs | 84 ---- .../Controllers/ProductController.cs | 82 ---- .../Controllers/UserController.cs | 27 +- .../DiningRoomRestApi.csproj | 5 +- DiningRoom/DiningRoomRestApi/Program.cs | 92 ++-- .../Properties/launchSettings.json | 6 +- DiningRoom/DiningRoomRestApi/appsettings.json | 8 +- .../APIClient.cs} | 8 +- .../Controllers/HomeController.cs | 312 ++++++++++++++ .../DiningRoomUserApp.csproj} | 5 +- .../Models/ComponentUnitViewModel.cs | 20 + .../Models/ErrorViewModel.cs | 2 +- DiningRoom/DiningRoomUserApp/Program.cs | 38 ++ .../Properties/launchSettings.json | 8 +- .../Views/Home/Components.cshtml | 65 +++ .../Views/Home/CreateComponent.cshtml | 29 ++ .../Views/Home/CreateProduct.cshtml | 28 ++ .../Views/Home/DeleteComponent.cshtml | 22 + .../Views/Home/DeleteProduct.cshtml | 22 + .../DiningRoomUserApp/Views/Home/Enter.cshtml | 37 ++ .../DiningRoomUserApp/Views/Home/Index.cshtml | 50 +++ .../Views/Home/Privacy.cshtml | 43 ++ .../Views/Home/Products.cshtml | 59 +++ .../Views/Home/Register.cshtml | 40 ++ .../Views/Home/UpdateComponent.cshtml | 37 ++ .../Views/Home/UpdateProduct.cshtml | 70 +++ .../Views/Shared/Error.cshtml | 0 .../Views/Shared/_Layout.cshtml | 103 +++++ .../Views/Shared/_Layout.cshtml.css | 0 .../Shared/_ValidationScriptsPartial.cshtml | 0 .../Views/_ViewImports.cshtml | 3 + .../Views/_ViewStart.cshtml | 0 .../appsettings.Development.json | 0 .../appsettings.json | 3 +- .../DiningRoomUserApp/wwwroot/css/enter.css | 78 ++++ .../wwwroot/css/register.css | 73 ++++ .../wwwroot/css/site.css | 0 .../DiningRoomUserApp/wwwroot/css/style.css | 66 +++ .../wwwroot/favicon.ico | Bin .../wwwroot/js/site.js | 0 .../wwwroot/lib/bootstrap/LICENSE | 0 .../lib/bootstrap/dist/css/bootstrap-grid.css | 0 .../bootstrap/dist/css/bootstrap-grid.css.map | 0 .../bootstrap/dist/css/bootstrap-grid.min.css | 0 .../dist/css/bootstrap-grid.min.css.map | 0 .../bootstrap/dist/css/bootstrap-grid.rtl.css | 0 .../dist/css/bootstrap-grid.rtl.css.map | 0 .../dist/css/bootstrap-grid.rtl.min.css | 0 .../dist/css/bootstrap-grid.rtl.min.css.map | 0 .../bootstrap/dist/css/bootstrap-reboot.css | 0 .../dist/css/bootstrap-reboot.css.map | 0 .../dist/css/bootstrap-reboot.min.css | 0 .../dist/css/bootstrap-reboot.min.css.map | 0 .../dist/css/bootstrap-reboot.rtl.css | 0 .../dist/css/bootstrap-reboot.rtl.css.map | 0 .../dist/css/bootstrap-reboot.rtl.min.css | 0 .../dist/css/bootstrap-reboot.rtl.min.css.map | 0 .../dist/css/bootstrap-utilities.css | 0 .../dist/css/bootstrap-utilities.css.map | 0 .../dist/css/bootstrap-utilities.min.css | 0 .../dist/css/bootstrap-utilities.min.css.map | 0 .../dist/css/bootstrap-utilities.rtl.css | 0 .../dist/css/bootstrap-utilities.rtl.css.map | 0 .../dist/css/bootstrap-utilities.rtl.min.css | 0 .../css/bootstrap-utilities.rtl.min.css.map | 0 .../lib/bootstrap/dist/css/bootstrap.css | 0 .../lib/bootstrap/dist/css/bootstrap.css.map | 0 .../lib/bootstrap/dist/css/bootstrap.min.css | 0 .../bootstrap/dist/css/bootstrap.min.css.map | 0 .../lib/bootstrap/dist/css/bootstrap.rtl.css | 0 .../bootstrap/dist/css/bootstrap.rtl.css.map | 0 .../bootstrap/dist/css/bootstrap.rtl.min.css | 0 .../dist/css/bootstrap.rtl.min.css.map | 0 .../lib/bootstrap/dist/js/bootstrap.bundle.js | 0 .../bootstrap/dist/js/bootstrap.bundle.js.map | 0 .../bootstrap/dist/js/bootstrap.bundle.min.js | 0 .../dist/js/bootstrap.bundle.min.js.map | 0 .../lib/bootstrap/dist/js/bootstrap.esm.js | 0 .../bootstrap/dist/js/bootstrap.esm.js.map | 0 .../bootstrap/dist/js/bootstrap.esm.min.js | 0 .../dist/js/bootstrap.esm.min.js.map | 0 .../lib/bootstrap/dist/js/bootstrap.js | 0 .../lib/bootstrap/dist/js/bootstrap.js.map | 0 .../lib/bootstrap/dist/js/bootstrap.min.js | 0 .../bootstrap/dist/js/bootstrap.min.js.map | 0 .../jquery-validation-unobtrusive/LICENSE.txt | 0 .../jquery.validate.unobtrusive.js | 0 .../jquery.validate.unobtrusive.min.js | 0 .../wwwroot/lib/jquery-validation/LICENSE.md | 0 .../dist/additional-methods.js | 0 .../dist/additional-methods.min.js | 0 .../jquery-validation/dist/jquery.validate.js | 0 .../dist/jquery.validate.min.js | 0 .../wwwroot/lib/jquery/LICENSE.txt | 0 .../wwwroot/lib/jquery/dist/jquery.js | 0 .../wwwroot/lib/jquery/dist/jquery.min.js | 0 .../wwwroot/lib/jquery/dist/jquery.min.map | 0 120 files changed, 1881 insertions(+), 880 deletions(-) create mode 100644 DiningRoom/DiningRoomBusinessLogic/MailWorker/AbstractMailWorker.cs create mode 100644 DiningRoom/DiningRoomBusinessLogic/MailWorker/MailKitWorker.cs delete mode 100644 DiningRoom/DiningRoomClientApp/Controllers/HomeController.cs delete mode 100644 DiningRoom/DiningRoomClientApp/Program.cs delete mode 100644 DiningRoom/DiningRoomClientApp/Views/Home/Create.cshtml delete mode 100644 DiningRoom/DiningRoomClientApp/Views/Home/Enter.cshtml delete mode 100644 DiningRoom/DiningRoomClientApp/Views/Home/Index.cshtml delete mode 100644 DiningRoom/DiningRoomClientApp/Views/Home/Mails.cshtml delete mode 100644 DiningRoom/DiningRoomClientApp/Views/Home/Privacy.cshtml delete mode 100644 DiningRoom/DiningRoomClientApp/Views/Home/Register.cshtml delete mode 100644 DiningRoom/DiningRoomClientApp/Views/Shared/_Layout.cshtml delete mode 100644 DiningRoom/DiningRoomClientApp/Views/_ViewImports.cshtml create mode 100644 DiningRoom/DiningRoomContracts/BindingModels/MailConfigBindingModel.cs create mode 100644 DiningRoom/DiningRoomContracts/BindingModels/MailSendInfoBindingModel.cs rename DiningRoom/DiningRoomDatabaseImplement/Migrations/{20240527031110_InitialCreate.Designer.cs => 20240827000029_InitialCreate.Designer.cs} (99%) rename DiningRoom/DiningRoomDatabaseImplement/Migrations/{20240527031110_InitialCreate.cs => 20240827000029_InitialCreate.cs} (100%) delete mode 100644 DiningRoom/DiningRoomRestApi/Controllers/CardController.cs delete mode 100644 DiningRoom/DiningRoomRestApi/Controllers/ComponentController.cs delete mode 100644 DiningRoom/DiningRoomRestApi/Controllers/DrinkController.cs create mode 100644 DiningRoom/DiningRoomRestApi/Controllers/MainController.cs delete mode 100644 DiningRoom/DiningRoomRestApi/Controllers/OrderController.cs delete mode 100644 DiningRoom/DiningRoomRestApi/Controllers/ProductController.cs rename DiningRoom/{DiningRoomClientApp/APIUser.cs => DiningRoomUserApp/APIClient.cs} (92%) create mode 100644 DiningRoom/DiningRoomUserApp/Controllers/HomeController.cs rename DiningRoom/{DiningRoomClientApp/DiningRoomClientApp.csproj => DiningRoomUserApp/DiningRoomUserApp.csproj} (50%) create mode 100644 DiningRoom/DiningRoomUserApp/Models/ComponentUnitViewModel.cs rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/Models/ErrorViewModel.cs (81%) create mode 100644 DiningRoom/DiningRoomUserApp/Program.cs rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/Properties/launchSettings.json (74%) create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/Components.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/CreateComponent.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/CreateProduct.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/DeleteComponent.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/DeleteProduct.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/Enter.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/Index.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/Privacy.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/Products.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/Register.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/UpdateComponent.cshtml create mode 100644 DiningRoom/DiningRoomUserApp/Views/Home/UpdateProduct.cshtml rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/Views/Shared/Error.cshtml (100%) create mode 100644 DiningRoom/DiningRoomUserApp/Views/Shared/_Layout.cshtml rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/Views/Shared/_Layout.cshtml.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/Views/Shared/_ValidationScriptsPartial.cshtml (100%) create mode 100644 DiningRoom/DiningRoomUserApp/Views/_ViewImports.cshtml rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/Views/_ViewStart.cshtml (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/appsettings.Development.json (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/appsettings.json (65%) create mode 100644 DiningRoom/DiningRoomUserApp/wwwroot/css/enter.css create mode 100644 DiningRoom/DiningRoomUserApp/wwwroot/css/register.css rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/css/site.css (100%) create mode 100644 DiningRoom/DiningRoomUserApp/wwwroot/css/style.css rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/favicon.ico (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/js/site.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/LICENSE (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery-validation/LICENSE.md (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery-validation/dist/additional-methods.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery-validation/dist/additional-methods.min.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery-validation/dist/jquery.validate.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery/LICENSE.txt (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery/dist/jquery.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery/dist/jquery.min.js (100%) rename DiningRoom/{DiningRoomClientApp => DiningRoomUserApp}/wwwroot/lib/jquery/dist/jquery.min.map (100%) diff --git a/DiningRoom/DiningRoom.sln b/DiningRoom/DiningRoom.sln index f197d1c..94f295c 100644 --- a/DiningRoom/DiningRoom.sln +++ b/DiningRoom/DiningRoom.sln @@ -13,6 +13,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiningRoomDatabaseImplement EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiningRoomBusinessLogic", "DiningRoomBusinessLogic\DiningRoomBusinessLogic.csproj", "{89A8AB71-ADD4-405D-AE0B-03ACB1A1BF24}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiningRoomRestApi", "DiningRoomRestApi\DiningRoomRestApi.csproj", "{B81DDA1C-49FC-480F-AEED-37049C57993E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiningRoomUserApp", "DiningRoomUserApp\DiningRoomUserApp.csproj", "{B33F6026-6F6D-4337-887F-4D326D8FA511}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +43,14 @@ Global {89A8AB71-ADD4-405D-AE0B-03ACB1A1BF24}.Debug|Any CPU.Build.0 = Debug|Any CPU {89A8AB71-ADD4-405D-AE0B-03ACB1A1BF24}.Release|Any CPU.ActiveCfg = Release|Any CPU {89A8AB71-ADD4-405D-AE0B-03ACB1A1BF24}.Release|Any CPU.Build.0 = Release|Any CPU + {B81DDA1C-49FC-480F-AEED-37049C57993E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B81DDA1C-49FC-480F-AEED-37049C57993E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B81DDA1C-49FC-480F-AEED-37049C57993E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B81DDA1C-49FC-480F-AEED-37049C57993E}.Release|Any CPU.Build.0 = Release|Any CPU + {B33F6026-6F6D-4337-887F-4D326D8FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B33F6026-6F6D-4337-887F-4D326D8FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B33F6026-6F6D-4337-887F-4D326D8FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B33F6026-6F6D-4337-887F-4D326D8FA511}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/DiningRoom/DiningRoomBusinessLogic/MailWorker/AbstractMailWorker.cs b/DiningRoom/DiningRoomBusinessLogic/MailWorker/AbstractMailWorker.cs new file mode 100644 index 0000000..56f41fb --- /dev/null +++ b/DiningRoom/DiningRoomBusinessLogic/MailWorker/AbstractMailWorker.cs @@ -0,0 +1,62 @@ +using DiningRoomContracts.BindingModels; +using DiningRoomContracts.BusinessLogicContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiningRoomBusinessLogic.MailWorker +{ + public abstract class AbstractMailWorker + { + protected string _mailLogin = string.Empty; + protected string _mailPassword = string.Empty; + protected string _smtpClientHost = string.Empty; + protected int _smtpClientPort; + protected string _popHost = string.Empty; + protected int _popPort; + private readonly ILogger _logger; + + public AbstractMailWorker() + { + + } + + public void MailConfig(MailConfigBindingModel config) + { + _mailLogin = config.MailLogin; + _mailPassword = config.MailPassword; + _smtpClientHost = config.SmtpClientHost; + _smtpClientPort = config.SmtpClientPort; + _popHost = config.PopHost; + _popPort = config.PopPort; + + } + + public async void MailSendAsync(MailSendInfoBindingModel info) + { + if (string.IsNullOrEmpty(_mailLogin) || string.IsNullOrEmpty(_mailPassword)) + { + return; + } + + if (string.IsNullOrEmpty(_smtpClientHost) || _smtpClientPort == 0) + { + return; + } + + if (string.IsNullOrEmpty(info.MailAddress) || string.IsNullOrEmpty(info.Subject) || string.IsNullOrEmpty(info.Text)) + { + return; + } + + _logger.LogDebug("Send Mail: {To}, {Subject}", info.MailAddress, info.Subject); + + await SendMailAsync(info); + } + + protected abstract Task SendMailAsync(MailSendInfoBindingModel info); + } +} diff --git a/DiningRoom/DiningRoomBusinessLogic/MailWorker/MailKitWorker.cs b/DiningRoom/DiningRoomBusinessLogic/MailWorker/MailKitWorker.cs new file mode 100644 index 0000000..8ff3a28 --- /dev/null +++ b/DiningRoom/DiningRoomBusinessLogic/MailWorker/MailKitWorker.cs @@ -0,0 +1,48 @@ +using DiningRoomContracts.BindingModels; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Mail; +using System.Net.Mime; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using DiningRoomContracts.BusinessLogicContracts; + +namespace DiningRoomBusinessLogic.MailWorker +{ + public class MailKitWorker : AbstractMailWorker + { + public MailKitWorker() : base() { } + + protected override async Task SendMailAsync(MailSendInfoBindingModel info) + { + using var objMailMessage = new MailMessage(); + using var objSmtpClient = new SmtpClient(_smtpClientHost, _smtpClientPort); + + try + { + objMailMessage.From = new MailAddress(_mailLogin); + objMailMessage.To.Add(new MailAddress(info.MailAddress)); + objMailMessage.Subject = info.Subject; + objMailMessage.Body = info.Text; + objMailMessage.SubjectEncoding = Encoding.UTF8; + objMailMessage.BodyEncoding = Encoding.UTF8; + Attachment attachment = new Attachment("C:\\Users\\sshan\\OneDrive\\Desktop\\reports\\reportpdf.pdf", new ContentType(MediaTypeNames.Application.Pdf)); + objMailMessage.Attachments.Add(attachment); + + objSmtpClient.UseDefaultCredentials = false; + objSmtpClient.EnableSsl = true; + objSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; + objSmtpClient.Credentials = new NetworkCredential(_mailLogin, _mailPassword); + + await Task.Run(() => objSmtpClient.Send(objMailMessage)); + } + catch (Exception) + { + throw; + } + } + } +} diff --git a/DiningRoom/DiningRoomClientApp/Controllers/HomeController.cs b/DiningRoom/DiningRoomClientApp/Controllers/HomeController.cs deleted file mode 100644 index a49636b..0000000 --- a/DiningRoom/DiningRoomClientApp/Controllers/HomeController.cs +++ /dev/null @@ -1,114 +0,0 @@ -using DiningRoomClientApp.Models; -using DiningRoomContracts.BindingModels; -using DiningRoomContracts.ViewModels; -using Microsoft.AspNetCore.Mvc; -using System.Diagnostics; -using DiningRoomClientApp; - - -namespace DiningRoomClientApp.Controllers -{ - public class HomeController : Controller - { - private readonly ILogger _logger; - - public HomeController(ILogger logger) - { - _logger = logger; - } - - public IActionResult Index() - { - if (APIUser.User == null) - { - return Redirect("~/Home/Enter"); - } - return View(/*APIUser.GetRequest>($"api/main/getorders?userId={APIUser.User.Id}")*/); - } - - [HttpGet] - public IActionResult Privacy() - { - if (APIUser.User == null) - { - return Redirect("~/Home/Enter"); - } - return View(APIUser.User); - } - - [HttpPost] - public void Privacy(string login, string password, string email) - { - if (APIUser.User == null) - { - throw new Exception("Вход только авторизованным"); - } - if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(email)) - { - throw new Exception("Введите логин, пароль и почту"); - } - APIUser.PostRequest("api/user/updatedata", new UserBindingModel - { - Id = APIUser.User.Id, - Login = login, - Password = password, - Email = email - }); - - APIUser.User.Login = login; - APIUser.User.Password = password; - APIUser.User.Email = email; - Response.Redirect("Index"); - } - - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - public IActionResult Error() - { - return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); - } - - [HttpGet] - public IActionResult Enter() - { - return View(); - } - - [HttpPost] - public void Enter(string login, string password) - { - if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password)) - { - throw new Exception("Введите логин и пароль"); - } - APIUser.User = APIUser.GetRequest($"api/user/login?login={login}&password={password}"); - if (APIUser.User == null) - { - throw new Exception("Неверный логин/пароль"); - } - Response.Redirect("Index"); - } - - [HttpGet] - public IActionResult Register() - { - return View(); - } - - [HttpPost] - public void Register(string login, string password, string email) - { - if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(email)) - { - throw new Exception("Введите логин, пароль и почту"); - } - APIUser.PostRequest("api/user/register", new UserBindingModel - { - Login = login, - Password = password, - Email = email - }); - Response.Redirect("Enter"); - return; - } - } -} \ No newline at end of file diff --git a/DiningRoom/DiningRoomClientApp/Program.cs b/DiningRoom/DiningRoomClientApp/Program.cs deleted file mode 100644 index 08e9cdc..0000000 --- a/DiningRoom/DiningRoomClientApp/Program.cs +++ /dev/null @@ -1,31 +0,0 @@ -using DiningRoomClientApp; - -var builder = WebApplication.CreateBuilder(args); - -// Add services to the container. -builder.Services.AddControllersWithViews(); - -var app = builder.Build(); - -APIUser.Connect(builder.Configuration); - -// Configure the HTTP request pipeline. -if (!app.Environment.IsDevelopment()) -{ - app.UseExceptionHandler("/Home/Error"); - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); -} - -app.UseHttpsRedirection(); -app.UseStaticFiles(); - -app.UseRouting(); - -app.UseAuthorization(); - -app.MapControllerRoute( - name: "default", - pattern: "{controller=Home}/{action=Index}/{id?}"); - -app.Run(); diff --git a/DiningRoom/DiningRoomClientApp/Views/Home/Create.cshtml b/DiningRoom/DiningRoomClientApp/Views/Home/Create.cshtml deleted file mode 100644 index 6b2138f..0000000 --- a/DiningRoom/DiningRoomClientApp/Views/Home/Create.cshtml +++ /dev/null @@ -1,50 +0,0 @@ -@{ - ViewData["Title"] = "Create"; -} -
-

Создание заказа

-
-
-
-
Изделие:
-
- -
-
-
-
Количество:
-
-
-
-
Сумма:
-
-
-
-
-
-
-
- - diff --git a/DiningRoom/DiningRoomClientApp/Views/Home/Enter.cshtml b/DiningRoom/DiningRoomClientApp/Views/Home/Enter.cshtml deleted file mode 100644 index bca6d69..0000000 --- a/DiningRoom/DiningRoomClientApp/Views/Home/Enter.cshtml +++ /dev/null @@ -1,21 +0,0 @@ -@{ - ViewData["Title"] = "Enter"; -} - -
-

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

-
-
-
-
Логин:
-
-
-
-
Пароль:
-
-
-
-
-
-
-
diff --git a/DiningRoom/DiningRoomClientApp/Views/Home/Index.cshtml b/DiningRoom/DiningRoomClientApp/Views/Home/Index.cshtml deleted file mode 100644 index d2d19bd..0000000 --- a/DiningRoom/DiningRoomClientApp/Views/Home/Index.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -
-

Welcome

-

Learn about building Web apps with ASP.NET Core.

-
diff --git a/DiningRoom/DiningRoomClientApp/Views/Home/Mails.cshtml b/DiningRoom/DiningRoomClientApp/Views/Home/Mails.cshtml deleted file mode 100644 index 3a177ef..0000000 --- a/DiningRoom/DiningRoomClientApp/Views/Home/Mails.cshtml +++ /dev/null @@ -1,54 +0,0 @@ -@using CarpentryWorkshopContracts.ViewModels - -@model List - -@{ - ViewData["Title"] = "Mails"; -} - -
-

Заказы

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

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

- return; - } - - - - - - - - - - - @foreach (var item in Model) - { - - - - - - } - -
- Дата письма - - Заголовок - - Текст -
- @Html.DisplayFor(modelItem => item.DateDelivery) - - @Html.DisplayFor(modelItem => item.Subject) - - @Html.DisplayFor(modelItem => item.Body) -
- } -
diff --git a/DiningRoom/DiningRoomClientApp/Views/Home/Privacy.cshtml b/DiningRoom/DiningRoomClientApp/Views/Home/Privacy.cshtml deleted file mode 100644 index af4fb19..0000000 --- a/DiningRoom/DiningRoomClientApp/Views/Home/Privacy.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Privacy Policy"; -} -

@ViewData["Title"]

- -

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

diff --git a/DiningRoom/DiningRoomClientApp/Views/Home/Register.cshtml b/DiningRoom/DiningRoomClientApp/Views/Home/Register.cshtml deleted file mode 100644 index cde6ee4..0000000 --- a/DiningRoom/DiningRoomClientApp/Views/Home/Register.cshtml +++ /dev/null @@ -1,25 +0,0 @@ -@{ - ViewData["Title"] = "Register"; -} - -
-

Регистрация

-
-
-
-
Логин:
-
-
-
-
Пароль:
-
-
-
-
Почта:
-
-
-
-
-
-
-
diff --git a/DiningRoom/DiningRoomClientApp/Views/Shared/_Layout.cshtml b/DiningRoom/DiningRoomClientApp/Views/Shared/_Layout.cshtml deleted file mode 100644 index 6b66a2f..0000000 --- a/DiningRoom/DiningRoomClientApp/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - @ViewData["Title"] - DiningRoomClientApp - - - - - -
- -
-
-
- @RenderBody() -
-
- -
-
- © 2024 - DiningRoomClientApp - Privacy -
-
- - - - @await RenderSectionAsync("Scripts", required: false) - - diff --git a/DiningRoom/DiningRoomClientApp/Views/_ViewImports.cshtml b/DiningRoom/DiningRoomClientApp/Views/_ViewImports.cshtml deleted file mode 100644 index df49110..0000000 --- a/DiningRoom/DiningRoomClientApp/Views/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using DiningRoomClientApp -@using DiningRoomClientApp.Models -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/DiningRoom/DiningRoomContracts/BindingModels/MailConfigBindingModel.cs b/DiningRoom/DiningRoomContracts/BindingModels/MailConfigBindingModel.cs new file mode 100644 index 0000000..f0165ec --- /dev/null +++ b/DiningRoom/DiningRoomContracts/BindingModels/MailConfigBindingModel.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiningRoomContracts.BindingModels +{ + public class MailConfigBindingModel + { + public string MailLogin { get; set; } = string.Empty; + public string MailPassword { get; set; } = string.Empty; + public string SmtpClientHost { get; set; } = string.Empty; + public int SmtpClientPort { get; set; } + public string PopHost { get; set; } = string.Empty; + public int PopPort { get; set; } + } +} diff --git a/DiningRoom/DiningRoomContracts/BindingModels/MailSendInfoBindingModel.cs b/DiningRoom/DiningRoomContracts/BindingModels/MailSendInfoBindingModel.cs new file mode 100644 index 0000000..d2d9caa --- /dev/null +++ b/DiningRoom/DiningRoomContracts/BindingModels/MailSendInfoBindingModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiningRoomContracts.BindingModels +{ + public class MailSendInfoBindingModel + { + public string MailAddress { get; set; } = string.Empty; + public string Subject { get; set; } = string.Empty; + public string Text { get; set; } = string.Empty; + } +} diff --git a/DiningRoom/DiningRoomDatabaseImplement/Implements/ProductStorage.cs b/DiningRoom/DiningRoomDatabaseImplement/Implements/ProductStorage.cs index aa3428f..f3d170e 100644 --- a/DiningRoom/DiningRoomDatabaseImplement/Implements/ProductStorage.cs +++ b/DiningRoom/DiningRoomDatabaseImplement/Implements/ProductStorage.cs @@ -76,15 +76,20 @@ namespace DiningRoomDatabaseImplement.Implements using var transaction = context.Database.BeginTransaction(); try { - var Product = context.Products.FirstOrDefault(rec => rec.Id == model.Id); + var Product = context.Products + .Include(x => x.Components) + .ThenInclude(x => x.Component) + .FirstOrDefault(rec => rec.Id == model.Id); if (Product == null) { return null; } - Product.Update(model); - context.SaveChanges(); - Product.UpdateComponents(context, model); - transaction.Commit(); + + Product.UpdateComponents(context, model); + context.SaveChanges(); + Product.Update(model); + context.SaveChanges(); + transaction.Commit(); return Product.GetViewModel; } catch diff --git a/DiningRoom/DiningRoomDatabaseImplement/Migrations/20240527031110_InitialCreate.Designer.cs b/DiningRoom/DiningRoomDatabaseImplement/Migrations/20240827000029_InitialCreate.Designer.cs similarity index 99% rename from DiningRoom/DiningRoomDatabaseImplement/Migrations/20240527031110_InitialCreate.Designer.cs rename to DiningRoom/DiningRoomDatabaseImplement/Migrations/20240827000029_InitialCreate.Designer.cs index 1083cdf..642f2f4 100644 --- a/DiningRoom/DiningRoomDatabaseImplement/Migrations/20240527031110_InitialCreate.Designer.cs +++ b/DiningRoom/DiningRoomDatabaseImplement/Migrations/20240827000029_InitialCreate.Designer.cs @@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace DiningRoomDatabaseImplement.Migrations { [DbContext(typeof(DiningRoomDatabase))] - [Migration("20240527031110_InitialCreate")] + [Migration("20240827000029_InitialCreate")] partial class InitialCreate { /// diff --git a/DiningRoom/DiningRoomDatabaseImplement/Migrations/20240527031110_InitialCreate.cs b/DiningRoom/DiningRoomDatabaseImplement/Migrations/20240827000029_InitialCreate.cs similarity index 100% rename from DiningRoom/DiningRoomDatabaseImplement/Migrations/20240527031110_InitialCreate.cs rename to DiningRoom/DiningRoomDatabaseImplement/Migrations/20240827000029_InitialCreate.cs diff --git a/DiningRoom/DiningRoomDatabaseImplement/Models/Product.cs b/DiningRoom/DiningRoomDatabaseImplement/Models/Product.cs index 7bcfb47..2743af5 100644 --- a/DiningRoom/DiningRoomDatabaseImplement/Models/Product.cs +++ b/DiningRoom/DiningRoomDatabaseImplement/Models/Product.cs @@ -69,20 +69,20 @@ namespace DiningRoomDatabaseImplement.Models }; public void UpdateComponents(DiningRoomDatabase context, ProductBindingModel model) { + // Получаем список текущих записей ProductComponents для продукта var productComponents = context.ProductComponents.Where(rec => rec.ProductId == model.Id).ToList(); + + // Удаляем все текущие записи if (productComponents != null && productComponents.Count > 0) - { // удалили те, которых нет в модели - context.ProductComponents.RemoveRange(productComponents.Where(rec => !model.ProductComponents.ContainsKey(rec.ComponentId))); - context.SaveChanges(); - // обновили количество у существующих записей - foreach (var updateComponent in productComponents) - { - updateComponent.Count = model.ProductComponents[updateComponent.ComponentId].Item2; - model.ProductComponents.Remove(updateComponent.ComponentId); - } + { + context.ProductComponents.RemoveRange(productComponents); context.SaveChanges(); } - var product = context.Products.First(x => x.Id == Id); + + // Получаем продукт по его Id + var product = context.Products.First(x => x.Id == model.Id); + + // Добавляем новые записи ProductComponents из модели foreach (var pc in model.ProductComponents) { context.ProductComponents.Add(new ProductComponent @@ -91,9 +91,14 @@ namespace DiningRoomDatabaseImplement.Models Component = context.Components.First(x => x.Id == pc.Key), Count = pc.Value.Item2 }); - context.SaveChanges(); } + + // Сохраняем изменения + context.SaveChanges(); + + // Сбрасываем кэш связанных компонентов, если требуется _productComponents = null; } + } } diff --git a/DiningRoom/DiningRoomRestApi/Controllers/CardController.cs b/DiningRoom/DiningRoomRestApi/Controllers/CardController.cs deleted file mode 100644 index c8ea5c5..0000000 --- a/DiningRoom/DiningRoomRestApi/Controllers/CardController.cs +++ /dev/null @@ -1,105 +0,0 @@ -using DiningRoomContracts.BindingModels; -using DiningRoomContracts.BusinessLogicContracts; -using DiningRoomContracts.SearchModels; -using DiningRoomContracts.ViewModels; -using Microsoft.AspNetCore.Mvc; - -namespace DiningRoomRestApi.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - public class CardController : Controller - { - private readonly ILogger _logger; - - private readonly ICardLogic _logic; - - public CardController(ICardLogic logic, ILogger logger) - { - _logger = logger; - _logic = logic; - } - - - [HttpGet] - public CardViewModel? GetCard(int id) - { - try - { - return _logic.ReadElement(new CardSearchModel - { - Id = id - }); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка получения заказа"); - throw; - } - } - - /// - /// Получение карт по id(полный список, кот. будет выводиться) - /// - - [HttpGet] - public List? GetCards(int Id) - { - try - { - return _logic.ReadList(new CardSearchModel { Id = Id }); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка получения списка заказов клиента id={Id}", Id); - throw; - } - } - - - [HttpPost] - public void CreateCard(CardBindingModel model) - { - try - { - _logic.Create(model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка создания заказа"); - throw; - } - } - - - - - [HttpPost] - public void UpdateCard(CardBindingModel model) - { - try - { - _logic.Update(model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка обновления заказа"); - throw; - } - } - - [HttpDelete] - public void DeleteCard(CardBindingModel model) - { - try - { - _logic.Delete(model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка удаления заказа"); - throw; - } - } - } -} diff --git a/DiningRoom/DiningRoomRestApi/Controllers/ComponentController.cs b/DiningRoom/DiningRoomRestApi/Controllers/ComponentController.cs deleted file mode 100644 index e999d33..0000000 --- a/DiningRoom/DiningRoomRestApi/Controllers/ComponentController.cs +++ /dev/null @@ -1,82 +0,0 @@ -using DiningRoomContracts.BindingModels; -using DiningRoomContracts.BusinessLogicContracts; -using DiningRoomContracts.SearchModels; -using DiningRoomContracts.ViewModels; -using Microsoft.AspNetCore.Mvc; - -namespace DiningRoomRestApi.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - public class ComponentController : Controller - { - private readonly ILogger _logger; - private readonly IComponentLogic _componentLogic; - - public ComponentController(IComponentLogic Logic, ILogger Logger) - { - _logger = Logger; - _componentLogic = Logic; - } - - [HttpGet] - public ComponentViewModel? GetComponent(int Id) - { - try - { - return _componentLogic.ReadElement(new ComponentSearchModel - { - Id = Id - }); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка получения продукта"); - throw; - } - } - - - [HttpPost] - public void CreateComponent(ComponentBindingModel Model) - { - try - { - _componentLogic.Create(Model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка создания продукта"); - throw; - } - } - - [HttpPost] - public void UpdateComponent(ComponentBindingModel Model) - { - try - { - _componentLogic.Update(Model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка обновления продукта"); - throw; - } - } - - [HttpDelete] - public void DeleteComponent(ComponentBindingModel Model) - { - try - { - _componentLogic.Delete(Model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка удаления продукта"); - throw; - } - } - } -} diff --git a/DiningRoom/DiningRoomRestApi/Controllers/DrinkController.cs b/DiningRoom/DiningRoomRestApi/Controllers/DrinkController.cs deleted file mode 100644 index c5d2f03..0000000 --- a/DiningRoom/DiningRoomRestApi/Controllers/DrinkController.cs +++ /dev/null @@ -1,82 +0,0 @@ -using DiningRoomContracts.BindingModels; -using DiningRoomContracts.BusinessLogicContracts; -using DiningRoomContracts.SearchModels; -using DiningRoomContracts.ViewModels; -using Microsoft.AspNetCore.Mvc; - -namespace DiningRoomRestApi.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - public class DrinkController : Controller - { - private readonly ILogger _logger; - private readonly IDrinkLogic _DrinkLogic; - - public DrinkController(IDrinkLogic Logic, ILogger Logger) - { - _logger = Logger; - _DrinkLogic = Logic; - } - - [HttpGet] - public DrinkViewModel? GetDrink(int Id) - { - try - { - return _DrinkLogic.ReadElement(new DrinkSearchModel - { - Id = Id - }); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка получения напитка"); - throw; - } - } - - - [HttpPost] - public void CreateDrink(DrinkBindingModel Model) - { - try - { - _DrinkLogic.Create(Model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка создания напитка"); - throw; - } - } - - [HttpPost] - public void UpdateDrink(DrinkBindingModel Model) - { - try - { - _DrinkLogic.Update(Model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка обновления напитка"); - throw; - } - } - - [HttpDelete] - public void DeleteDrink(DrinkBindingModel Model) - { - try - { - _DrinkLogic.Delete(Model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка удаления напитка"); - throw; - } - } - } -} diff --git a/DiningRoom/DiningRoomRestApi/Controllers/MainController.cs b/DiningRoom/DiningRoomRestApi/Controllers/MainController.cs new file mode 100644 index 0000000..0609565 --- /dev/null +++ b/DiningRoom/DiningRoomRestApi/Controllers/MainController.cs @@ -0,0 +1,401 @@ +using DiningRoomContracts.BindingModels; +using DiningRoomContracts.BusinessLogicContracts; +using DiningRoomContracts.SearchModels; +using DiningRoomContracts.ViewModels; +using DiningRoomDatabaseImplement; +using DiningRoomDatabaseImplement.Models; +using DocumentFormat.OpenXml.Wordprocessing; +using Microsoft.AspNetCore.Mvc; + +namespace DiningRoomRestApi.Controllers +{ + [Route("api/[controller]/[action]")] + [ApiController] + public class MainController : Controller + { + private readonly ILogger _logger; + private readonly ICardLogic _card; + private readonly IOrderLogic _order; + private readonly IProductLogic _product; + private readonly IComponentLogic _component; + private readonly IDrinkLogic _drink; + public MainController(ILogger logger, ICardLogic card, IOrderLogic order, IProductLogic product, IComponentLogic component, IDrinkLogic drink) + { + _logger = logger; + _card = card; + _order = order; + _product = product; + _component = component; + _drink = drink; + } + [HttpGet] + public List? GetCardList(int Id) + { + try + { + return _card.ReadList(new CardSearchModel + { + Id = Id, + }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error get list Card"); + throw; + } + } + + [HttpGet] + public List? GetOrderList(int Id) + { + try + { + return _order.ReadList(new OrderSearchModel + { + Id = Id, + }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error get list Order"); + throw; + } + } + + [HttpGet] + public List? GetProductList(int UserId) + { + try + { + return _product.ReadList(new ProductSearchModel + { + UserId = UserId, + }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error get list Product"); + throw; + } + } + [HttpPost] + public void CreateProduct(ProductBindingModel model) + { + try + { + _product.Create(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error create Product"); + throw; + } + } + + [HttpPost] + public void UpdateProduct(ProductBindingModel model) + { + try + { + _product.Update(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error update Product"); + throw; + } + } + [HttpPost] + public void DeleteProduct(ProductBindingModel model) + { + try + { + _product.Delete(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error delete Product"); + throw; + } + } + [HttpGet] + public List? GetComponentList(int UserId) + { + try + { + return _component.ReadList(new ComponentSearchModel + { + UserId = UserId, + }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error get list Component"); + throw; + } + } + [HttpPost] + public void CreateComponent(ComponentBindingModel model) + { + try + { + _component.Create(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error create Component"); + throw; + } + } + + [HttpGet] + public List? GetDrinkList(int userId) + { + try + { + return _drink.ReadList(new DrinkSearchModel + { + UserId = userId, + }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error get list Drink"); + throw; + } + } + + [HttpPost] + public void UpdateOrder(OrderBindingModel model) + { + try + { + _order.Update(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error update Order"); + throw; + } + } + + [HttpGet] + public OrderViewModel? GetOrder(int orderId) + { + try + { + return _order.ReadElement(new OrderSearchModel + { + Id = orderId + }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error get order by id={Id}", orderId); + throw; + } + } + + [HttpPost] + public void CreateOrder(OrderBindingModel model) + { + try + { + _order.Create(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error create Order"); + throw; + } + } + + [HttpPost] + public void DeleteOrder(OrderBindingModel model) + { + try + { + _order.Delete(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error delete Order"); + throw; + } + } + + [HttpPost] + public void UpdateComponent(ComponentBindingModel model) + { + try + { + _component.Update(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error update Component"); + throw; + } + } + + [HttpGet] + public ComponentViewModel? GetComponent(int componentId) + { + try + { + return _component.ReadElement(new ComponentSearchModel + { + Id = componentId + }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error get Component by id={Id}", componentId); + throw; + } + } + + + + [HttpPost] + public void DeleteComponent(ComponentBindingModel model) + { + try + { + _component.Delete(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error delete Component"); + throw; + } + } + + [HttpPost] + public void CreateCard(CardBindingModel model) + { + try + { + _card.Create(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error create Card"); + throw; + } + } + + [HttpPost] + public void UpdateCard(CardBindingModel model) + { + try + { + _card.Update(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error update Card"); + throw; + } + } + [HttpPost] + public void DeleteCard(CardBindingModel model) + { + try + { + _card.Delete(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error delete card"); + throw; + } + } + + + [HttpPost] + public void CreateDrink(DrinkBindingModel model) + { + try + { + _drink.Create(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error create Drink"); + throw; + } + } + [HttpPost] + public void UpdateDrink(DrinkBindingModel model) + { + + try + { + _drink.Update(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error update Drink"); + throw; + } + } + + [HttpPost] + public void DeleteDrink(DrinkBindingModel model) + { + try + { + _drink.Delete(model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error delete Drink"); + throw; + } + } + + [HttpGet] + public List? GetProducts() + { + try + { + return _product.ReadList(null); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка получения списка конференций"); + throw; + } + } + [HttpGet] + public List? GetDrinks() + { + try + { + return _drink.ReadList(null); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка получения списка конференций"); + throw; + } + } + [HttpGet] + public DrinkViewModel GetDrinkById(int drinkId) + { + try + { + var elem = _drink.ReadElement(new DrinkSearchModel { Id = drinkId }); + if (elem == null) + return null; + return elem; + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка получения по id={Id}", drinkId); + throw; + } + } + } +} diff --git a/DiningRoom/DiningRoomRestApi/Controllers/OrderController.cs b/DiningRoom/DiningRoomRestApi/Controllers/OrderController.cs deleted file mode 100644 index 4a92d1b..0000000 --- a/DiningRoom/DiningRoomRestApi/Controllers/OrderController.cs +++ /dev/null @@ -1,84 +0,0 @@ -using DiningRoomContracts.BindingModels; -using DiningRoomContracts.BusinessLogicContracts; -using DiningRoomContracts.SearchModels; -using DiningRoomContracts.ViewModels; -using DiningRoomDatabaseImplement.Models; -using Microsoft.AspNetCore.Mvc; - -namespace DiningRoomRestApi.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - public class OrderController : Controller - { - private readonly ILogger _logger; - - private readonly IOrderLogic _logic; - - public OrderController(IOrderLogic logic, ILogger logger) - { - _logger = logger; - _logic = logic; - } - - [HttpGet] - public OrderViewModel? GetOrder(int id) - { - try - { - return _logic.ReadElement(new OrderSearchModel - { - Id = id - }); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка получения заказа"); - throw; - } - } - - - - [HttpPost] - public void CreateOrder(OrderBindingModel model) - { - try - { - _logic.Create(model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка создания заказа"); - throw; - } - } - [HttpPost] - public void UpdateOrder(OrderBindingModel model) - { - try - { - _logic.Update(model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка обновления заказа"); - throw; - } - } - - [HttpDelete] - public void DeleteOrder(OrderBindingModel model) - { - try - { - _logic.Delete(model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка удаления заказа"); - throw; - } - } - } -} diff --git a/DiningRoom/DiningRoomRestApi/Controllers/ProductController.cs b/DiningRoom/DiningRoomRestApi/Controllers/ProductController.cs deleted file mode 100644 index 00ef20e..0000000 --- a/DiningRoom/DiningRoomRestApi/Controllers/ProductController.cs +++ /dev/null @@ -1,82 +0,0 @@ -using DiningRoomContracts.BindingModels; -using DiningRoomContracts.BusinessLogicContracts; -using DiningRoomContracts.SearchModels; -using DiningRoomContracts.ViewModels; -using Microsoft.AspNetCore.Mvc; - -namespace DiningRoomRestApi.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - public class ProductController : Controller - { - private readonly ILogger _logger; - private readonly IProductLogic _productLogic; - - public ProductController(IProductLogic Logic, ILogger Logger) - { - _logger = Logger; - _productLogic = Logic; - } - - [HttpGet] - public ProductViewModel? GetProduct(int Id) - { - try - { - return _productLogic.ReadElement(new ProductSearchModel - { - Id = Id - }); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка получения блюда"); - throw; - } - } - - - [HttpPost] - public void CreateProduct(ProductBindingModel Model) - { - try - { - _productLogic.Create(Model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка создания блюда"); - throw; - } - } - - [HttpPost] - public void UpdateProduct(ProductBindingModel Model) - { - try - { - _productLogic.Update(Model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка обновления блюда"); - throw; - } - } - - [HttpDelete] - public void DeleteProduct(ProductBindingModel Model) - { - try - { - _productLogic.Delete(Model); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка удаления блюда"); - throw; - } - } - } -} diff --git a/DiningRoom/DiningRoomRestApi/Controllers/UserController.cs b/DiningRoom/DiningRoomRestApi/Controllers/UserController.cs index 00dc149..8ddb9c1 100644 --- a/DiningRoom/DiningRoomRestApi/Controllers/UserController.cs +++ b/DiningRoom/DiningRoomRestApi/Controllers/UserController.cs @@ -2,7 +2,6 @@ using DiningRoomContracts.BusinessLogicContracts; using DiningRoomContracts.SearchModels; using DiningRoomContracts.ViewModels; -using DiningRoomDataModels.Enums; using Microsoft.AspNetCore.Mvc; namespace DiningRoomRestApi.Controllers @@ -13,31 +12,37 @@ namespace DiningRoomRestApi.Controllers { private readonly ILogger _logger; private readonly IUserLogic _logic; - public UserController(IUserLogic logic, ILogger logger) { - _logic = logic; _logger = logger; + _logic = logic; } - - [HttpGet] public UserViewModel? Login(string login, string password) { try { - return _logic.ReadElement(new UserSearchModel + if (login.Contains("@")) + { + return _logic.ReadElement(new UserSearchModel + { + Email = login, + Password = password + }); + } + return _logic.ReadElement(new UserSearchModel { - Login = login, - Password = password, + Login = login, + Password = password }); } catch (Exception ex) { - _logger.LogError(ex, "Ошибка входа в систему"); + _logger.LogError(ex, "Login error"); throw; } } + [HttpPost] public void Register(UserBindingModel model) { @@ -47,7 +52,7 @@ namespace DiningRoomRestApi.Controllers } catch (Exception ex) { - _logger.LogError(ex, "Ошибка регистрации"); + _logger.LogError(ex, "Registration error"); throw; } } @@ -61,7 +66,7 @@ namespace DiningRoomRestApi.Controllers } catch (Exception ex) { - _logger.LogError(ex, "Ошибка обновления данных"); + _logger.LogError(ex, "Update data error"); throw; } } diff --git a/DiningRoom/DiningRoomRestApi/DiningRoomRestApi.csproj b/DiningRoom/DiningRoomRestApi/DiningRoomRestApi.csproj index aedf3de..e358f8e 100644 --- a/DiningRoom/DiningRoomRestApi/DiningRoomRestApi.csproj +++ b/DiningRoom/DiningRoomRestApi/DiningRoomRestApi.csproj @@ -7,18 +7,17 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + diff --git a/DiningRoom/DiningRoomRestApi/Program.cs b/DiningRoom/DiningRoomRestApi/Program.cs index 5e1c0d3..f5748df 100644 --- a/DiningRoom/DiningRoomRestApi/Program.cs +++ b/DiningRoom/DiningRoomRestApi/Program.cs @@ -1,32 +1,45 @@ using DiningRoomBusinessLogic.BusinessLogic; +using DiningRoomBusinessLogic.MailWorker; + +//using DiningRoomBusinessLogic.MailWorker; +using DiningRoomBusinessLogic.OfficePackage; +using DiningRoomBusinessLogic.OfficePackage.Implements; +using DiningRoomContracts.BindingModels; using DiningRoomContracts.BusinessLogicContracts; using DiningRoomContracts.StorageContracts; using DiningRoomDatabaseImplement.Implements; using Microsoft.OpenApi.Models; -var Builder = WebApplication.CreateBuilder(args); +var builder = WebApplication.CreateBuilder(args); + +builder.Logging.SetMinimumLevel(LogLevel.Trace); +// Add services to the container. + +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); + +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); + +builder.Services.AddSingleton(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); - -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); -Builder.Services.AddTransient(); - -Builder.Services.AddTransient(); - - -Builder.Services.AddControllers(); -Builder.Services.AddEndpointsApiExplorer(); -Builder.Services.AddSwaggerGen(c => +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new OpenApiInfo { @@ -35,16 +48,33 @@ Builder.Services.AddSwaggerGen(c => }); }); -var App = Builder.Build(); - -if (App.Environment.IsDevelopment()) +var app = builder.Build(); +var mailSender = app.Services.GetService(); +mailSender?.MailConfig(new MailConfigBindingModel { - App.UseSwagger(); - App.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "DiningRoomRestApi v1")); + MailLogin = builder.Configuration?.GetSection("MailLogin")?.Value?.ToString() +?? string.Empty, + MailPassword = +builder.Configuration?.GetSection("MailPassword")?.Value?.ToString() ?? +string.Empty, + SmtpClientHost = +builder.Configuration?.GetSection("SmtpClientHost")?.Value?.ToString() ?? +string.Empty, + SmtpClientPort = +Convert.ToInt32(builder.Configuration?.GetSection("SmtpClientPort")?.Value?.ToString()), + PopHost = builder.Configuration?.GetSection("PopHost")?.Value?.ToString() ?? +string.Empty, + PopPort = Convert.ToInt32(builder.Configuration?.GetSection("PopPort")?.Value?.ToString()) +}); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "DiningRoomRestApi v1")); } -App.UseHttpsRedirection(); -App.UseAuthorization(); -App.MapControllers(); - -App.Run(); +app.UseHttpsRedirection(); +app.UseAuthorization(); +app.MapControllers(); +app.Run(); diff --git a/DiningRoom/DiningRoomRestApi/Properties/launchSettings.json b/DiningRoom/DiningRoomRestApi/Properties/launchSettings.json index ffba279..60adeac 100644 --- a/DiningRoom/DiningRoomRestApi/Properties/launchSettings.json +++ b/DiningRoom/DiningRoomRestApi/Properties/launchSettings.json @@ -4,8 +4,8 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:38485", - "sslPort": 44318 + "applicationUrl": "http://localhost:16420", + "sslPort": 44394 } }, "profiles": { @@ -14,7 +14,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "https://localhost:7080;http://localhost:5150", + "applicationUrl": "https://localhost:7253;http://localhost:5121", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/DiningRoom/DiningRoomRestApi/appsettings.json b/DiningRoom/DiningRoomRestApi/appsettings.json index 10f68b8..7a05345 100644 --- a/DiningRoom/DiningRoomRestApi/appsettings.json +++ b/DiningRoom/DiningRoomRestApi/appsettings.json @@ -5,5 +5,11 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "SmtpClientHost": "smtp.gmail.com", + "SmtpClientPort": "587", + "PopHost": "pop.gmail.com", + "PopPort": "995", + "MailLogin": "mailworker2024@gmail.com", + "MailPassword": "bixb rbag kumt lefa" } diff --git a/DiningRoom/DiningRoomClientApp/APIUser.cs b/DiningRoom/DiningRoomUserApp/APIClient.cs similarity index 92% rename from DiningRoom/DiningRoomClientApp/APIUser.cs rename to DiningRoom/DiningRoomUserApp/APIClient.cs index 7d68ee1..beb5a6e 100644 --- a/DiningRoom/DiningRoomClientApp/APIUser.cs +++ b/DiningRoom/DiningRoomUserApp/APIClient.cs @@ -1,17 +1,17 @@ using DiningRoomContracts.ViewModels; -using Newtonsoft.Json; using System.Net.Http.Headers; using System.Text; +using Newtonsoft.Json; -namespace DiningRoomClientApp +namespace DiningRoomUserApp { - public class APIUser + public class APIClient { private static readonly HttpClient _user = new(); public static UserViewModel? User { get; set; } = null; - public static void Connect(IConfiguration configuration) + public static void Connect(IConfiguration configuration) { _user.BaseAddress = new Uri(configuration["IPAddress"]); _user.DefaultRequestHeaders.Accept.Clear(); diff --git a/DiningRoom/DiningRoomUserApp/Controllers/HomeController.cs b/DiningRoom/DiningRoomUserApp/Controllers/HomeController.cs new file mode 100644 index 0000000..fa9280d --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Controllers/HomeController.cs @@ -0,0 +1,312 @@ +using DiningRoomUserApp.Models; +using DocumentFormat.OpenXml.Wordprocessing; +using DiningRoomUserApp.Models; +using DiningRoomContracts.BindingModels; +using DiningRoomContracts.BusinessLogicContracts; +using DiningRoomContracts.SearchModels; +using DiningRoomContracts.ViewModels; +using DiningRoomDatabaseImplement; +using DiningRoomDatabaseImplement.Models; +using DiningRoomDataModels.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Rendering; +using System.Diagnostics; +using System.Globalization; +using System.Numerics; +using DiningRoomDataModels.Enums; +using System.Reflection; + +namespace DiningRoomUserApp.Controllers +{ + public class HomeController : Controller + { + + private readonly IComponentLogic _component; + public HomeController(IComponentLogic component) + { + _component = component; + } + + public IActionResult Index() + { + return View(); + } + public IActionResult Components() + { + if (APIClient.User == null) + { + return Redirect("~/Home/Enter"); + } + return View(APIClient.GetRequest>($"api/main/getcomponentlist?userId={APIClient.User.Id}")); + } + public IActionResult CreateComponent() + { + if (APIClient.User == null) + { + return Redirect("~/Home/Enter"); + } + var componentUnits = Enum.GetValues(typeof(DiningRoomDataModels.Enums.ComponentUnit)) + .Cast() + .Select(e => new SelectListItem + { + Value = ((int)e).ToString(), + Text = e.ToString() + }).ToList(); + + ViewBag.ComponentUnits = new SelectList(componentUnits, "Value", "Text"); + + return View(); + } + [HttpPost] + public void CreateComponent(string componentName, double componentPrice, ComponentUnit unit) + { + if (APIClient.User == null) + { + throw new Exception("Необходима авторизация"); + } + if (componentName.Length <=0 || componentPrice<=0 || unit == ComponentUnit.Неизвестна) + { + throw new Exception("Введите данные"); + } + + APIClient.PostRequest("api/main/createcomponent", new ComponentBindingModel + { + ComponentName = componentName, + Cost = componentPrice, + Unit = unit, + UserId = APIClient.User.Id, + }); + Response.Redirect("Components"); + } + + + public IActionResult UpdateComponent() + { + if (APIClient.User == null) + { + return Redirect("~/Home/Enter"); + } + var componentUnits = Enum.GetValues(typeof(DiningRoomDataModels.Enums.ComponentUnit)) + .Cast() + .Select(e => new SelectListItem + { + Value = ((int)e).ToString(), + Text = e.ToString() + }).ToList(); + + ViewBag.ComponentUnits = new SelectList(componentUnits, "Value", "Text"); + ViewBag.Components = APIClient.GetRequest>($"api/main/getcomponentlist?userid={APIClient.User.Id}"); + return View(); + } + [HttpPost] + public void UpdateComponent(int component, string componentName, double componentPrice, ComponentUnit unit) + { + if (APIClient.User == null) + { + throw new Exception("Необходима авторизация"); + } + if (componentName.Length <=0 || componentPrice<=0 || unit == ComponentUnit.Неизвестна) + { + throw new Exception("Введите данные"); + } + APIClient.PostRequest("api/main/updatecomponent", new ComponentBindingModel + { + Id = component, + ComponentName = componentName, + Cost = componentPrice, + Unit = unit, + UserId = APIClient.User.Id, + }); + Response.Redirect("Components"); + } + + public IActionResult DeleteComponent() + { + if (APIClient.User == null) + { + return Redirect("~/Home/Enter"); + } + ViewBag.Components = APIClient.GetRequest>($"api/main/getcomponentlist?userId={APIClient.User.Id}"); + return View(); + } + [HttpPost] + public void DeleteComponent(int component) + { + if (APIClient.User == null) + { + throw new Exception("Необходима авторизация"); + } + APIClient.PostRequest("api/main/deletecomponent", new ComponentBindingModel + { + Id = component + }); + Response.Redirect("Components"); + } + + public IActionResult Products() + { + if (APIClient.User == null) + { + return Redirect("~/Home/Enter"); + } + return View(APIClient.GetRequest>($"api/main/getproductlist?userId={APIClient.User.Id}")); + } + public IActionResult CreateProduct() + { + if (APIClient.User == null) + { + return Redirect("~/Home/Enter"); + } + var list = _component.ReadList(new ComponentSearchModel { UserId = APIClient.User.Id }); + var simpComponent = list.Select(x => new { ComponentId = x.Id, ComponentName = x.ComponentName }); + ViewBag.components = new MultiSelectList(simpComponent, "ComponentId", "ComponentName"); + return View(); + } + [HttpPost] + public void CreateProduct(string productName, double productPrice, int[] components) + { + if (APIClient.User == null) + { + throw new Exception("Необходима авторизация"); + } + if (productName.Length <=0 || productPrice<=0 || components.Length == 0) + { + throw new Exception("Введите данные"); + } + Dictionary _productComponents = new Dictionary(); + foreach (int id in components) + { + _productComponents.Add(id, (_component.ReadElement(new ComponentSearchModel { Id = id }),1)); + + } + + APIClient.PostRequest("api/main/createproduct", new ProductBindingModel + { + ProductName = productName, + Cost = productPrice, + UserId = APIClient.User.Id, + ProductComponents = _productComponents, + }); + Response.Redirect("Products"); + } + public IActionResult UpdateProduct() + { + if (APIClient.User == null) + { + return Redirect("~/Home/Enter"); + } + + ViewBag.Products = APIClient.GetRequest>($"api/main/getproductlist?userid={APIClient.User.Id}"); + ViewBag.Components = APIClient.GetRequest>($"api/main/getcomponentlist?userid={APIClient.User.Id}"); + return View(); + } + [HttpPost] + public void UpdateProduct(int product, string productName, double productPrice, List components) + { + if (APIClient.User == null) + { + throw new Exception("Необходима авторизация"); + } + if (productName.Length <= 0 || productPrice <= 0) + { + throw new Exception("Введите данные"); + } + Dictionary _productComponents = new Dictionary(); + foreach (int id in components) + { + _productComponents.Add(id, (new ComponentSearchModel { Id = id } as IComponentModel, 1)); + + } + APIClient.PostRequest("api/main/updateproduct", new ProductBindingModel + { + Id = product, + ProductName = productName, + Cost = productPrice, + UserId = APIClient.User.Id, + ProductComponents = _productComponents, + }); + Response.Redirect("Products"); + } + + [HttpGet] + public IActionResult Privacy() + { + if (APIClient.User == null) + { + return Redirect("~/Home/Enter"); + } + return View(APIClient.User); + } + [HttpPost] + public void Privacy(string login, string email, string password, string fio, string phone) + { + if (APIClient.User == null) + { + throw new Exception("Вы как сюда попали? Сюда вход только авторизованным"); + } + if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(fio) || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(phone)) + { + throw new Exception("Введите логин, пароль и ФИО"); + } + APIClient.PostRequest("api/user/updatedata", new UserBindingModel + { + Id = APIClient.User.Id, + Login = login, + Password = password, + Email = email, + }); + + APIClient.User.Login = login; + APIClient.User.Password = password; + APIClient.User.Email = email; + Response.Redirect("Index"); + } + [HttpGet] + public IActionResult Register() + { + return View(); + } + [HttpPost] + public void Register(string login, string email, string password) + { + if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(email)) + { + throw new Exception("Введите все данные"); + } + APIClient.PostRequest("api/user/register", new UserBindingModel + { + Login = login, + Password = password, + Email = email, + }); + + Response.Redirect("Enter"); + return; + } + [HttpGet] + public IActionResult Enter() + { + return View(); + } + + [HttpPost] + public void Enter(string login, string password) + { + if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password)) + { + throw new Exception("Введите логин и пароль"); + } + APIClient.User = APIClient.GetRequest($"api/user/login?login={login}&password={password}"); + if (APIClient.User == null) + { + throw new Exception("Неверный логин/пароль"); + } + Response.Redirect("Index"); + } + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public IActionResult Error() + { + return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + } + } +} diff --git a/DiningRoom/DiningRoomClientApp/DiningRoomClientApp.csproj b/DiningRoom/DiningRoomUserApp/DiningRoomUserApp.csproj similarity index 50% rename from DiningRoom/DiningRoomClientApp/DiningRoomClientApp.csproj rename to DiningRoom/DiningRoomUserApp/DiningRoomUserApp.csproj index aefd6b8..a6846d5 100644 --- a/DiningRoom/DiningRoomClientApp/DiningRoomClientApp.csproj +++ b/DiningRoom/DiningRoomUserApp/DiningRoomUserApp.csproj @@ -7,11 +7,14 @@ - + + + + diff --git a/DiningRoom/DiningRoomUserApp/Models/ComponentUnitViewModel.cs b/DiningRoom/DiningRoomUserApp/Models/ComponentUnitViewModel.cs new file mode 100644 index 0000000..0051ddc --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Models/ComponentUnitViewModel.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using DiningRoomDataModels.Enums; + +namespace DiningRoomUserApp.Models +{ + public class ComponentUnitViewModel + { + public List Units { get; set; } + + public ComponentUnitViewModel() + { + Units = new List(); + + foreach (ComponentUnit unit in Enum.GetValues(typeof(ComponentUnit))) + { + Units.Add(unit.ToString()); + } + } + } +} diff --git a/DiningRoom/DiningRoomClientApp/Models/ErrorViewModel.cs b/DiningRoom/DiningRoomUserApp/Models/ErrorViewModel.cs similarity index 81% rename from DiningRoom/DiningRoomClientApp/Models/ErrorViewModel.cs rename to DiningRoom/DiningRoomUserApp/Models/ErrorViewModel.cs index be78bc5..576756d 100644 --- a/DiningRoom/DiningRoomClientApp/Models/ErrorViewModel.cs +++ b/DiningRoom/DiningRoomUserApp/Models/ErrorViewModel.cs @@ -1,4 +1,4 @@ -namespace DiningRoomClientApp.Models +namespace DiningRoomUserApp.Models { public class ErrorViewModel { diff --git a/DiningRoom/DiningRoomUserApp/Program.cs b/DiningRoom/DiningRoomUserApp/Program.cs new file mode 100644 index 0000000..31ebcf5 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Program.cs @@ -0,0 +1,38 @@ +using DiningRoomUserApp; +using DiningRoomBusinessLogic.BusinessLogic; +using DiningRoomBusinessLogic.OfficePackage; +using DiningRoomBusinessLogic.OfficePackage.Implements; +using DiningRoomContracts.BusinessLogicContracts; +using DiningRoomContracts.StorageContracts; +using DiningRoomDatabaseImplement.Implements; +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddControllersWithViews(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +//builder.Services.AddTransient(); +var app = builder.Build(); +APIClient.Connect(builder.Configuration); +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Home/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); +app.UseStaticFiles(); + +app.UseRouting(); + +app.UseAuthorization(); + +app.MapControllerRoute( + name: "default", + pattern: "{controller=Home}/{action=Index}/{id?}"); + +app.Run(); diff --git a/DiningRoom/DiningRoomClientApp/Properties/launchSettings.json b/DiningRoom/DiningRoomUserApp/Properties/launchSettings.json similarity index 74% rename from DiningRoom/DiningRoomClientApp/Properties/launchSettings.json rename to DiningRoom/DiningRoomUserApp/Properties/launchSettings.json index 4f0b406..2c098a2 100644 --- a/DiningRoom/DiningRoomClientApp/Properties/launchSettings.json +++ b/DiningRoom/DiningRoomUserApp/Properties/launchSettings.json @@ -3,16 +3,16 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:51304", - "sslPort": 44359 + "applicationUrl": "http://localhost:63952", + "sslPort": 44327 } }, "profiles": { - "DiningRoomClientApp": { + "DiningRoomUserApp": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "applicationUrl": "https://localhost:7143;http://localhost:5230", + "applicationUrl": "https://localhost:7001;http://localhost:5154", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/Components.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/Components.cshtml new file mode 100644 index 0000000..b272422 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/Components.cshtml @@ -0,0 +1,65 @@ +@using DiningRoomContracts.ViewModels + +@model List +@{ + ViewData["Title"] = "Components"; +} + + + + +
+

Список продуктов

+
+
+
+ + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + } + +
+ Номер + + Название + + Цена + + Ед.изм. +
+ @Html.DisplayFor(modelItem => item.Id) + + @Html.DisplayFor(modelItem => item.ComponentName) + + @Html.DisplayFor(modelItem => item.Cost) + + @Html.DisplayFor(modelItem => item.Unit) +
+ +
+
diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/CreateComponent.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/CreateComponent.cshtml new file mode 100644 index 0000000..42c53f7 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/CreateComponent.cshtml @@ -0,0 +1,29 @@ +@using DiningRoomContracts.ViewModels + +@model DiningRoomUserApp.Models.ComponentUnitViewModel +@{ + ViewData["Title"] = "CreateComponent"; +} + + + +
+

Добавить продукт

+
+
+ + +
+ +
+ @Html.DropDownList("unit", (SelectList)ViewBag.ComponentUnits, new { @class = "form-control" }) +
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/CreateProduct.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/CreateProduct.cshtml new file mode 100644 index 0000000..8948191 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/CreateProduct.cshtml @@ -0,0 +1,28 @@ +@using DiningRoomContracts.ViewModels + +@model ComponentViewModel +@{ + ViewData["Title"] = "CreateProduct"; +} + + + +
+

Добавить блюдо

+
+
+ + +
+ +
+ @Html.ListBox("components", (MultiSelectList)ViewBag.Components, new { @class = "form-control", size = "10" }) +
+
+
+ +
+ +
\ No newline at end of file diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/DeleteComponent.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/DeleteComponent.cshtml new file mode 100644 index 0000000..4004f57 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/DeleteComponent.cshtml @@ -0,0 +1,22 @@ +@{ + ViewData["Title"] = "DeleteComponent"; +} + + + + +
+

Удалить продукт

+
+
+
+ + +
+
+ +
+ +
\ No newline at end of file diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/DeleteProduct.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/DeleteProduct.cshtml new file mode 100644 index 0000000..b474fa4 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/DeleteProduct.cshtml @@ -0,0 +1,22 @@ +@{ + ViewData["Title"] = "DeleteRoom"; +} + + + + +
+

Удалить комнату

+
+
+
+ + +
+
+ +
+ +
\ No newline at end of file diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/Enter.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/Enter.cshtml new file mode 100644 index 0000000..c81491e --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/Enter.cshtml @@ -0,0 +1,37 @@ +@{ + ViewData["Title"] = "Enter"; +} + + + + +
+

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

+
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+ Если у вас нет аккаунта то + + заригестрируйтесь + +
+
+
+
+
diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/Index.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/Index.cshtml new file mode 100644 index 0000000..8377c7a --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/Index.cshtml @@ -0,0 +1,50 @@ +@{ + ViewData["Title"] = "Home Page"; +} + + + + + +
+
+
+
+
+

+ Столовая "Рога и Копыта" +

+

+ Здесь ты сможешь добавлять продукты, блюда и напитки по картам +

+
+
+
+
+
diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/Privacy.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/Privacy.cshtml new file mode 100644 index 0000000..9e9e4f0 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/Privacy.cshtml @@ -0,0 +1,43 @@ +@using DiningRoomContracts.ViewModels + +@model UserViewModel + +@{ + ViewData["Title"] = "Privacy"; +} + + + + +
+

Личные данные

+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
\ No newline at end of file diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/Products.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/Products.cshtml new file mode 100644 index 0000000..e1f326a --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/Products.cshtml @@ -0,0 +1,59 @@ +@using DiningRoomContracts.ViewModels + +@model List +@{ + ViewData["Title"] = "Products"; +} + + + + +
+

Список блюд

+
+
+
+ + + + + + + + + + @foreach (var item in Model) + { + + + + + + } + +
+ Номер + + Название блюда + + Цена +
+ @Html.DisplayFor(modelItem => item.Id) + + @Html.DisplayFor(modelItem => item.ProductName) + + @Html.DisplayFor(modelItem => item.Cost) +
+ +
+
diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/Register.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/Register.cshtml new file mode 100644 index 0000000..1fc4844 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/Register.cshtml @@ -0,0 +1,40 @@ +@{ + ViewData["Title"] = "Register"; +} + + + + +
+

Регистрация в приложении

+
+
+
+
+
+
+
+

+ Введите все данные указанные ниже
+ для регистрации +

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/UpdateComponent.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/UpdateComponent.cshtml new file mode 100644 index 0000000..9063fab --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/UpdateComponent.cshtml @@ -0,0 +1,37 @@ +@using DiningRoomContracts.ViewModels; +@{ + ViewData["Title"] = "UpdateComponent"; +} + + + +
+

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

+
+
+
+ + +
+
+ +
+
+ +
+
+
+ +
+ @Html.DropDownList("unit", (SelectList)ViewBag.ComponentUnits, new { @class = "form-control" }) +
+
+
+
+ +
+ + +
\ No newline at end of file diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/UpdateProduct.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/UpdateProduct.cshtml new file mode 100644 index 0000000..73dc717 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Home/UpdateProduct.cshtml @@ -0,0 +1,70 @@ +@using DiningRoomContracts.ViewModels; +@{ + ViewData["Title"] = "UpdateProduct"; +} + + + +
+

Обновить блюдо

+
+
+
+ + +
+
+ +
+
+ +
+
+
+
Продукты:
+
+ +
+
+
+
+ +
+ + +
+@section Scripts +{ + +} \ No newline at end of file diff --git a/DiningRoom/DiningRoomClientApp/Views/Shared/Error.cshtml b/DiningRoom/DiningRoomUserApp/Views/Shared/Error.cshtml similarity index 100% rename from DiningRoom/DiningRoomClientApp/Views/Shared/Error.cshtml rename to DiningRoom/DiningRoomUserApp/Views/Shared/Error.cshtml diff --git a/DiningRoom/DiningRoomUserApp/Views/Shared/_Layout.cshtml b/DiningRoom/DiningRoomUserApp/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..91ba99f --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/Shared/_Layout.cshtml @@ -0,0 +1,103 @@ + + + + + + @ViewData["DiningRoomAdmin"] - Столовая "Рога и Копыта" + + + + + + +
+ +
+
+
+ @RenderBody() +
+
+ + + + + + @await RenderSectionAsync("Scripts", required: false) + + diff --git a/DiningRoom/DiningRoomClientApp/Views/Shared/_Layout.cshtml.css b/DiningRoom/DiningRoomUserApp/Views/Shared/_Layout.cshtml.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/Views/Shared/_Layout.cshtml.css rename to DiningRoom/DiningRoomUserApp/Views/Shared/_Layout.cshtml.css diff --git a/DiningRoom/DiningRoomClientApp/Views/Shared/_ValidationScriptsPartial.cshtml b/DiningRoom/DiningRoomUserApp/Views/Shared/_ValidationScriptsPartial.cshtml similarity index 100% rename from DiningRoom/DiningRoomClientApp/Views/Shared/_ValidationScriptsPartial.cshtml rename to DiningRoom/DiningRoomUserApp/Views/Shared/_ValidationScriptsPartial.cshtml diff --git a/DiningRoom/DiningRoomUserApp/Views/_ViewImports.cshtml b/DiningRoom/DiningRoomUserApp/Views/_ViewImports.cshtml new file mode 100644 index 0000000..85b3565 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/Views/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using DiningRoomUserApp +@using DiningRoomUserApp.Models +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/DiningRoom/DiningRoomClientApp/Views/_ViewStart.cshtml b/DiningRoom/DiningRoomUserApp/Views/_ViewStart.cshtml similarity index 100% rename from DiningRoom/DiningRoomClientApp/Views/_ViewStart.cshtml rename to DiningRoom/DiningRoomUserApp/Views/_ViewStart.cshtml diff --git a/DiningRoom/DiningRoomClientApp/appsettings.Development.json b/DiningRoom/DiningRoomUserApp/appsettings.Development.json similarity index 100% rename from DiningRoom/DiningRoomClientApp/appsettings.Development.json rename to DiningRoom/DiningRoomUserApp/appsettings.Development.json diff --git a/DiningRoom/DiningRoomClientApp/appsettings.json b/DiningRoom/DiningRoomUserApp/appsettings.json similarity index 65% rename from DiningRoom/DiningRoomClientApp/appsettings.json rename to DiningRoom/DiningRoomUserApp/appsettings.json index 85b7f56..1d88d4f 100644 --- a/DiningRoom/DiningRoomClientApp/appsettings.json +++ b/DiningRoom/DiningRoomUserApp/appsettings.json @@ -5,6 +5,5 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*", - "IPAddress": "http://localhost:5150/" + "IPAddress": "http://localhost:5121/" } diff --git a/DiningRoom/DiningRoomUserApp/wwwroot/css/enter.css b/DiningRoom/DiningRoomUserApp/wwwroot/css/enter.css new file mode 100644 index 0000000..c081546 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/wwwroot/css/enter.css @@ -0,0 +1,78 @@ +.main { + margin-top: 50px; + display: flex; + align-items: center; + justify-content: center; +} + +.main_wrapper { + width: 430px; + display: flex; + justify-content: center; + text-align: center; +} + +.main_block { + margin-top: 35px; +} + +.main_fields { + margin-top: 18px; +} + +input { + height: 53px; + width: 100%; + font-size: 20px; + line-height: 16px; + border: 1px solid #000000; + border-radius: 30px; + padding-left: 31px; +} + +.main_field_one { + margin-bottom: 17px; + width: 100%; +} + +.class_login { + width: 100%; + display: flex; + justify-content: center; + margin-top: 84px; +} + +.button_login { + background-color: #FFFFFF; + display: flex; + justify-content: center; + align-items: center; + width: 216px; + height: 39px; + border-radius: 30px; + border: 1px solid #000000; + font-size: 20px; + line-height: 39px; + transition: 0.2s ease; + cursor: pointer; +} + + .button_login:hover { + background: #E3E3E3; + } + +.down_word { + width: 100%; + margin-top: 23px; + font-size: 15px; +} + +.word_registr { + text-decoration: none; + color: #18BDF1; + transition: color 0.2s ease; +} + + .word_registr:hover { + color: #91F0FD; + } diff --git a/DiningRoom/DiningRoomUserApp/wwwroot/css/register.css b/DiningRoom/DiningRoomUserApp/wwwroot/css/register.css new file mode 100644 index 0000000..eba34cb --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/wwwroot/css/register.css @@ -0,0 +1,73 @@ +.up_word { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 10px; +} + +.main_text { + font-size: 17px; +} + +.main { + display: flex; + align-items: center; + justify-content: center; +} + +.main_wrapper { + width: 430px; + display: flex; + justify-content: center; + text-align: center; +} + +.main_block { + margin-top: 20px; +} + +.main_fields { + margin-top: 15px; +} + +input { + height: 53px; + width: 100%; + font-size: 20px; + line-height: 16px; + border: 1px solid #000000; + border-radius: 30px; + padding-left: 31px; +} + +.main_field { + margin-bottom: 10px; + width: 100%; +} + +.class_login { + width: 100%; + display: flex; + justify-content: center; + margin-top: 55px; +} + +.button_login { + background-color: #FFFFFF; + display: flex; + justify-content: center; + align-items: center; + width: 216px; + height: 39px; + border-radius: 30px; + border: 1px solid #000000; + font-size: 20px; + line-height: 39px; + transition: 0.2s ease; + cursor: pointer; +} + + .button_login:hover { + background: #E3E3E3; + } diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/css/site.css b/DiningRoom/DiningRoomUserApp/wwwroot/css/site.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/css/site.css rename to DiningRoom/DiningRoomUserApp/wwwroot/css/site.css diff --git a/DiningRoom/DiningRoomUserApp/wwwroot/css/style.css b/DiningRoom/DiningRoomUserApp/wwwroot/css/style.css new file mode 100644 index 0000000..9754859 --- /dev/null +++ b/DiningRoom/DiningRoomUserApp/wwwroot/css/style.css @@ -0,0 +1,66 @@ +.text-center { + margin-bottom: 30px; +} + +.list-words-add { + display: flex; + justify-content: center; + font-size: 20px; + margin-top: 20px; + margin-bottom: 20px; + font-weight: bold; +} + +.table { + text-align: center; +} + +.spisok { + margin-bottom: 20px; +} + +.word-dinner { + font-size: 25px; + display: flex; + justify-content: center; +} + +.button-action { + display: flex; + width: 300px; + height: 40px; + border-radius: 10px; + border: 1px solid #000000; + align-items: center; + justify-content: center; + background-color: #BDBDBD; + text-decoration: none; + color: #000000; + transition: 0.2s ease; + margin-bottom: 10px; +} + + .button-action:hover { + background-color: #D2D3D3; + color: #393939; + } + +.buttons-create-file { + display: flex; + justify-content: center; +} + +.buttons-action-with-drink { + display: flex; + justify-content: space-between; +} + +.buttons-action-with-product { + display: flex; + justify-content: space-between; +} + +.buttons-action-with-component { + display: flex; + justify-content: space-between; +} diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/favicon.ico b/DiningRoom/DiningRoomUserApp/wwwroot/favicon.ico similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/favicon.ico rename to DiningRoom/DiningRoomUserApp/wwwroot/favicon.ico diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/js/site.js b/DiningRoom/DiningRoomUserApp/wwwroot/js/site.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/js/site.js rename to DiningRoom/DiningRoomUserApp/wwwroot/js/site.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/LICENSE b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/LICENSE similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/LICENSE rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/LICENSE diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/LICENSE.md b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/LICENSE.md similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/LICENSE.md rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/LICENSE.md diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/dist/additional-methods.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/dist/additional-methods.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/dist/additional-methods.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/dist/additional-methods.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/dist/jquery.validate.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/dist/jquery.validate.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/dist/jquery.validate.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery/LICENSE.txt b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery/LICENSE.txt similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery/LICENSE.txt rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery/LICENSE.txt diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery/dist/jquery.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery/dist/jquery.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery/dist/jquery.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery/dist/jquery.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery/dist/jquery.min.js b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery/dist/jquery.min.js similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery/dist/jquery.min.js rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery/dist/jquery.min.js diff --git a/DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery/dist/jquery.min.map b/DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery/dist/jquery.min.map similarity index 100% rename from DiningRoom/DiningRoomClientApp/wwwroot/lib/jquery/dist/jquery.min.map rename to DiningRoom/DiningRoomUserApp/wwwroot/lib/jquery/dist/jquery.min.map