From 6a498b48b190ca33ba57ebd99af676dbcedf70e3 Mon Sep 17 00:00:00 2001 From: goldfest Date: Tue, 28 May 2024 13:50:19 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HomeController.cs | 10 +-- .../Views/Home/CarsDateChoose.cshtml | 76 +++++++++++++++++++ .../Views/Home/CarsPeriodReport.cshtml | 7 +- .../Views/Home/Privacy.cshtml | 25 ++---- .../Views/Home/ReportsMenu.cshtml | 2 +- 5 files changed, 93 insertions(+), 27 deletions(-) create mode 100644 CarCenter/CarCenterAdministratorAPP/Views/Home/CarsDateChoose.cshtml diff --git a/CarCenter/CarCenterAdministratorAPP/Controllers/HomeController.cs b/CarCenter/CarCenterAdministratorAPP/Controllers/HomeController.cs index d36e98c..2df7f9c 100644 --- a/CarCenter/CarCenterAdministratorAPP/Controllers/HomeController.cs +++ b/CarCenter/CarCenterAdministratorAPP/Controllers/HomeController.cs @@ -268,7 +268,7 @@ namespace AdministratorApp.Controllers return View(user); } [HttpGet] - public IActionResult CarSaleTimeChoose() + public IActionResult CarsDateChoose() { if (!IsLoggedIn) return RedirectToAction("IndexNonReg"); @@ -290,10 +290,10 @@ namespace AdministratorApp.Controllers HttpContext.Session.SetString("StartDate", startDate.ToString()); HttpContext.Session.SetString("EndDate", endDate.ToString()); - return RedirectToAction("CarSaleTimeReport"); + return RedirectToAction("CarsPeriodReport"); } [HttpGet] - public IActionResult CarSaleTimeReport() + public IActionResult CarsPeriodReport() { var startDateStr = HttpContext.Session.GetString("StartDate"); var endDateStr = HttpContext.Session.GetString("EndDate"); @@ -314,12 +314,12 @@ namespace AdministratorApp.Controllers new CarsPreSaleWorkReportViewModel { CarBrand = "бэха", - PreSaleWork = new List { "Цех 1", "Цех 2" } + PreSaleWork = new List { "Предпродажная работа 1", "Предпродажная работа 2" } }, new CarsPreSaleWorkReportViewModel { CarBrand = "мерс", - PreSaleWork = new List { "Цех 3", "Цех 4" } + PreSaleWork = new List { "Предпродажная работа 3", "Предпродажная работа 4" } } }; return View(CarSalePreSaleWorkReports); diff --git a/CarCenter/CarCenterAdministratorAPP/Views/Home/CarsDateChoose.cshtml b/CarCenter/CarCenterAdministratorAPP/Views/Home/CarsDateChoose.cshtml new file mode 100644 index 0000000..0b9aca8 --- /dev/null +++ b/CarCenter/CarCenterAdministratorAPP/Views/Home/CarsDateChoose.cshtml @@ -0,0 +1,76 @@ +@{ + ViewData["Title"] = "Создание отчета"; +} + +
+

Создание отчета

+
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+
+ + + diff --git a/CarCenter/CarCenterAdministratorAPP/Views/Home/CarsPeriodReport.cshtml b/CarCenter/CarCenterAdministratorAPP/Views/Home/CarsPeriodReport.cshtml index f27a372..9fdb598 100644 --- a/CarCenter/CarCenterAdministratorAPP/Views/Home/CarsPeriodReport.cshtml +++ b/CarCenter/CarCenterAdministratorAPP/Views/Home/CarsPeriodReport.cshtml @@ -37,7 +37,12 @@ - +
    + @foreach (var inspection in cars.Inspections) + { +
  • @inspection
  • + } +
} diff --git a/CarCenter/CarCenterAdministratorAPP/Views/Home/Privacy.cshtml b/CarCenter/CarCenterAdministratorAPP/Views/Home/Privacy.cshtml index 4328bda..887d970 100644 --- a/CarCenter/CarCenterAdministratorAPP/Views/Home/Privacy.cshtml +++ b/CarCenter/CarCenterAdministratorAPP/Views/Home/Privacy.cshtml @@ -37,15 +37,8 @@
Пароль:
- - -
-
-
-
Повтор пароля:
-
- - + +
@@ -63,15 +56,13 @@ var email = $('#email').val(); var number = $('#number').val(); var password1 = $('#password1').val(); - var password2 = $('#password2').val(); var isValid = true; $('#fioError').text(''); $('#loginError').text(''); $('#emailError').text(''); $('#numberError').text(''); - $('#password1Error').text(''); - $('#password2Error').text(''); + $('#passwordError').text(''); // Валидация имени if (fio.length < 2 || fio.length > 20) { @@ -100,14 +91,8 @@ } // Валидация пароля - if (password1.length < 8 || password1.length > 20) { - $('#password1Error').text('Пароль должен быть от 8 до 20 символов.'); - isValid = false; - } - - // Проверка совпадения паролей - if (password1 !== password2) { - $('#password2Error').text('Пароли не совпадают.'); + if (password.length < 8 || password.length > 20) { + $('#passwordError').text('Пароль должен быть от 8 до 20 символов.'); isValid = false; } diff --git a/CarCenter/CarCenterAdministratorAPP/Views/Home/ReportsMenu.cshtml b/CarCenter/CarCenterAdministratorAPP/Views/Home/ReportsMenu.cshtml index d6a4042..a1ba793 100644 --- a/CarCenter/CarCenterAdministratorAPP/Views/Home/ReportsMenu.cshtml +++ b/CarCenter/CarCenterAdministratorAPP/Views/Home/ReportsMenu.cshtml @@ -5,7 +5,7 @@