@@ -60,7 +60,7 @@
@msg;
-
+
@@ -88,6 +88,6 @@
private void SendMail(string email)
{
var sendResult = UserDataService.SendForgottenPasswordMail(emailAddress).Forget;
-
+ msg = "We have sent you an email, with instructions on how to renew your password. ";
}
}
diff --git a/TIAMSharedUI/Pages/PublicCreateAndManageTransfer.razor b/TIAMSharedUI/Pages/PublicCreateAndManageTransfer.razor
index df50869e..c91d5ba6 100644
--- a/TIAMSharedUI/Pages/PublicCreateAndManageTransfer.razor
+++ b/TIAMSharedUI/Pages/PublicCreateAndManageTransfer.razor
@@ -39,14 +39,14 @@
Partner:
@SelectedHotel
-
+
-
+
-
+
Reload
@@ -91,9 +91,10 @@
protected override async Task OnParametersSetAsync()
{
- if(productId.IsNullOrEmpty())
+ if(!productId.IsNullOrEmpty())
{
- var result = await _adminSignalRClient.GetByIdAsync
(SignalRTags.GetCompaniesById, productId);
+ var result = await _adminSignalRClient.GetByIdAsync(SignalRTags.GetProductById, productId);
+ _logger.Debug($"Current product: {result.Name}");
if (result != null)
{
SelectedHotel = result;
@@ -103,7 +104,7 @@
SelectedHotel = null;
}
}
-
+ _logger.Debug($"OnParameterSet, going forward");
if (!referralId.IsNullOrEmpty())
{
//check if storage has some other referralId already TODO
diff --git a/TIAMSharedUI/Pages/TransferPage.razor b/TIAMSharedUI/Pages/TransferPage.razor
index c652b4a5..5ebbfddd 100644
--- a/TIAMSharedUI/Pages/TransferPage.razor
+++ b/TIAMSharedUI/Pages/TransferPage.razor
@@ -267,8 +267,7 @@
"Destination",
"UserId",
"ProductId",
- "PaymentId",
- "TripDate",
+ "PaymentId",
"FirstName",
"LastName",
"UserProductMappingId",
@@ -283,8 +282,7 @@
"PickupAddress",
"UserId",
"ProductId",
- "PaymentId",
- "TripDate",
+ "PaymentId",
"FirstName",
"LastName",
"UserProductMappingId",
@@ -405,7 +403,7 @@
var transfer = await WizardProcessor.ProcessWizardAsync(result.GetType(), result);
_logger.Info($"Submitted nested form: {result.GetType().FullName}");
- navManager.NavigateTo($"/transfer2/{resModel.Id}");
+ navManager.NavigateTo($"/mytransfers/{resModel.Id}");
}
protected override Task OnInitializedAsync()
diff --git a/TIAMSharedUI/Pages/User/CardComponents/UserCardComponent.razor b/TIAMSharedUI/Pages/User/CardComponents/UserCardComponent.razor
index c0f3af3b..8504b1b1 100644
--- a/TIAMSharedUI/Pages/User/CardComponents/UserCardComponent.razor
+++ b/TIAMSharedUI/Pages/User/CardComponents/UserCardComponent.razor
@@ -116,7 +116,7 @@
void OnPasswordSet(string password)
{
- msg = $"Password to set: {NewPassword}";
+ msg = $"Please type in again";
PasswordNotSet = false;
StateHasChanged();
diff --git a/TIAMSharedUI/Pages/User/Hotels/HotelComponent.razor b/TIAMSharedUI/Pages/User/Hotels/HotelComponent.razor
index 597c7362..5f821491 100644
--- a/TIAMSharedUI/Pages/User/Hotels/HotelComponent.razor
+++ b/TIAMSharedUI/Pages/User/Hotels/HotelComponent.razor
@@ -103,6 +103,7 @@
}
+
diff --git a/TIAMSharedUI/Pages/User/SysAdmins/ManageTransfers.razor b/TIAMSharedUI/Pages/User/SysAdmins/ManageTransfers.razor
index 37cf6796..81cb097d 100644
--- a/TIAMSharedUI/Pages/User/SysAdmins/ManageTransfers.razor
+++ b/TIAMSharedUI/Pages/User/SysAdmins/ManageTransfers.razor
@@ -118,6 +118,7 @@
+
@{
@@ -165,6 +166,9 @@
@editFormContext.GetEditor("LastName")
+
+ @editFormContext.GetEditor("ContactEmail")
+
@editFormContext.GetEditor("ToAddress")
diff --git a/TIAMSharedUI/Pages/User/SysAdmins/MessageDetailGridComponent.razor b/TIAMSharedUI/Pages/User/SysAdmins/MessageDetailGridComponent.razor
index aeaf0d62..6d232a81 100644
--- a/TIAMSharedUI/Pages/User/SysAdmins/MessageDetailGridComponent.razor
+++ b/TIAMSharedUI/Pages/User/SysAdmins/MessageDetailGridComponent.razor
@@ -27,14 +27,15 @@
@inject AdminSignalRClient AdminSignalRClient;
@inject ISessionService sessionService
@inject IComponentUpdateService ComponentUpdateService
+@inject ITransferDataService transferDataService
+Logger="_logger"
+SignalRClient="AdminSignalRClient"
+GetAllMessageTag="GetAllMessageTag"
+ContextIds="@(ContextId.IsNullOrEmpty() ? throw new InvalidDataException($"ContextId.IsNullOrEmpty(); ContextId: {ContextId}") : [ContextId.Value])"
+CustomizeElement="CustomizeElement"
+ShowFilterRow="ShowFilterRow">
@@ -163,10 +164,24 @@
private Guid? myUserId;
- protected override void OnInitialized()
+ protected override async Task OnInitializedAsync()
{
_logger = new LoggerClient(LogWriters.ToArray());
- myUserId = _sessionService.User.UserId;
+ if(sessionService.User != null)
+ {
+ myUserId = _sessionService.User.UserId;
+ }
+ else
+ {
+ if(ContextId != null)
+ {
+ //should be transfer because in any other way, the user must be logged in
+ myUserId = Guid.Empty; //TODO get userId by transfer
+ var transfer = await AdminSignalRClient.GetTransferById((Guid)ContextId);
+ myUserId = transfer.UserId;
+ }
+
+ }
}
private void CustomizeElement(GridCustomizeElementEventArgs e)
diff --git a/TIAMSharedUI/Shared/AdminLayout.razor b/TIAMSharedUI/Shared/AdminLayout.razor
index d5a1d5e7..08301b5a 100644
--- a/TIAMSharedUI/Shared/AdminLayout.razor
+++ b/TIAMSharedUI/Shared/AdminLayout.razor
@@ -18,7 +18,7 @@
-
+
diff --git a/TIAMSharedUI/Shared/Users/AdminNavMenu.razor b/TIAMSharedUI/Shared/Users/AdminNavMenu.razor
index 3079ac10..be47426e 100644
--- a/TIAMSharedUI/Shared/Users/AdminNavMenu.razor
+++ b/TIAMSharedUI/Shared/Users/AdminNavMenu.razor
@@ -12,13 +12,14 @@
@inject NavigationManager NavigationManager
@inject IEnumerable LogWriters
@inject IJSRuntime jsRuntime
+@inject IComponentUpdateService componentUpdateService
+ Orientation="Orientation"
+ DisplayMode="DisplayMode"
+ HamburgerButtonPosition="MenuHamburgerButtonPosition.Right">
@{
if (_isMobile)
@@ -32,29 +33,29 @@
@if (IsSysAdmin)
{
+ BeginGroup="true"
+ IconCssClass="fa-solid fa-face-smile"
+ Tooltip="Transfers"
+ Alignment="ToolbarItemAlignment.Right"
+ Click="() => NavigationManager.NavigateTo(url1)" />
}
@if (IsDriver)
{
+ BeginGroup="true"
+ IconCssClass="fa-solid fa-taxi"
+ Tooltip="My tasks"
+ Alignment="ToolbarItemAlignment.Right"
+ Click="() => NavigationManager.NavigateTo(url2)" />
}
+ BeginGroup="true"
+ IconCssClass="fa-solid fa-envelope"
+ Tooltip="Messages"
+ Alignment="ToolbarItemAlignment.Right"
+ Click="() => NavigationManager.NavigateTo(url3)" />
}
@@ -107,11 +108,11 @@
@* *@
@{
@@ -153,6 +154,7 @@
private bool expandHotelAdminNav = false;
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
+ private bool myUser = false;
private bool userHasCompany;
private bool userHasHotels;
private bool IsDriver;
@@ -237,4 +239,56 @@
SessionService.ClearAll();
NavigationManager.NavigateTo("/");
}
+
+ protected override void OnAfterRender(bool firstRender)
+ {
+ base.OnAfterRender(firstRender);
+
+ if (firstRender)
+ componentUpdateService.GetOrAddComponent().RefreshRequested += RefreshMe;
+ }
+
+ private void RefreshMe()
+ {
+ _logger.Debug($"Navbar refresh called! {DateTime.Now} ");
+
+ //OnInitialized();
+ InitUser();
+ StateHasChanged();
+ }
+
+ private void InitUser()
+ {
+ if (SessionService.User != null)
+ {
+ myUser = true;
+ userId = SessionService.User.UserId;
+ userEmail = SessionService.User.Email;
+
+ if (SessionService.User.UserModelDto.ProfileDto.FullName != null)
+ {
+ userFullName = SessionService.User.UserModelDto.ProfileDto.FullName!;
+ }
+ }
+ else
+ {
+ _logger.Debug($"Navbar myUser false! {DateTime.Now} ");
+ myUser = false;
+ }
+
+ var properties = SessionService.User?.HasProperties;
+ if (properties == null) return;
+
+ userHasCompany = SessionService.HasCompany;
+ userHasHotels = properties.Count > 0;
+ IsSysAdmin = SessionService.IsSysAdmin;
+ IsDevAdmin = SessionService.IsDevAdmin;
+ IsDriver = SessionService.IsDriver;
+ driverPermissionId = SessionService.DriverPersmissionId;
+
+ foreach (var property in properties)
+ {
+ _logger.Detail($"First property: {property.Value} ");
+ }
+ }
}
diff --git a/TIAMSharedUI/TIAMSharedUI.csproj b/TIAMSharedUI/TIAMSharedUI.csproj
index e9d3f208..bb1d18c9 100644
--- a/TIAMSharedUI/TIAMSharedUI.csproj
+++ b/TIAMSharedUI/TIAMSharedUI.csproj
@@ -19,7 +19,7 @@
-
+
diff --git a/TIAMSharedUI/TIAMSharedUI.csproj.bak b/TIAMSharedUI/TIAMSharedUI.csproj.bak
index baa25e1a..e9d3f208 100644
--- a/TIAMSharedUI/TIAMSharedUI.csproj.bak
+++ b/TIAMSharedUI/TIAMSharedUI.csproj.bak
@@ -6,6 +6,11 @@
enable
+
+
+
+
+
@@ -14,10 +19,10 @@
-
-
-
-
+
+
+
+
@@ -74,9 +79,39 @@
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
true
+
+ <_ContentIncludedByDefault Remove="Pages\Utility\DynamicForm.razor" />
+ <_ContentIncludedByDefault Remove="Shared\Users\NavigationHelperComponent.razor" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TIAMWebApp/Client/Properties/PublishProfiles/FolderProfile.pubxml b/TIAMWebApp/Client/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 00000000..94711905
--- /dev/null
+++ b/TIAMWebApp/Client/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,20 @@
+
+
+
+
+ true
+ false
+ true
+ Release
+ Any CPU
+ FileSystem
+ D:\REPOS\AYCODE\Publish\ServerRelease
+ FileSystem
+ <_TargetId>Folder
+
+ net8.0
+ browser-wasm
+ 2091d897-ba49-4fc1-808f-036fa040376e
+ true
+
+
\ No newline at end of file
diff --git a/TIAMWebApp/Client/Services/WizardProcessor.cs b/TIAMWebApp/Client/Services/WizardProcessor.cs
index 9fbaddc8..86581f8b 100644
--- a/TIAMWebApp/Client/Services/WizardProcessor.cs
+++ b/TIAMWebApp/Client/Services/WizardProcessor.cs
@@ -3,6 +3,7 @@ using TIAM.Entities.Emails;
//using TIAM.Entities.TransferDestinations;
using TIAMWebApp.Shared.Application.Interfaces;
using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels;
+using EmailMessage = TIAM.Entities.Emails.EmailMessage;
namespace TIAMWebApp.Client.Services
{
diff --git a/TIAMWebApp/Client/TIAMWebApp.Client.csproj.user b/TIAMWebApp/Client/TIAMWebApp.Client.csproj.user
index 983ecfc0..c60cdb27 100644
--- a/TIAMWebApp/Client/TIAMWebApp.Client.csproj.user
+++ b/TIAMWebApp/Client/TIAMWebApp.Client.csproj.user
@@ -1,7 +1,8 @@
- http
+ https
+ D:\REPOS\AYCODE\source\TourIAm\TIAMWebApp\Client\Properties\PublishProfiles\FolderProfile.pubxml
ProjectDebugger
diff --git a/TIAMWebApp/Server/Controllers/UserAPIController.cs b/TIAMWebApp/Server/Controllers/UserAPIController.cs
index c5d6eef2..85485997 100644
--- a/TIAMWebApp/Server/Controllers/UserAPIController.cs
+++ b/TIAMWebApp/Server/Controllers/UserAPIController.cs
@@ -115,7 +115,13 @@ namespace TIAMWebApp.Server.Controllers
if (!loggedInModel.IsLoggedIn)
{
_logger.Warning(@"User not valid! errorCode: " + loggedInModel.LoginErrorCode);
- return null;
+ //return null;
+ return new MainResponse
+ {
+ Content = loggedInModel.LoginErrorCode,
+ IsSuccess = false,
+ ErrorMessage = "Not valid login."
+ };
}
var response = new MainResponse
@@ -550,7 +556,7 @@ namespace TIAMWebApp.Server.Controllers
//send email
_logger.Info($"Created transfer, send emailMessage!!!");
- var message = new MessageSenderModel();
+ var message = new MessageSenderModel();
message.Message = new EmailMessage();
message.Message.EmailAddress = email;
message.Message.Id = Guid.NewGuid();
diff --git a/TIAMWebApp/Server/Program.cs b/TIAMWebApp/Server/Program.cs
index 804cf070..bf06f344 100644
--- a/TIAMWebApp/Server/Program.cs
+++ b/TIAMWebApp/Server/Program.cs
@@ -64,7 +64,8 @@ builder.Services.AddCors(options =>
{
options.AddPolicy(myAllowSpecificOrigins, policy =>
{
- policy.AllowAnyOrigin();
+ policy.WithOrigins("http://touriam.com",
+ "http://www.touriam.com");
});
});
diff --git a/TIAMWebApp/Server/TIAMWebApp.Server.csproj b/TIAMWebApp/Server/TIAMWebApp.Server.csproj
index 2fb8c354..1faa5af1 100644
--- a/TIAMWebApp/Server/TIAMWebApp.Server.csproj
+++ b/TIAMWebApp/Server/TIAMWebApp.Server.csproj
@@ -18,7 +18,7 @@
-
+
@@ -27,6 +27,7 @@
+
diff --git a/TIAMWebApp/Server/TIAMWebApp.Server.csproj.user b/TIAMWebApp/Server/TIAMWebApp.Server.csproj.user
index 9169adf7..7ba22969 100644
--- a/TIAMWebApp/Server/TIAMWebApp.Server.csproj.user
+++ b/TIAMWebApp/Server/TIAMWebApp.Server.csproj.user
@@ -2,7 +2,7 @@
https
- C:\REPOS\AYCODE\source\TourIAm\TIAMWebApp\Server\Properties\PublishProfiles\ReleaseDeployProfile.pubxml
+ D:\REPOS\AYCODE\source\TourIAm\TIAMWebApp\Server\Properties\PublishProfiles\ReleaseDeployProfile.pubxml
ProjectDebugger
diff --git a/TIAMWebApp/Server/appsettings.json b/TIAMWebApp/Server/appsettings.json
index 08c999a4..53fe55e4 100644
--- a/TIAMWebApp/Server/appsettings.json
+++ b/TIAMWebApp/Server/appsettings.json
@@ -1,6 +1,7 @@
{
"ConnectionStrings": {
- "DeveloperDbConnection": "Data Source=185.51.190.197;Initial Catalog=TIAM_DEV;Trusted_Connection=false;Encrypt=false;TrustServerCertificate=True;Connect Timeout=200;User ID=Anata_Development_Team;Password=v6f_?xNfg9N1;MultipleActiveResultSets=true"
+ //"DeveloperDbConnection": "Data Source=185.51.190.197;Initial Catalog=TIAM_DEV;Trusted_Connection=false;Encrypt=false;TrustServerCertificate=True;Connect Timeout=200;User ID=Anata_Development_Team;Password=v6f_?xNfg9N1;MultipleActiveResultSets=true"
+ "DeveloperDbConnection": "Data Source=194.164.235.47;Initial Catalog=TIAM_DEV;Trusted_Connection=false;Encrypt=false;TrustServerCertificate=True;Connect Timeout=200;User ID=Anata_Development_Team;Password=v6f_?xNfg9N1;MultipleActiveResultSets=true"
},
"Logging": {
"LogLevel": {
diff --git a/TIAMWebApp/Shared/Interfaces/IClientNoticeSenderService.cs b/TIAMWebApp/Shared/Interfaces/IClientNoticeSenderService.cs
index 6b60a393..f7445d2f 100644
--- a/TIAMWebApp/Shared/Interfaces/IClientNoticeSenderService.cs
+++ b/TIAMWebApp/Shared/Interfaces/IClientNoticeSenderService.cs
@@ -1,4 +1,5 @@
using TIAM.Entities.Emails;
+using EmailMessage = TIAM.Entities.Emails.EmailMessage;
namespace TIAMWebApp.Shared.Application.Interfaces
{
diff --git a/TIAMWebApp/Shared/Models/ClientSide/Setting.cs b/TIAMWebApp/Shared/Models/ClientSide/Setting.cs
index 83fdc1ff..d1efeaa0 100644
--- a/TIAMWebApp/Shared/Models/ClientSide/Setting.cs
+++ b/TIAMWebApp/Shared/Models/ClientSide/Setting.cs
@@ -8,10 +8,10 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide
//public static string BaseUrl = "https://touriam.mangoweb.hu";
//public static string ApiBaseUrl = "https://touriam.mangoweb.hu";
#if RELEASE
- public static string BaseUrl = "https://test.touriam.com";
- public static string ApiBaseUrl = "https://test.touriam.com";
- //public static string BaseUrl = "https://touriam.com";
- //public static string ApiBaseUrl = "https://touriam.com";
+ //public static string BaseUrl = "https://test.touriam.com";
+ //public static string ApiBaseUrl = "https://test.touriam.com";
+ public static string BaseUrl = "https://touriam.com";
+ public static string ApiBaseUrl = "https://touriam.com";
//public static string BaseUrl = "https://qa.touriam.com";
//public static string ApiBaseUrl = "https://qa.touriam.com";
#else
diff --git a/TIAMWebApp/Shared/Services/ClientNoticeSenderService.cs b/TIAMWebApp/Shared/Services/ClientNoticeSenderService.cs
index 09113980..fdbbe5c9 100644
--- a/TIAMWebApp/Shared/Services/ClientNoticeSenderService.cs
+++ b/TIAMWebApp/Shared/Services/ClientNoticeSenderService.cs
@@ -5,6 +5,7 @@ using System.Net.Http.Json;
//using AyCode.Models.Messages;
using TIAM.Entities.Emails;
using TIAMWebApp.Shared.Application.Models.ClientSide.Messages;
+using EmailMessage = TIAM.Entities.Emails.EmailMessage;
namespace TIAMWebApp.Shared.Application.Services
{
diff --git a/TIAMWebApp/Shared/Services/UserDataServiceClientBase.cs b/TIAMWebApp/Shared/Services/UserDataServiceClientBase.cs
index 715d576d..1a8384ba 100644
--- a/TIAMWebApp/Shared/Services/UserDataServiceClientBase.cs
+++ b/TIAMWebApp/Shared/Services/UserDataServiceClientBase.cs
@@ -80,8 +80,8 @@ public abstract class UserDataServiceClientBase : IUserDataService
public async Task AuthenticateUser(LoginModel loginModel)
{
Logger.Debug($"AuthenticateUser; email: {loginModel.Email}");
-
- return await AdminSignalRClient.PostDataAsync(SignalRTags.AuthenticateUser, loginModel);
+ var result = await AdminSignalRClient.PostDataAsync(SignalRTags.AuthenticateUser, loginModel);
+ return result;
//var result = string.Empty;
//var url = $"{Setting.ApiBaseUrl}/{APIUrls.AuthenticateUser}";