From 8389625a49627b5f4ecba0c9a6a6650e4b4230f8 Mon Sep 17 00:00:00 2001 From: russell Date: Wed, 1 May 2024 01:26:52 +0400 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D0=BC=D0=B0=D0=BA?= =?UTF-8?q?=D0=B5=D1=82=D0=BE=D0=B2=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/ReportPlaceTourViewModel.cs | 8 ++++++++ .../ViewModels/ReportTourPeriodViewModel.cs | 9 +++++++++ .../TravelAgencyWebApp/Controllers/HomeController.cs | 12 ++++++------ .../Views/Home/CreateExcursion.cshtml | 7 +++++-- .../Views/Home/CreateExcursionGroup.cshtml | 7 +++++-- .../Views/Home/ReportPlaceTour.cshtml | 5 ++++- .../Views/Home/ReportTourPeriod.cshtml | 5 ++++- .../Views/Home/UpdateExcursion.cshtml | 7 +++++-- .../Views/Home/UpdateExcursionGroup.cshtml | 7 +++++-- 9 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 TravelAgency/TravelAgencyContracts/ViewModels/ReportPlaceTourViewModel.cs create mode 100644 TravelAgency/TravelAgencyContracts/ViewModels/ReportTourPeriodViewModel.cs diff --git a/TravelAgency/TravelAgencyContracts/ViewModels/ReportPlaceTourViewModel.cs b/TravelAgency/TravelAgencyContracts/ViewModels/ReportPlaceTourViewModel.cs new file mode 100644 index 0000000..d6a95e4 --- /dev/null +++ b/TravelAgency/TravelAgencyContracts/ViewModels/ReportPlaceTourViewModel.cs @@ -0,0 +1,8 @@ +namespace TravelAgencyContracts.ViewModels +{ + public class ReportPlaceTourViewModel + { + public string TourName { get; set; } = string.Empty; + public List Places { get; set; } = new(); + } +} diff --git a/TravelAgency/TravelAgencyContracts/ViewModels/ReportTourPeriodViewModel.cs b/TravelAgency/TravelAgencyContracts/ViewModels/ReportTourPeriodViewModel.cs new file mode 100644 index 0000000..6f1b085 --- /dev/null +++ b/TravelAgency/TravelAgencyContracts/ViewModels/ReportTourPeriodViewModel.cs @@ -0,0 +1,9 @@ +namespace TravelAgencyContracts.ViewModels +{ + public class ReportTourPeriodViewModel + { + public string TourName { get; set; } = string.Empty; + public List ExcursionGroups { get; set; } = new(); + public List Guides { get; set; } = new(); + } +} diff --git a/TravelAgency/TravelAgencyWebApp/Controllers/HomeController.cs b/TravelAgency/TravelAgencyWebApp/Controllers/HomeController.cs index 77df0bb..7e168ac 100644 --- a/TravelAgency/TravelAgencyWebApp/Controllers/HomeController.cs +++ b/TravelAgency/TravelAgencyWebApp/Controllers/HomeController.cs @@ -68,12 +68,12 @@ namespace TravelAgencyWebApp.Controllers [HttpGet] public IActionResult CreateExcursion() { - return View(); + return View(new List()); } [HttpGet] public IActionResult CreateExcursionGroup() { - return View(); + return View(new List()); } [HttpGet] public IActionResult UpdateTour() @@ -83,12 +83,12 @@ namespace TravelAgencyWebApp.Controllers [HttpGet] public IActionResult UpdateExcursion() { - return View(); + return View(new List()); } [HttpGet] public IActionResult UpdateExcursionGroup() { - return View(); + return View(new List()); } [HttpGet] public IActionResult ReportMenu() @@ -98,12 +98,12 @@ namespace TravelAgencyWebApp.Controllers [HttpGet] public IActionResult ReportPlaceTour() { - return View(); + return View(new List()); } [HttpGet] public IActionResult ReportTourPeriod() { - return View(); + return View(new List()); } } } diff --git a/TravelAgency/TravelAgencyWebApp/Views/Home/CreateExcursion.cshtml b/TravelAgency/TravelAgencyWebApp/Views/Home/CreateExcursion.cshtml index 1684759..111d822 100644 --- a/TravelAgency/TravelAgencyWebApp/Views/Home/CreateExcursion.cshtml +++ b/TravelAgency/TravelAgencyWebApp/Views/Home/CreateExcursion.cshtml @@ -1,4 +1,7 @@ -@{ +@using TravelAgencyContracts.ViewModels + +@model List +@{ ViewData["Title"] = "Create excursion"; }
@@ -28,7 +31,7 @@ - @foreach (var tour in ViewBag.Tours) + @foreach (var tour in Model) { @tour.TourName diff --git a/TravelAgency/TravelAgencyWebApp/Views/Home/CreateExcursionGroup.cshtml b/TravelAgency/TravelAgencyWebApp/Views/Home/CreateExcursionGroup.cshtml index fa1f760..488d925 100644 --- a/TravelAgency/TravelAgencyWebApp/Views/Home/CreateExcursionGroup.cshtml +++ b/TravelAgency/TravelAgencyWebApp/Views/Home/CreateExcursionGroup.cshtml @@ -1,4 +1,7 @@ -@{ +@using TravelAgencyContracts.ViewModels + +@model List +@{ ViewData["Title"] = "Create excursion group"; }
@@ -30,7 +33,7 @@ - @foreach (var tour in ViewBag.Tours) + @foreach (var tour in Model) { @tour.TourName diff --git a/TravelAgency/TravelAgencyWebApp/Views/Home/ReportPlaceTour.cshtml b/TravelAgency/TravelAgencyWebApp/Views/Home/ReportPlaceTour.cshtml index 715d8ac..e87ab36 100644 --- a/TravelAgency/TravelAgencyWebApp/Views/Home/ReportPlaceTour.cshtml +++ b/TravelAgency/TravelAgencyWebApp/Views/Home/ReportPlaceTour.cshtml @@ -1,4 +1,7 @@ -@{ +@using TravelAgencyContracts.ViewModels + +@model List +@{ ViewData["Title"] = "Places per tour report"; }
diff --git a/TravelAgency/TravelAgencyWebApp/Views/Home/ReportTourPeriod.cshtml b/TravelAgency/TravelAgencyWebApp/Views/Home/ReportTourPeriod.cshtml index b4e60db..78d4ca6 100644 --- a/TravelAgency/TravelAgencyWebApp/Views/Home/ReportTourPeriod.cshtml +++ b/TravelAgency/TravelAgencyWebApp/Views/Home/ReportTourPeriod.cshtml @@ -1,4 +1,7 @@ -@{ +@using TravelAgencyContracts.ViewModels + +@model List +@{ ViewData["Title"] = "Tours time period report"; } diff --git a/TravelAgency/TravelAgencyWebApp/Views/Home/UpdateExcursion.cshtml b/TravelAgency/TravelAgencyWebApp/Views/Home/UpdateExcursion.cshtml index af5a0a5..d1eac8d 100644 --- a/TravelAgency/TravelAgencyWebApp/Views/Home/UpdateExcursion.cshtml +++ b/TravelAgency/TravelAgencyWebApp/Views/Home/UpdateExcursion.cshtml @@ -1,4 +1,7 @@ -@{ +@using TravelAgencyContracts.ViewModels + +@model List +@{ ViewData["Title"] = "Update excursion"; }
@@ -28,7 +31,7 @@ - @foreach (var tour in ViewBag.Tours) + @foreach (var tour in Model) { @tour.TourName diff --git a/TravelAgency/TravelAgencyWebApp/Views/Home/UpdateExcursionGroup.cshtml b/TravelAgency/TravelAgencyWebApp/Views/Home/UpdateExcursionGroup.cshtml index 8998773..b9e440c 100644 --- a/TravelAgency/TravelAgencyWebApp/Views/Home/UpdateExcursionGroup.cshtml +++ b/TravelAgency/TravelAgencyWebApp/Views/Home/UpdateExcursionGroup.cshtml @@ -1,4 +1,7 @@ -@{ +@using TravelAgencyContracts.ViewModels + +@model List +@{ ViewData["Title"] = "Update excursion group"; }
@@ -30,7 +33,7 @@ - @foreach (var tour in ViewBag.Tours) + @foreach (var tour in Model) { @tour.TourName