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