From 9f26f8f7200301f1de60cdac789cf770b78e4e1a Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 19 Jan 2024 17:09:31 +0100 Subject: [PATCH] Intermediate commit to pull changes from remote --- .../TransferDestination.cs | 3 +- TIAMMobileApp/TIAMMobileApp.csproj.user | 3 + .../Pages/Components/InputWizard.razor | 2 +- .../Pages/Components/InputWizard.razor.cs | 43 +++- TIAMSharedUI/Pages/Components/TestUserData.cs | 26 +-- TIAMSharedUI/Pages/Login.razor | 95 +++++--- TIAMSharedUI/Pages/Register.razor | 144 ++++++------ TIAMSharedUI/Pages/Settings.razor.cs | 8 +- TIAMSharedUI/Pages/Transfer.razor | 77 +++---- TIAMSharedUI/Pages/TransferFinal.razor | 2 +- TIAMSharedUI/Pages/Transfer_old.razor | 71 ++++++ TIAMSharedUI/Pages/Transfer_old.razor.css | 202 +++++++++++++++++ TIAMSharedUI/Pages/User/Admin.razor | 19 +- .../Pages/User/{ => Hotels}/HotelAdmin.razor | 2 +- .../User/{ => Hotels}/HotelAdmin.razor.cs | 0 .../User/{ => Hotels}/HotelComponent.razor | 0 .../User/{ => Hotels}/HotelComponent.razor.cs | 34 ++- .../Pages/User/SysAdmins/Products.razor | 104 +++++++++ .../Pages/User/SysAdmins/Products.razor.cs | 166 ++++++++++++++ .../Pages/User/SysAdmins/SysAdmin.razor | 206 ++++++++++++++++++ .../Pages/User/SysAdmins/SysAdmin.razor.cs | 12 + .../{ => SysAdmins}/SysAdminComponent.razor | 0 .../SysAdminComponent.razor.cs | 4 +- .../TransferDestinations.razor | 0 .../TransferDestinations.razor.cs | 2 +- .../TransferManagement.razor} | 0 TIAMSharedUI/Shared/SliderItemSelector.razor | 91 +++++++- TIAMSharedUI/Shared/Users/AdminNavMenu.razor | 2 +- TIAMSharedUI/TIAMSharedUI.csproj | 4 + TIAMSharedUI/wwwroot/css/TourIAm.css | 6 +- TIAMSharedUI/wwwroot/images/Untitled-2.psd | Bin 0 -> 3156135 bytes TIAMSharedUI/wwwroot/images/bg.jpg | Bin 1843471 -> 195445 bytes TIAMSharedUI/wwwroot/images/bg2.jpg | Bin 0 -> 188595 bytes TIAMSharedUI/wwwroot/images/bg3.jpg | Bin 0 -> 188537 bytes TIAMSharedUI/wwwroot/images/mapbg.jpg | Bin 0 -> 194071 bytes .../Client/Services/UserDataServiceWeb.cs | 2 - TIAMWebApp/Client/Services/WizardProcessor.cs | 4 + .../Controllers/AuctionAPIController.cs | 4 +- .../Server/Controllers/EmailAPIController.cs | 2 +- .../Controllers/GoogleAPIController .cs | 28 +-- .../PopulationStructureAPIController.cs | 2 +- .../ServiceProviderAPIController.cs | 16 +- .../Controllers/SupplierAPIController.cs | 2 +- .../Controllers/TransferDataAPIController.cs | 5 +- .../Server/Controllers/UserAPIController.cs | 4 +- .../UserPermissionAPIController.cs | 2 +- .../WeatherForecastAPIController.cs | 2 +- TIAMWebApp/Server/Program.cs | 3 +- .../Shared/Interfaces/ITransferDataService.cs | 3 +- TIAMWebApp/Shared/Models/APIUrls.cs | 103 ++++++--- .../UI/WizardModels/ProductWizardModel.cs | 49 +++++ .../UI/WizardModels/TransferWizardModel.cs | 15 +- .../Shared/Services/TransferDataService.cs | 30 ++- TIAMWebApp/Shared/Utility/ResourceKeys.cs | 4 + 54 files changed, 1306 insertions(+), 302 deletions(-) create mode 100644 TIAMSharedUI/Pages/Transfer_old.razor create mode 100644 TIAMSharedUI/Pages/Transfer_old.razor.css rename TIAMSharedUI/Pages/User/{ => Hotels}/HotelAdmin.razor (99%) rename TIAMSharedUI/Pages/User/{ => Hotels}/HotelAdmin.razor.cs (100%) rename TIAMSharedUI/Pages/User/{ => Hotels}/HotelComponent.razor (100%) rename TIAMSharedUI/Pages/User/{ => Hotels}/HotelComponent.razor.cs (82%) create mode 100644 TIAMSharedUI/Pages/User/SysAdmins/Products.razor create mode 100644 TIAMSharedUI/Pages/User/SysAdmins/Products.razor.cs create mode 100644 TIAMSharedUI/Pages/User/SysAdmins/SysAdmin.razor create mode 100644 TIAMSharedUI/Pages/User/SysAdmins/SysAdmin.razor.cs rename TIAMSharedUI/Pages/User/{ => SysAdmins}/SysAdminComponent.razor (100%) rename TIAMSharedUI/Pages/User/{ => SysAdmins}/SysAdminComponent.razor.cs (97%) rename TIAMSharedUI/Pages/User/{ => SysAdmins}/TransferDestinations.razor (100%) rename TIAMSharedUI/Pages/User/{ => SysAdmins}/TransferDestinations.razor.cs (99%) rename TIAMSharedUI/Pages/User/{MyTransfers.razor => SysAdmins/TransferManagement.razor} (100%) create mode 100644 TIAMSharedUI/wwwroot/images/Untitled-2.psd create mode 100644 TIAMSharedUI/wwwroot/images/bg2.jpg create mode 100644 TIAMSharedUI/wwwroot/images/bg3.jpg create mode 100644 TIAMSharedUI/wwwroot/images/mapbg.jpg create mode 100644 TIAMWebApp/Shared/Models/ClientSide/UI/WizardModels/ProductWizardModel.cs diff --git a/TIAM.Entities/TransferDestinations/TransferDestination.cs b/TIAM.Entities/TransferDestinations/TransferDestination.cs index adcb8f16..fd3e7fc9 100644 --- a/TIAM.Entities/TransferDestinations/TransferDestination.cs +++ b/TIAM.Entities/TransferDestinations/TransferDestination.cs @@ -17,8 +17,7 @@ namespace TIAM.Entities.TransferDestinations public Guid AddressId { get; set; } public virtual Address Address { get; set; } - - //[Required(ErrorMessage = "The Username value should be specified.")] + public string Name { get; set; } public string Description { get; set; } diff --git a/TIAMMobileApp/TIAMMobileApp.csproj.user b/TIAMMobileApp/TIAMMobileApp.csproj.user index 597a1517..528bd322 100644 --- a/TIAMMobileApp/TIAMMobileApp.csproj.user +++ b/TIAMMobileApp/TIAMMobileApp.csproj.user @@ -10,6 +10,9 @@ ProjectDebugger + + ProjectDebugger + Designer diff --git a/TIAMSharedUI/Pages/Components/InputWizard.razor b/TIAMSharedUI/Pages/Components/InputWizard.razor index ce89e1a1..1b36779c 100644 --- a/TIAMSharedUI/Pages/Components/InputWizard.razor +++ b/TIAMSharedUI/Pages/Components/InputWizard.razor @@ -4,7 +4,7 @@
-
+
(this, str => SetPhoneNumber(property, Data, str))); //editor.AddAttribute(j++, "TextChanged", EventCallback.Factory.Create(this, str => { property.SetValue(Data, str); })); - editor.AddAttribute(i++, "Template", (RenderFragment)((context) => ((regexProperties) => + /*editor.AddAttribute(i++, "Template", (RenderFragment)((context) => ((regexProperties) => { var l = 0; regexProperties.OpenComponent(l++); regexProperties.AddAttribute(l++, "Placeholder", "#"); regexProperties.AddAttribute(l++, "PlaceholdersVisible", false); regexProperties.CloseComponent(); - }))); + })));*/ editor.CloseComponent(); break; } @@ -235,7 +236,7 @@ namespace TIAMSharedUI.Pages.Components editor.AddAttribute(j++, "Mask", TIAMRegularExpressions.EmailMask); editor.AddAttribute(j++, "MaskMode", MaskMode.RegEx); - editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnLostFocus); + editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnInput); //MaskAutoCompleteMode="@((MaskAutoCompleteMode)AutoCompleteMode)" editor.AddAttribute(j++, "MaskAutoCompleteMode", MaskAutoCompleteMode.None); editor.AddAttribute(j++, "NullText", "example@example.com"); @@ -344,6 +345,8 @@ namespace TIAMSharedUI.Pages.Components editor.OpenComponent(j); editor.AddAttribute(j++, "OwlId", "owlSelector" + _stepID); + editor.AddAttribute(j++, "TextValue", property.GetValue(Data)); + //editor.AddAttribute(j++, "TExpression", lambda); editor.AddAttribute(j++, "OnSliderChanged", EventCallback.Factory.Create(this, result => { LogToBrowserConsole.LogToBC($"Slider changed to {result}"); @@ -356,6 +359,7 @@ namespace TIAMSharedUI.Pages.Components editor.OpenComponent(j++); editor.AddAttribute(j++, "CssClass", "form-field"); editor.AddAttribute(j++, "NullText", "Slide or type"); + editor.AddAttribute(j++, "Enabled", false); editor.AddAttribute(j++, "Text", property.GetValue(Data)); editor.AddAttribute(j++, "TextExpression", lambda); editor.AddAttribute(j++, "TextChanged", EventCallback.Factory.Create(this, str => { @@ -472,4 +476,33 @@ namespace TIAMSharedUI.Pages.Components property.SetValue(Data, str); } } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)] + public class MinPasswordLengthAttribute : ValidationAttribute + { + int MinLength { get; } + public MinPasswordLengthAttribute(int minLength, string errorMsg) : base(errorMsg) + { + MinLength = minLength; + } + + public override bool IsValid(object value) + { + return ((string)value).Length >= MinLength; + } + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)] + public class EmailAttribute : ValidationAttribute + { + public override bool IsValid(object value) + { + return Regex.IsMatch((string)value, @"^[\w!#$%&'*+\-/=?\^_`{|}~]+(\.[\w!#$%&'*+\-/=?\^_`{|}~]+)*" + + "@" + + @"((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$"); + } + } + + + } diff --git a/TIAMSharedUI/Pages/Components/TestUserData.cs b/TIAMSharedUI/Pages/Components/TestUserData.cs index 65ad41ca..00724568 100644 --- a/TIAMSharedUI/Pages/Components/TestUserData.cs +++ b/TIAMSharedUI/Pages/Components/TestUserData.cs @@ -78,29 +78,5 @@ namespace TIAMSharedUI.Pages.Components }; } - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)] - public class MinPasswordLengthAttribute : ValidationAttribute - { - int MinLength { get; } - public MinPasswordLengthAttribute(int minLength, string errorMsg) : base(errorMsg) - { - MinLength = minLength; - } - - public override bool IsValid(object value) - { - return ((string)value).Length >= MinLength; - } - } - - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)] - public class EmailAttribute : ValidationAttribute - { - public override bool IsValid(object value) - { - return Regex.IsMatch((string)value, @"^[\w!#$%&'*+\-/=?\^_`{|}~]+(\.[\w!#$%&'*+\-/=?\^_`{|}~]+)*" - + "@" - + @"((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$"); - } - } + } diff --git a/TIAMSharedUI/Pages/Login.razor b/TIAMSharedUI/Pages/Login.razor index 637ac896..e269bb44 100644 --- a/TIAMSharedUI/Pages/Login.razor +++ b/TIAMSharedUI/Pages/Login.razor @@ -1,6 +1,7 @@ @page "/login" @using System.IdentityModel.Tokens.Jwt; @using System.Security.Claims; +@using BlazorAnimation @using Newtonsoft.Json.Linq; @using System.Text.Json; @using System.Reflection; @@ -15,51 +16,77 @@ Login -
-