diff --git a/TIAMDLL.Common/obj/Debug/net7.0/TIAMDLL.Common.GeneratedMSBuildEditorConfig.editorconfig b/TIAMDLL.Common/obj/Debug/net7.0/TIAMDLL.Common.GeneratedMSBuildEditorConfig.editorconfig index 2dfdd734..dbc25368 100644 --- a/TIAMDLL.Common/obj/Debug/net7.0/TIAMDLL.Common.GeneratedMSBuildEditorConfig.editorconfig +++ b/TIAMDLL.Common/obj/Debug/net7.0/TIAMDLL.Common.GeneratedMSBuildEditorConfig.editorconfig @@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = TIAMDLL.Common -build_property.ProjectDir = C:\MANGOWEB\TourIAmProject\TIAMDLL.Common\ +build_property.ProjectDir = C:\Users\Ádám\Source\Repos\TourIAm\TIAMDLL.Common\ diff --git a/TIAMDLL.Common/obj/Debug/net7.0/TIAMDLL.Common.assets.cache b/TIAMDLL.Common/obj/Debug/net7.0/TIAMDLL.Common.assets.cache index 9ff15413..3687eb8b 100644 Binary files a/TIAMDLL.Common/obj/Debug/net7.0/TIAMDLL.Common.assets.cache and b/TIAMDLL.Common/obj/Debug/net7.0/TIAMDLL.Common.assets.cache differ diff --git a/TIAMDLL.Common/obj/Release/net7.0/TIAMDLL.Common.AssemblyInfoInputs.cache b/TIAMDLL.Common/obj/Release/net7.0/TIAMDLL.Common.AssemblyInfoInputs.cache new file mode 100644 index 00000000..f4b097be --- /dev/null +++ b/TIAMDLL.Common/obj/Release/net7.0/TIAMDLL.Common.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +0aa444ae556d2df6dc138f149eb702065af2ab69 diff --git a/TIAMDLL.Common/obj/Release/net7.0/TIAMDLL.Common.assets.cache b/TIAMDLL.Common/obj/Release/net7.0/TIAMDLL.Common.assets.cache new file mode 100644 index 00000000..72543762 Binary files /dev/null and b/TIAMDLL.Common/obj/Release/net7.0/TIAMDLL.Common.assets.cache differ diff --git a/TIAMSharedUI/Pages/ChooseDestination.cs b/TIAMSharedUI/Pages/ChooseDestination.razor.cs similarity index 100% rename from TIAMSharedUI/Pages/ChooseDestination.cs rename to TIAMSharedUI/Pages/ChooseDestination.razor.cs diff --git a/TIAMSharedUI/Pages/HotelDetails.razor b/TIAMSharedUI/Pages/HotelDetails.razor new file mode 100644 index 00000000..6b81ae2f --- /dev/null +++ b/TIAMSharedUI/Pages/HotelDetails.razor @@ -0,0 +1,106 @@ +@page "/hotel" +@using TIAMSharedUI.Shared +@inject NavigationManager navManager + +
+
+ +
+
+ + + +
+
+

+ 10% DISCOUNT COUPON +

+
+ +
+ +
+
+
Authentic
+

Mandragóra Restaurant

+
+ + $10.00 +
+

A nice Hungarian restaurant that offers a delightful culinary journey with traditional dishes like goulash, stuffed peppers, and chimney cake, in a cozy, welcoming atmosphere.

+
+ +
+
+
+
+

Location:

+

Kacsa u. 13, Budapest

+ + @{ + var aKey = "AIzaSyAyEYJkpt2KDa3SJ34UNWO4-dNOJKmUtF8"; + var gUrl = "https://www.google.com/maps/embed/v1/place?key=" + aKey + "&q=Space+Needle,Budapest+HU"; + } + + +
+
+
+ +
+ + +
+ + +@code { + public void next() => navManager.NavigateTo("/transfer"); + +} diff --git a/TIAMSharedUI/Pages/Index.razor b/TIAMSharedUI/Pages/Index.razor index 38de88ed..b5560892 100644 --- a/TIAMSharedUI/Pages/Index.razor +++ b/TIAMSharedUI/Pages/Index.razor @@ -3,7 +3,7 @@ Index - +
diff --git a/TIAMSharedUI/Pages/Login.razor b/TIAMSharedUI/Pages/Login.razor index beb68514..06efd79b 100644 --- a/TIAMSharedUI/Pages/Login.razor +++ b/TIAMSharedUI/Pages/Login.razor @@ -1,5 +1,8 @@ @page "/login" +@using TIAMWebApp.Shared.Application.Interfaces; +@using TIAMWebApp.Shared.Application.Models; @inject NavigationManager navManager +@inject IUserDataService userDataService Login
@@ -19,26 +22,38 @@
- - + + + + + + +
Login +

