From dd020b8935e049acd423e04b2ef91f382a44946b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=AF=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=B2?= Date: Sun, 5 May 2024 20:26:18 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B2=D1=81=D0=B5=20=D0=BD=D0=B0=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D0=B5=D1=86=20=D1=82=D0=BE=20=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=B0=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogics/ClientLogic.cs | 2 +- .../BusinessLogics/OrderLogic.cs | 2 ++ .../CarRepairShopClientApp/Controllers/HomeController.cs | 2 +- CarRepairShop/CarRepairShopRestApi/appsettings.json | 8 ++++---- CarRepairShop/CarRepairShopView/App.config | 8 ++++---- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CarRepairShop/CarRepairShopBusinessLogic/BusinessLogics/ClientLogic.cs b/CarRepairShop/CarRepairShopBusinessLogic/BusinessLogics/ClientLogic.cs index 08db84d..5f5bdfe 100644 --- a/CarRepairShop/CarRepairShopBusinessLogic/BusinessLogics/ClientLogic.cs +++ b/CarRepairShop/CarRepairShopBusinessLogic/BusinessLogics/ClientLogic.cs @@ -102,7 +102,7 @@ namespace CarRepairShopBusinessLogic.BusinessLogics { throw new ArgumentNullException("Нет почты клиента", nameof(model.Email)); } - if (string.IsNullOrEmpty(model.Password)) + if (string.IsNullOrEmpty(model.Password) || !Regex.IsMatch(model.Password, @"^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$", RegexOptions.IgnoreCase)) { throw new ArgumentNullException("Нет пароля клиента", nameof(model.ClientFIO)); } diff --git a/CarRepairShop/CarRepairShopBusinessLogic/BusinessLogics/OrderLogic.cs b/CarRepairShop/CarRepairShopBusinessLogic/BusinessLogics/OrderLogic.cs index 7281221..bf43a49 100644 --- a/CarRepairShop/CarRepairShopBusinessLogic/BusinessLogics/OrderLogic.cs +++ b/CarRepairShop/CarRepairShopBusinessLogic/BusinessLogics/OrderLogic.cs @@ -120,6 +120,8 @@ namespace CarRepairShopBusinessLogic.BusinessLogics return false; } + element.Status = newStatus; + var clientView = _clientStorage.GetElement(new() { Id = element.ClientId }); SendMail(clientView, element); diff --git a/CarRepairShop/CarRepairShopClientApp/Controllers/HomeController.cs b/CarRepairShop/CarRepairShopClientApp/Controllers/HomeController.cs index d08bad9..6614c2e 100644 --- a/CarRepairShop/CarRepairShopClientApp/Controllers/HomeController.cs +++ b/CarRepairShop/CarRepairShopClientApp/Controllers/HomeController.cs @@ -134,7 +134,7 @@ namespace CarRepairShopClientApp.Controllers { return Redirect("~/Home/Enter"); } - return View(APIClient.GetRequest>($"api/client/getmessages?clientId = {APIClient.Client.Id}")); + return View(APIClient.GetRequest>($"api/client/getmessages?clientId={APIClient.Client.Id}")); } } } diff --git a/CarRepairShop/CarRepairShopRestApi/appsettings.json b/CarRepairShop/CarRepairShopRestApi/appsettings.json index 097d094..7ae6190 100644 --- a/CarRepairShop/CarRepairShopRestApi/appsettings.json +++ b/CarRepairShop/CarRepairShopRestApi/appsettings.json @@ -7,11 +7,11 @@ }, "AllowedHosts": "*", - "SmtpClientHost": "smtp.gmail.com", + "SmtpClientHost": "smtp.mail.ru", "SmtpClientPort": "587", - "PopHost": "pop.gmail.com", + "PopHost": "pop.mail.ru", "PopPort": "995", - "MailLogin": "shotboll16@gmail.com", - "MailPassword": "iexy xqps iwrj ihle" + "MailLogin": "labwork7@mail.ru", + "MailPassword": "i135ssgqi7jEzphpyVH9" } diff --git a/CarRepairShop/CarRepairShopView/App.config b/CarRepairShop/CarRepairShopView/App.config index 87968ee..9585971 100644 --- a/CarRepairShop/CarRepairShopView/App.config +++ b/CarRepairShop/CarRepairShopView/App.config @@ -1,11 +1,11 @@  - + - + - - + + \ No newline at end of file