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