@isUserLoggedIn

@CurrentValue

Forget password? or Sign up
@code { - public void next() + + bool isUserLoggedIn; + int CurrentValue = 0; + + public async Task next() { + var user = await userDataService.IsLoggedInAsync(); + user.IsLoggedIn = true; + isUserLoggedIn = user.IsLoggedIn; + user.UserType = (UserType)CurrentValue; navManager.NavigateTo("home"); + } } diff --git a/TIAMSharedUI/Pages/Login.razor.css b/TIAMSharedUI/Pages/Login.razor.css index 4de082b0..a35d1811 100644 --- a/TIAMSharedUI/Pages/Login.razor.css +++ b/TIAMSharedUI/Pages/Login.razor.css @@ -1,3 +1,7 @@ .wrapper{ max-width:400px; +} + +select :focus-visible { + border-color: transparent !important; } \ No newline at end of file diff --git a/TIAMSharedUI/Pages/RestaurantDetails.razor b/TIAMSharedUI/Pages/RestaurantDetails.razor index e99c897b..a821baa3 100644 --- a/TIAMSharedUI/Pages/RestaurantDetails.razor +++ b/TIAMSharedUI/Pages/RestaurantDetails.razor @@ -1,38 +1,48 @@ @page "/restaurant" @using TIAMSharedUI.Shared +@inject NavigationManager navManager +
+
- -
-
-
- - -
-
-

10% DISCOUNT COUPON

-
-
- - +
+ + +
@code { + public void next() => navManager.NavigateTo("/transfer"); } + + diff --git a/TIAMSharedUI/Pages/TourOrderDetails.razor b/TIAMSharedUI/Pages/TourOrderDetails.razor new file mode 100644 index 00000000..025bdfbc --- /dev/null +++ b/TIAMSharedUI/Pages/TourOrderDetails.razor @@ -0,0 +1,80 @@ +@page "/tourferdetails" +Tour order details + + +
+

Transfer details

+
+ +
+
+
+
+
+
+
+
+ ID: 1222528743 +

12,March 2019

+
+ +
+
+
+
+
+
Passenger: +1 123 12345678
+

Budapest, Dózsa György út 35, 1146

+

27th November, 2023

+

10:00 AM

+
+

POX-382

+

Silver, Toyota, Prius

+
+

Status on: 11:30pm, Today

+
+
+ +
+ +
+
    +
  • + PLACED +
  • +
  • WAITING FOR PICK UP
  • +
  • + FINISHED +
  • +
+ +
+

$ 35 via (COD)

