From 1b3ac474b8f3fecc49cda2857ba89c994a66394d Mon Sep 17 00:00:00 2001 From: cuqmbr Date: Fri, 13 May 2022 13:39:18 +0300 Subject: [PATCH] feat: add info popup, project cleanup --- TicketOffice/Pages/Auth/Account.cshtml | 250 ++++++++++-------- TicketOffice/Pages/Routes/Index.cshtml | 12 +- TicketOffice/wwwroot/css/Account.css | 4 +- TicketOffice/wwwroot/css/CityListPopup.css | 16 -- TicketOffice/wwwroot/css/InfoPopup.css | 68 +++++ TicketOffice/wwwroot/css/TicketOrderPopup.css | 4 +- 6 files changed, 209 insertions(+), 145 deletions(-) create mode 100644 TicketOffice/wwwroot/css/InfoPopup.css diff --git a/TicketOffice/Pages/Auth/Account.cshtml b/TicketOffice/Pages/Auth/Account.cshtml index 032e973..90b89ce 100644 --- a/TicketOffice/Pages/Auth/Account.cshtml +++ b/TicketOffice/Pages/Auth/Account.cshtml @@ -7,8 +7,9 @@ CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("uk-UA"); } - + +
Придбані квитки
@@ -21,121 +22,39 @@
@foreach (var ticket in Model.Tickets) { -
-
-
Квиток № @ticket.Id
-
-
-
- Пасажир, місце: - @ticket.PassengerLastName @ticket.PassengerFirstName, @ticket.PassengerPlace -
-
- Номер рейсу: - № @ticket.Route.Number -
-
- Дата відправлення: - - @ticket.Route.Cities.First().DepartureTime?.ToString("f").Split(",")[0].ToLower(), - @ticket.Route.Cities.First().DepartureTime?.ToString("dd.MM.yyyy"), - @ticket.Route.Cities.First().DepartureTime?.ToString("HH:mm") - -
-
- Дата прибуття: - - @ticket.Route.Cities.Last().ArrivalTime?.ToString("f").Split(",")[0].ToLower(), - @ticket.Route.Cities.Last().ArrivalTime?.ToString("dd.MM.yyyy"), - @ticket.Route.Cities.Last().ArrivalTime?.ToString("HH:mm") - -
+
+
Квиток № @ticket.Id
+
+
+
+ Пасажир, місце: + @ticket.PassengerLastName @ticket.PassengerFirstName, @ticket.PassengerPlace +
+
+ Номер рейсу: + № @ticket.Route.Number +
+
+ Дата відправлення: + + @ticket.Route.Cities.First().DepartureTime?.ToString("f").Split(",")[0].ToLower(), + @ticket.Route.Cities.First().DepartureTime?.ToString("dd.MM.yyyy"), + @ticket.Route.Cities.First().DepartureTime?.ToString("HH:mm") + +
+
+ Дата прибуття: + + @ticket.Route.Cities.Last().ArrivalTime?.ToString("f").Split(",")[0].ToLower(), + @ticket.Route.Cities.Last().ArrivalTime?.ToString("dd.MM.yyyy"), + @ticket.Route.Cities.Last().ArrivalTime?.ToString("HH:mm") +
-
-
- - -@* *@ +@* Popup windows *@ + +@if (Model.Tickets is not {Count: 0}) +{ + foreach (var ticket in Model.Tickets) + { + + + + } +} + + diff --git a/TicketOffice/Pages/Routes/Index.cshtml b/TicketOffice/Pages/Routes/Index.cshtml index e917c05..c326855 100644 --- a/TicketOffice/Pages/Routes/Index.cshtml +++ b/TicketOffice/Pages/Routes/Index.cshtml @@ -190,7 +190,7 @@
-@if (Model.Routes != null) +@if (Model.Routes is not null) { foreach (var route in Model.Routes) { @@ -269,17 +269,11 @@
- } -} - -@if (Model.Routes != null) -{ - foreach (var route in Model.Routes) - { +