+
+
+ +
+
+
+
+
+ + +@code { + +} diff --git a/TIAMSharedUI/Pages/Transfer.cs b/TIAMSharedUI/Pages/Transfer.cs deleted file mode 100644 index 917f5377..00000000 --- a/TIAMSharedUI/Pages/Transfer.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Components; -using TIAM.Entities.TransferDestinations; -using TIAMWebApp.Shared.Application.Models; - -namespace EmployeePortal.Client.Components -{ - public partial class Transfer : ComponentBase - { - - public string DestinationId - { - get; - set; - } - protected TransferDestination TDestinations - { - get; - set; - } - - } -} diff --git a/TIAMSharedUI/Pages/Transfer.razor b/TIAMSharedUI/Pages/Transfer.razor index 82628fe9..ca67d7b1 100644 --- a/TIAMSharedUI/Pages/Transfer.razor +++ b/TIAMSharedUI/Pages/Transfer.razor @@ -1,8 +1,6 @@ @page "/transfer" @using TIAMSharedUI.Shared -@using TIAMWebApp.Shared.Application.Interfaces -@inject ITransferDataService transferDataService - +@inject NavigationManager navManager Transfer
@@ -11,15 +9,17 @@
- +
-
- @message -
+
- + +
+ +
+
@@ -43,11 +43,17 @@ @code { SliderItemSelector slider; - public string message; + public string message; + public string message2; + public List destinations = new List() {"Liszt Ferenc Airport", "Buda Castle", "Chain Bridge"}; void DisplaySlideData() { - message = " Target destination is " + slider.SliderElementId.ToString(); + if(slider.SliderElementId != 0) + { + message2 = destinations[slider.SliderElementId-1]; + } + } /*protected override void OnAfterRender(bool isFirst) @@ -55,16 +61,13 @@ message = " Target destination is " + slider.SliderElementId.ToString(); }*/ - public void next() + void changeDest(string dest) { - + message2 = dest; } - protected override async Task OnInitializedAsync() - { - var suppliers = await transferDataService.GetDestinationsAsync(); - Console.WriteLine(string.Join("; ", suppliers.Select(x => x.Name))); - } + public void next() => navManager.NavigateTo("/transfer2"); + } diff --git a/TIAMSharedUI/Pages/Transfer.razor.css b/TIAMSharedUI/Pages/Transfer.razor.css index be746fb5..83c30f41 100644 --- a/TIAMSharedUI/Pages/Transfer.razor.css +++ b/TIAMSharedUI/Pages/Transfer.razor.css @@ -175,8 +175,8 @@ height: 40px; /*background-color: #03A9F4;*/ color: #fff; - border-radius: 25px; - box-shadow: 3px 3px 3px #b1b1b1, -3px -3px 3px #fff; + border-radius: 15px; + /*box-shadow: 3px 3px 3px #b1b1b1, -3px -3px 3px #fff;*/ letter-spacing: 1.3px; } diff --git a/TIAMSharedUI/Pages/TransferFinal.razor b/TIAMSharedUI/Pages/TransferFinal.razor new file mode 100644 index 00000000..6677c123 --- /dev/null +++ b/TIAMSharedUI/Pages/TransferFinal.razor @@ -0,0 +1,72 @@ +@page "/transfer2" +Transferdetails +@inject NavigationManager navManager + +
+

Transfer summary

+

Please review your transfer!

+
+ +
+
+
+
+
+
+
+
+

27th November, 2023, 10:00 AM

+
+ +
+
+
+
+
+

Passenger info

+
+1 123 12345678
+
+

Destination

+
Liszt Ferenc Airport
+
+

Pick up address

+
Budapest, Dózsa György út 35, 1146
+
+
3 persons
+

Silver, Toyota, Prius

+ +
+
+ +
+ +
+ +
+

$ 35 via (COD)

+
+
+ +
+
+
+
+
+ + +@code { + public void next() => navManager.NavigateTo("/transfer"); + public void previous() => navManager.NavigateTo("/transfer3"); +} diff --git a/TIAMSharedUI/Pages/TransferDetails.razor b/TIAMSharedUI/Pages/TransferOrderDetails.razor similarity index 82% rename from TIAMSharedUI/Pages/TransferDetails.razor rename to TIAMSharedUI/Pages/TransferOrderDetails.razor index 671c374a..b72b63e5 100644 --- a/TIAMSharedUI/Pages/TransferDetails.razor +++ b/TIAMSharedUI/Pages/TransferOrderDetails.razor @@ -4,36 +4,35 @@

Transfer details

-

Swipe to select your destination!

-
-
+
+
-

Order ID 1222528743

-

Place On 12,March 2019

+ ID: 1222528743 +

12,March 2019

-
Museum of Ethnography
+
Passenger: +1 123 12345678

Budapest, Dózsa György út 35, 1146

27th November, 2023

10:00 AM

-
+

POX-382

Silver, Toyota, Prius

-
+

Status on: 11:30pm, Today

diff --git a/TIAMSharedUI/Pages/User/Home.razor b/TIAMSharedUI/Pages/User/Home.razor index aba9e964..6f96239d 100644 --- a/TIAMSharedUI/Pages/User/Home.razor +++ b/TIAMSharedUI/Pages/User/Home.razor @@ -5,6 +5,7 @@ @layout AdminLayout @inject IPopulationStructureDataProvider DataProvider @inject ISupplierService SupplierService +@inject IUserDataService UserDataService Transfer
@@ -13,520 +14,573 @@
- -
-
-
-
-
-
- Transfers -

Summary

-
- -
-
-
- -
New
-

12

-
Scheduled
-

182

-
Finished
-

15665

- -
- - - - -
-
-
-
-
-
-
- Service providers -

Summary

-
- -
-
-
- -
Guides
-

32

-
Hotels
-

82

-
Restaurants
-

15

-
Transfer company
-

1

- -
- -
-
-
-
-
-
-
- Finances -

Summary

-
- -
-
-
- -
Income
-

$32 456

-
Comission to be paid
-

$5 345

-
Service fees to be paid
-

$23 871

-
Revenue
-

$3 240

- -
- -
-
-
-
-
-
-
- Affiliates -

Summary

-
- -
-
-
- -
Top affiliate
-

Hotel Bambara

-
Comission Earned
-

$1 315

-
-
Top referred item
-

Buda castle tour

-
-
Level 1 affiliates
-

132

- -
- -
-
-
- -
- -
-
-
-
-
- Hotel details - -
- -
-
-
-
- - - - - - - - - - - - - -
-
- -
-
-
-
-
-
-
- Population Data -

12,March 2020

-
- -
-
-
-
- - - - - - - - - -
-
@context.Point.Argument
-
Age Group: @context.Point.SeriesName
-
Population: @($"{context.Point.Value:N0}")
-
-
-
- - - -
- -
- -
- - - - - -
-
- - - - -
- -
-
-
-
-
- Hotel details - -
- -
-
-
-
-
-
Your QR code
-

Use this in printed material, to gain referrals

-
-
- -
- -
- -
-

Some conclusion

-
-
- -
-
-
-
-
-
-
- My orders - -
- -
-
-
-
- - - - - - - - - - - - -
- -
-

Some conclusion

-
-
- -
-
-
-
-
-
-
- Hotel details - -
- -
-
-
-
- - - - - -
-
- -
-
- -
-
-
-
-
- Panel title -

Subtitle

-
- -
-
-
-
-
-
Some info
-

Budapest, Dózsa György út 35, 1146

-
-
- -
- -
-
    -
  • - PLACED -
  • -
  • WAITING FOR PICK UP
  • -
  • - FINISHED -
  • -
- -
-

Some conclusion

-
-
- -
-
- - -
- - + @{ + if(userType == 4) + { + +
+
+
+
+
+
+ Transfers +

Summary

+
+ +
+
+
+ +
New
+

12

+
Scheduled
+

182

+
Finished
+

15665

+ +
+ + + + +
+
+
+
+
+
+
+ Service providers +

Summary

+
+ +
+
+
+ +
Guides
+

32

+
Hotels
+

82

+
Restaurants
+

15

+
Transfer company
+

1

+ +
+ +
+
+
+
+
+
+
+ Finances +

Summary

+
+ +
+
+
+ +
Income
+

$32 456

+
Comission to be paid
+

$5 345

+
Service fees to be paid
+

$23 871

+
Revenue
+

$3 240

+ +
+ +
+
+
+
+
+
+
+ Affiliates +

Summary

+
+ +
+
+
+ +
Top affiliate
+

Hotel Bambara

+
Comission Earned
+

$1 315

+
+
Top referred item
+

Buda castle tour

+
+
Level 1 affiliates
+

132

+ +
+ +
+
+
+
+
+
+
+ Hotel details + +
+ +
+
+
+
+ + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+ Population Data +

12,March 2020

+
+ +
+
+
+
+ + + + + + + + + +
+
@context.Point.Argument
+
Age Group: @context.Point.SeriesName
+
Population: @($"{context.Point.Value:N0}")
+
+
+
+ + + +
+ +
+ +
+ + + + + +
+
+
+
+
+
+ Affiliates +

Details

+
+ +
+
+
+ + + + + + + + + + + + + + + +
+ +
+
+
+ + + + + } + + else if(userType == 1) + { +
+ +
+
+
+
+
+ Hotel details + +
+ +
+
+
+
+
+
Your QR code
+

Use this in printed material, to gain referrals

+
+
+ +
+ +
+ +
+

Some conclusion

+
+
+ +
+
+
+
+
+
+
+ My orders + +
+ +
+
+
+
+ + + + + + @context.Value + + + + + + + + + + + +
+ +
+

Some conclusion

+
+
+ +
+
+
+
+
+
+
+ Hotel details + +
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+ Panel title +

Subtitle

+
+ +
+
+
+
+
+
Some info
+

Budapest, Dózsa György út 35, 1146

+
+
+ +
+ +
+
    +
  • + PLACED +
  • +
  • WAITING FOR PICK UP
  • +
  • + FINISHED +
  • +
+ +
+

Some conclusion

+
+
+ +
+
+
+
+
+
+
+ Affiliates +

Details

+
+ +
+
+
+ + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + } + } + + + + - -
-
-
-
-
-
- Affiliates -

Details

-
- -
-
-
- - - - - - - - - - - - - - - -
- -
-
-
- -
@@ -549,7 +603,7 @@
+ src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
@@ -599,7 +653,7 @@
+ src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
@@ -649,7 +703,7 @@
+ src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
@@ -679,7 +733,7 @@
- +
@@ -696,10 +750,19 @@ object? Data { get; set; } + bool isUserLoggedIn; + int userType = 0; + + protected override async Task OnInitializedAsync() { + base.OnInitialized(); + + var user = await UserDataService.IsLoggedInAsync(); + isUserLoggedIn = user.IsLoggedIn; + userType = (int)user.UserType; OrderData = new object[] { diff --git a/TIAMSharedUI/Shared/AdminLayout.razor b/TIAMSharedUI/Shared/AdminLayout.razor index 35f99a57..019a3243 100644 --- a/TIAMSharedUI/Shared/AdminLayout.razor +++ b/TIAMSharedUI/Shared/AdminLayout.razor @@ -1,8 +1,12 @@ @inherits LayoutComponentBase @using TIAMSharedUI.Shared.User - +@using TIAMWebApp.Shared.Application.Interfaces +@using TIAMWebApp.Shared.Application.Models; +@inject NavigationManager NavigationManager +@inject IUserDataService userDataService
+
@@ -10,7 +14,30 @@
+ @{ + if (isUserLoggedIn) + { + + } + } @Body
+ +@code { + + bool isUserLoggedIn; + int userType = 0; + + protected override async Task OnInitializedAsync() + { + var user = await userDataService.IsLoggedInAsync(); + isUserLoggedIn = user.IsLoggedIn; + + if (!isUserLoggedIn) + { + NavigationManager.NavigateTo("/login"); + } + } +} diff --git a/TIAMSharedUI/Shared/MainLayout.razor b/TIAMSharedUI/Shared/MainLayout.razor index b060e3e7..4598e1e2 100644 --- a/TIAMSharedUI/Shared/MainLayout.razor +++ b/TIAMSharedUI/Shared/MainLayout.razor @@ -1,4 +1,7 @@ @inherits LayoutComponentBase +@using TIAMWebApp.Shared.Application.Interfaces +@inject IUserDataService UserDataService; +@inject IJSRuntime jsRuntime
@@ -9,7 +12,47 @@
+ @{ + if(isUserLoggedIn) + { + + } + } + @Body
+ +@code { + + bool isUserLoggedIn; + int userType = 0; + int currentUserRole = 249; + //add a new dictionary for the role types + + + + + protected override async Task OnInitializedAsync() + { + var user = await UserDataService.IsLoggedInAsync(); + isUserLoggedIn = user.IsLoggedIn; + + } + + protected override void OnAfterRender(bool isFirst) + { + LogToBrowserConsole("0 "); + + } + + + + public void LogToBrowserConsole(string message) + { + jsRuntime.InvokeVoidAsync("console.log", message); + } + + +} diff --git a/TIAMSharedUI/Shared/NavMenu.razor.css b/TIAMSharedUI/Shared/NavMenu.razor.css index 5f1627c7..1e9269d0 100644 --- a/TIAMSharedUI/Shared/NavMenu.razor.css +++ b/TIAMSharedUI/Shared/NavMenu.razor.css @@ -44,7 +44,7 @@ .nav-item ::deep a { color: #58457b; - border-radius: 25px; + border-radius: 15px; height: 3rem; display: flex; align-items: center; diff --git a/TIAMSharedUI/Shared/SliderItemSelector.razor b/TIAMSharedUI/Shared/SliderItemSelector.razor index d1df7813..71bda048 100644 --- a/TIAMSharedUI/Shared/SliderItemSelector.razor +++ b/TIAMSharedUI/Shared/SliderItemSelector.razor @@ -1,5 +1,41 @@  -