bleg
This commit is contained in:
parent
52572bd4b5
commit
7578ac8010
|
|
@ -4,6 +4,8 @@ using TIAMWebApp.Shared.Application.Interfaces;
|
|||
using DevExpress.Blazor;
|
||||
using System.Resources;
|
||||
using AyCode.Interfaces.StorageHandlers;
|
||||
using TIAMWebApp.Shared.Application.Utility;
|
||||
using TIAMWebApp.Shared.Application.Services;
|
||||
|
||||
namespace TIAMMobileApp
|
||||
{
|
||||
|
|
@ -43,12 +45,14 @@ namespace TIAMMobileApp
|
|||
|
||||
builder.Services.AddScoped<IWeatherForecastService, WeatherForecastService>();
|
||||
builder.Services.AddScoped<ITransferDataService, TransferDataService>();
|
||||
builder.Services.AddScoped<LogToBrowserConsole>();
|
||||
builder.Services.AddScoped<IPopulationStructureDataProvider, PopulationStructureDataProvider>();
|
||||
builder.Services.AddScoped<ISupplierService, SupplierService>();
|
||||
builder.Services.AddScoped<IUserDataService, UserDataServiceMobile>();
|
||||
builder.Services.AddScoped<ISecureStorageHandler, SecureStorageHandler>();
|
||||
builder.Services.AddScoped<ISessionService, SessionServiceMobile>();
|
||||
builder.Services.AddSingleton<IComponentUpdateService, ComponentUpdateServiceMobile>();
|
||||
builder.Services.AddScoped<IServiceProviderDataService, ServiceProviderDataService>();
|
||||
builder.Services.AddScoped<IWizardProcessor, WizardProcessor>();
|
||||
builder.Services.AddSingleton(x => new ResourceManager("TIAMWebApp.Shared.Application.Resources", typeof(Main).Assembly));
|
||||
return builder.Build();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<link href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.css" rel="stylesheet" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
|
||||
<link href="_content/DevExpress.Blazor.Themes/blazing-dark.bs5.min.css" asp-append-version="true" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Themes/blazing-berry.bs5.min.css" asp-append-version="true" rel="stylesheet" />
|
||||
<link href="_content/TIAMSharedUI/css/app.css" rel="stylesheet" />
|
||||
<link href="TIAMMobileApp.styles.css" rel="stylesheet" />
|
||||
<link href="_content/TIAMSharedUI/css/TourIAm.css" rel="stylesheet" />
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@
|
|||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>TIAMResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="TransferDestinationWizard.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>TransferDestinationWizard.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -23,6 +28,11 @@
|
|||
<LastGenOutput>TIAMResources.Designer.cs</LastGenOutput>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="TransferDestinationWizard.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>TransferDestinationWizard.Designer.cs</LastGenOutput>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -60,6 +60,105 @@ namespace TIAM.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancel.
|
||||
/// </summary>
|
||||
public static string ButtonCancel {
|
||||
get {
|
||||
return ResourceManager.GetString("ButtonCancel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delete.
|
||||
/// </summary>
|
||||
public static string ButtonDelete {
|
||||
get {
|
||||
return ResourceManager.GetString("ButtonDelete", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Edit.
|
||||
/// </summary>
|
||||
public static string ButtonEdit {
|
||||
get {
|
||||
return ResourceManager.GetString("ButtonEdit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Finish.
|
||||
/// </summary>
|
||||
public static string ButtonFinish {
|
||||
get {
|
||||
return ResourceManager.GetString("ButtonFinish", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Next.
|
||||
/// </summary>
|
||||
public static string ButtonNext {
|
||||
get {
|
||||
return ResourceManager.GetString("ButtonNext", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Previous.
|
||||
/// </summary>
|
||||
public static string ButtonPrevious {
|
||||
get {
|
||||
return ResourceManager.GetString("ButtonPrevious", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save.
|
||||
/// </summary>
|
||||
public static string ButtonSave {
|
||||
get {
|
||||
return ResourceManager.GetString("ButtonSave", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirm Email.
|
||||
/// </summary>
|
||||
public static string ConfirmEmail {
|
||||
get {
|
||||
return ResourceManager.GetString("ConfirmEmail", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirm Password.
|
||||
/// </summary>
|
||||
public static string ConfirmPassword {
|
||||
get {
|
||||
return ResourceManager.GetString("ConfirmPassword", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirm password reset.
|
||||
/// </summary>
|
||||
public static string ConfirmPasswordReset {
|
||||
get {
|
||||
return ResourceManager.GetString("ConfirmPasswordReset", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Destination.
|
||||
/// </summary>
|
||||
public static string Destination {
|
||||
get {
|
||||
return ResourceManager.GetString("Destination", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Address.
|
||||
/// </summary>
|
||||
|
|
@ -78,6 +177,24 @@ namespace TIAM.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Destination latitude.
|
||||
/// </summary>
|
||||
public static string DestinationLatitude {
|
||||
get {
|
||||
return ResourceManager.GetString("DestinationLatitude", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Destination longitude.
|
||||
/// </summary>
|
||||
public static string DestinationLongitude {
|
||||
get {
|
||||
return ResourceManager.GetString("DestinationLongitude", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Name of destination.
|
||||
/// </summary>
|
||||
|
|
@ -87,6 +204,159 @@ namespace TIAM.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Driver.
|
||||
/// </summary>
|
||||
public static string Driver {
|
||||
get {
|
||||
return ResourceManager.GetString("Driver", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Email.
|
||||
/// </summary>
|
||||
public static string EmailAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("EmailAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Forgot password?.
|
||||
/// </summary>
|
||||
public static string ForgotPassword {
|
||||
get {
|
||||
return ResourceManager.GetString("ForgotPassword", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Full name.
|
||||
/// </summary>
|
||||
public static string FullName {
|
||||
get {
|
||||
return ResourceManager.GetString("FullName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Login.
|
||||
/// </summary>
|
||||
public static string Login {
|
||||
get {
|
||||
return ResourceManager.GetString("Login", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Passengers.
|
||||
/// </summary>
|
||||
public static string NumberOfPassengers {
|
||||
get {
|
||||
return ResourceManager.GetString("NumberOfPassengers", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Password.
|
||||
/// </summary>
|
||||
public static string Password {
|
||||
get {
|
||||
return ResourceManager.GetString("Password", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Phone number.
|
||||
/// </summary>
|
||||
public static string PhoneNumber {
|
||||
get {
|
||||
return ResourceManager.GetString("PhoneNumber", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pick up address.
|
||||
/// </summary>
|
||||
public static string PickupAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("PickupAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pick up time.
|
||||
/// </summary>
|
||||
public static string PickupTime {
|
||||
get {
|
||||
return ResourceManager.GetString("PickupTime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Price.
|
||||
/// </summary>
|
||||
public static string Price {
|
||||
get {
|
||||
return ResourceManager.GetString("Price", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Register.
|
||||
/// </summary>
|
||||
public static string Register {
|
||||
get {
|
||||
return ResourceManager.GetString("Register", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remember me!.
|
||||
/// </summary>
|
||||
public static string RememberMe {
|
||||
get {
|
||||
return ResourceManager.GetString("RememberMe", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Reset password.
|
||||
/// </summary>
|
||||
public static string ResetPassword {
|
||||
get {
|
||||
return ResourceManager.GetString("ResetPassword", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Service provider name.
|
||||
/// </summary>
|
||||
public static string ServiceProviderName {
|
||||
get {
|
||||
return ResourceManager.GetString("ServiceProviderName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Owner of the Service provider.
|
||||
/// </summary>
|
||||
public static string ServiceProviderOwnerId {
|
||||
get {
|
||||
return ResourceManager.GetString("ServiceProviderOwnerId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New Service provider.
|
||||
/// </summary>
|
||||
public static string ServiceProviderTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("ServiceProviderTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This works!.
|
||||
/// </summary>
|
||||
|
|
@ -96,6 +366,24 @@ namespace TIAM.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New destination.
|
||||
/// </summary>
|
||||
public static string TransferDestinationTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("TransferDestinationTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New Transfer.
|
||||
/// </summary>
|
||||
public static string TransferTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("TransferTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Wizard.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -117,18 +117,114 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ButtonCancel" xml:space="preserve">
|
||||
<value>Mégse</value>
|
||||
</data>
|
||||
<data name="ButtonDelete" xml:space="preserve">
|
||||
<value>Törlés</value>
|
||||
</data>
|
||||
<data name="ButtonEdit" xml:space="preserve">
|
||||
<value>Szerkesztés</value>
|
||||
</data>
|
||||
<data name="ButtonFinish" xml:space="preserve">
|
||||
<value>Befejezés</value>
|
||||
</data>
|
||||
<data name="ButtonNext" xml:space="preserve">
|
||||
<value>Tovább</value>
|
||||
</data>
|
||||
<data name="ButtonPrevious" xml:space="preserve">
|
||||
<value>Vissza</value>
|
||||
</data>
|
||||
<data name="ButtonSave" xml:space="preserve">
|
||||
<value>Mentés</value>
|
||||
</data>
|
||||
<data name="ConfirmEmail" xml:space="preserve">
|
||||
<value>E-mail cím megerősítése</value>
|
||||
</data>
|
||||
<data name="ConfirmPassword" xml:space="preserve">
|
||||
<value>Jelszó ismét</value>
|
||||
</data>
|
||||
<data name="ConfirmPasswordReset" xml:space="preserve">
|
||||
<value>Jelszó módosítás megerősítése</value>
|
||||
</data>
|
||||
<data name="Destination" xml:space="preserve">
|
||||
<value>Uticél</value>
|
||||
</data>
|
||||
<data name="DestinationAddress" xml:space="preserve">
|
||||
<value>Cím</value>
|
||||
</data>
|
||||
<data name="DestinationInfo" xml:space="preserve">
|
||||
<value>Több információ az uticélról</value>
|
||||
</data>
|
||||
<data name="DestinationLatitude" xml:space="preserve">
|
||||
<value>Uticél szélességi fok</value>
|
||||
</data>
|
||||
<data name="DestinationLongitude" xml:space="preserve">
|
||||
<value>Uticél hosszúsági fok</value>
|
||||
</data>
|
||||
<data name="DestinationName" xml:space="preserve">
|
||||
<value>Uticél neve</value>
|
||||
</data>
|
||||
<data name="Driver" xml:space="preserve">
|
||||
<value>Sofőr</value>
|
||||
</data>
|
||||
<data name="EmailAddress" xml:space="preserve">
|
||||
<value>E-mail</value>
|
||||
</data>
|
||||
<data name="ForgotPassword" xml:space="preserve">
|
||||
<value>Elfelejtett jelszó</value>
|
||||
</data>
|
||||
<data name="FullName" xml:space="preserve">
|
||||
<value>Teljes név</value>
|
||||
</data>
|
||||
<data name="Login" xml:space="preserve">
|
||||
<value>Belépés</value>
|
||||
</data>
|
||||
<data name="NumberOfPassengers" xml:space="preserve">
|
||||
<value>Utasok száma</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>Jelszó</value>
|
||||
</data>
|
||||
<data name="PhoneNumber" xml:space="preserve">
|
||||
<value>Telefonszám</value>
|
||||
</data>
|
||||
<data name="PickupAddress" xml:space="preserve">
|
||||
<value>Indulási cím</value>
|
||||
</data>
|
||||
<data name="PickupTime" xml:space="preserve">
|
||||
<value>Indulási idő</value>
|
||||
</data>
|
||||
<data name="Price" xml:space="preserve">
|
||||
<value>Ár</value>
|
||||
</data>
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Regisztráció</value>
|
||||
</data>
|
||||
<data name="RememberMe" xml:space="preserve">
|
||||
<value>Emlékezz rám!</value>
|
||||
</data>
|
||||
<data name="ResetPassword" xml:space="preserve">
|
||||
<value>Jelszó módosítás</value>
|
||||
</data>
|
||||
<data name="ServiceProviderName" xml:space="preserve">
|
||||
<value>Szolgáltató neve</value>
|
||||
</data>
|
||||
<data name="ServiceProviderOwnerId" xml:space="preserve">
|
||||
<value>Szolgáltató tulajdonosa</value>
|
||||
</data>
|
||||
<data name="ServiceProviderTitle" xml:space="preserve">
|
||||
<value>Új szolgáltató</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>Müxik!</value>
|
||||
</data>
|
||||
<data name="TransferDestinationTitle" xml:space="preserve">
|
||||
<value>Új uticél</value>
|
||||
</data>
|
||||
<data name="TransferTitle" xml:space="preserve">
|
||||
<value>Új transzfer</value>
|
||||
</data>
|
||||
<data name="Wizard" xml:space="preserve">
|
||||
<value>Varázsló</value>
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -117,18 +117,114 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ButtonCancel" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="ButtonDelete" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="ButtonEdit" xml:space="preserve">
|
||||
<value>Edit</value>
|
||||
</data>
|
||||
<data name="ButtonFinish" xml:space="preserve">
|
||||
<value>Finish</value>
|
||||
</data>
|
||||
<data name="ButtonNext" xml:space="preserve">
|
||||
<value>Next</value>
|
||||
</data>
|
||||
<data name="ButtonPrevious" xml:space="preserve">
|
||||
<value>Previous</value>
|
||||
</data>
|
||||
<data name="ButtonSave" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
</data>
|
||||
<data name="ConfirmEmail" xml:space="preserve">
|
||||
<value>Confirm Email</value>
|
||||
</data>
|
||||
<data name="ConfirmPassword" xml:space="preserve">
|
||||
<value>Confirm Password</value>
|
||||
</data>
|
||||
<data name="ConfirmPasswordReset" xml:space="preserve">
|
||||
<value>Confirm password reset</value>
|
||||
</data>
|
||||
<data name="Destination" xml:space="preserve">
|
||||
<value>Destination</value>
|
||||
</data>
|
||||
<data name="DestinationAddress" xml:space="preserve">
|
||||
<value>Address</value>
|
||||
</data>
|
||||
<data name="DestinationInfo" xml:space="preserve">
|
||||
<value>Details about the destination</value>
|
||||
</data>
|
||||
<data name="DestinationLatitude" xml:space="preserve">
|
||||
<value>Destination latitude</value>
|
||||
</data>
|
||||
<data name="DestinationLongitude" xml:space="preserve">
|
||||
<value>Destination longitude</value>
|
||||
</data>
|
||||
<data name="DestinationName" xml:space="preserve">
|
||||
<value>Name of destination</value>
|
||||
</data>
|
||||
<data name="Driver" xml:space="preserve">
|
||||
<value>Driver</value>
|
||||
</data>
|
||||
<data name="EmailAddress" xml:space="preserve">
|
||||
<value>Email</value>
|
||||
</data>
|
||||
<data name="ForgotPassword" xml:space="preserve">
|
||||
<value>Forgot password?</value>
|
||||
</data>
|
||||
<data name="FullName" xml:space="preserve">
|
||||
<value>Full name</value>
|
||||
</data>
|
||||
<data name="Login" xml:space="preserve">
|
||||
<value>Login</value>
|
||||
</data>
|
||||
<data name="NumberOfPassengers" xml:space="preserve">
|
||||
<value>Passengers</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name="PhoneNumber" xml:space="preserve">
|
||||
<value>Phone number</value>
|
||||
</data>
|
||||
<data name="PickupAddress" xml:space="preserve">
|
||||
<value>Pick up address</value>
|
||||
</data>
|
||||
<data name="PickupTime" xml:space="preserve">
|
||||
<value>Pick up time</value>
|
||||
</data>
|
||||
<data name="Price" xml:space="preserve">
|
||||
<value>Price</value>
|
||||
</data>
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Register</value>
|
||||
</data>
|
||||
<data name="RememberMe" xml:space="preserve">
|
||||
<value>Remember me!</value>
|
||||
</data>
|
||||
<data name="ResetPassword" xml:space="preserve">
|
||||
<value>Reset password</value>
|
||||
</data>
|
||||
<data name="ServiceProviderName" xml:space="preserve">
|
||||
<value>Service provider name</value>
|
||||
</data>
|
||||
<data name="ServiceProviderOwnerId" xml:space="preserve">
|
||||
<value>Owner of the Service provider</value>
|
||||
</data>
|
||||
<data name="ServiceProviderTitle" xml:space="preserve">
|
||||
<value>New Service provider</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>This works!</value>
|
||||
</data>
|
||||
<data name="TransferDestinationTitle" xml:space="preserve">
|
||||
<value>New destination</value>
|
||||
</data>
|
||||
<data name="TransferTitle" xml:space="preserve">
|
||||
<value>New Transfer</value>
|
||||
</data>
|
||||
<data name="Wizard" xml:space="preserve">
|
||||
<value>Wizard</value>
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TIAM.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class TransferDestinationWizard {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal TransferDestinationWizard() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TIAM.Resources.TransferDestinationWizard", typeof(TransferDestinationWizard).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fill in the details!.
|
||||
/// </summary>
|
||||
public static string Subtitle {
|
||||
get {
|
||||
return ResourceManager.GetString("Subtitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New TransferDestination.
|
||||
/// </summary>
|
||||
public static string Title {
|
||||
get {
|
||||
return ResourceManager.GetString("Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Subtitle" xml:space="preserve">
|
||||
<value>Töltsd ki a részleteket!</value>
|
||||
</data>
|
||||
<data name="Title" xml:space="preserve">
|
||||
<value>Új transzfer desztináció</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Subtitle" xml:space="preserve">
|
||||
<value>Fill in the details!</value>
|
||||
</data>
|
||||
<data name="Title" xml:space="preserve">
|
||||
<value>New TransferDestination</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -4,26 +4,26 @@
|
|||
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="card cw-480">
|
||||
<div class="">
|
||||
<EditForm Model="@Data"
|
||||
OnValidSubmit="@HandleValidSubmit"
|
||||
OnInvalidSubmit="@HandleInvalidSubmit"
|
||||
Context="EditFormContext">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="card-header text-center py-3">
|
||||
<div class="text-center py-3">
|
||||
<h4>@localizer.GetString(TitleResourceString)</h4>
|
||||
<p class="tm-8 mb-0 fw-normal fs-825">
|
||||
Sibtitle here
|
||||
@localizer.GetString(SubtitleResourceString)
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div>
|
||||
@CreateEditFormFields()
|
||||
</div>
|
||||
</EditForm>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<p class="tm-8 cw-480 mt-2">
|
||||
<p class="mt-2 cw-480">
|
||||
<h3> @localizer.GetString("DestinationName")</h3>
|
||||
@_formSubmitResult
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ using DevExpress.Pdf.Native.BouncyCastle.Asn1.X509.Qualified;
|
|||
using Microsoft.Extensions.Localization;
|
||||
using TIAM.Resources;
|
||||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using System.Reflection;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
using DevExpress.XtraPrinting;
|
||||
|
||||
|
||||
namespace TIAMSharedUI.Pages.Components
|
||||
|
|
@ -24,9 +27,6 @@ namespace TIAMSharedUI.Pages.Components
|
|||
[Inject]
|
||||
IStringLocalizer<TIAMResources> localizer { get; set; }
|
||||
|
||||
[Inject]
|
||||
public IWizardProcessor WizardProcessor { get; set; }
|
||||
|
||||
public Dictionary<int, Guid> FormSteps { get; set; } = new Dictionary<int, Guid>();
|
||||
public int CurrentStep { get; set; } = 0;
|
||||
|
||||
|
|
@ -34,6 +34,7 @@ namespace TIAMSharedUI.Pages.Components
|
|||
|
||||
[Parameter]
|
||||
public string TitleResourceString { get; set; } = "Wizard";
|
||||
public string SubtitleResourceString { get; set; } = "Let's fill in this form";
|
||||
|
||||
[Parameter]
|
||||
public object Data { get; set; } = new object();
|
||||
|
|
@ -41,6 +42,9 @@ namespace TIAMSharedUI.Pages.Components
|
|||
[Parameter]
|
||||
public EventCallback<object> OnSubmit { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string SubmitButtonText { get; set; } = "Submit";
|
||||
|
||||
|
||||
|
||||
string _formSubmitResult = "";
|
||||
|
|
@ -50,8 +54,21 @@ namespace TIAMSharedUI.Pages.Components
|
|||
{
|
||||
_spinnerClass = "spinner-border spinner-border-sm";
|
||||
await Task.Delay(500);
|
||||
await WizardProcessor.ProcessWizardAsync(Data.GetType(), Data);
|
||||
_formSubmitResult = "You have been registred successully.";
|
||||
|
||||
string debugString = "Success: ";
|
||||
|
||||
Type myType = Data.GetType();
|
||||
IList<PropertyInfo> props = new List<PropertyInfo>(myType.GetProperties());
|
||||
|
||||
foreach (PropertyInfo prop in props)
|
||||
{
|
||||
object propValue = prop.GetValue(Data, null);
|
||||
|
||||
// Do something with propValue
|
||||
debugString += $"{prop.Name} = {propValue}\n";
|
||||
}
|
||||
|
||||
_formSubmitResult = debugString;
|
||||
_spinnerClass = "";
|
||||
|
||||
await OnSubmit.InvokeAsync(Data);
|
||||
|
|
@ -90,12 +107,13 @@ namespace TIAMSharedUI.Pages.Components
|
|||
int j = 0;
|
||||
foreach (var property in propertyList)
|
||||
{
|
||||
|
||||
bool isActive = j == CurrentStep;
|
||||
//if (property.Name == "Id" || property.Name == "Latitude" || property.Name == "Longitude" || property.Name == "Created" || property.Name == "Modified")
|
||||
//if (property.Name == "Id" || property.Name == "Created" || property.Name == "Modified")
|
||||
//{
|
||||
// continue;
|
||||
//}
|
||||
if (property.Name == "Id" || property.Name == "Price" || property.Name == "Created" || property.Name == "Modified")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Guid _stepID = Guid.Empty;
|
||||
|
||||
|
|
@ -109,7 +127,9 @@ namespace TIAMSharedUI.Pages.Components
|
|||
_stepID = FormSteps[j];
|
||||
}
|
||||
|
||||
//the following line creates an expression that accesses the property value by name
|
||||
var access = Expression.Property(Expression.Constant(Data), property.Name);
|
||||
//the following line creates a lambda expression that returns the value of the property
|
||||
var lambda = Expression.Lambda(typeof(Func<>).MakeGenericType(property.PropertyType), access);
|
||||
|
||||
LogToBrowserConsole.LogToBC(lambda.ToString());
|
||||
|
|
@ -119,18 +139,27 @@ namespace TIAMSharedUI.Pages.Components
|
|||
layoutItemBuilder.AddAttribute(i++, "class", "disply-flex align-items-center ");
|
||||
layoutItemBuilder.AddAttribute(i++, "style", "width: 100%;");
|
||||
if (j != CurrentStep)
|
||||
{
|
||||
layoutItemBuilder.AddAttribute(i++, "hidden", "true");
|
||||
}
|
||||
else
|
||||
{
|
||||
//this input should be focused, so we set a flag
|
||||
LogToBrowserConsole.LogToBC($"Setting focus to {property.Name}");
|
||||
|
||||
}
|
||||
|
||||
DataTypeAttribute attrList = (DataTypeAttribute)property.GetCustomAttributes(typeof(DataTypeAttribute), false).First();
|
||||
DisplayAttribute displayLabel = (DisplayAttribute)property.GetCustomAttributes(typeof(DisplayAttribute), false).First();
|
||||
layoutItemBuilder.OpenComponent<DxFormLayoutItem>(i++); //open dxformlayoutitem
|
||||
layoutItemBuilder.AddAttribute(i++, "Caption", displayLabel.Name);
|
||||
layoutItemBuilder.AddAttribute(i++, "Caption", localizer.GetString(displayLabel.Name));
|
||||
layoutItemBuilder.AddAttribute(i++, "ColSpanMd", 12);
|
||||
//layoutItemBuilder.AddAttribute(i++, "CssClass", "form-field");
|
||||
layoutItemBuilder.AddAttribute(i++, "CaptionPosition", CaptionPosition.Vertical);
|
||||
//layoutItemBuilder.AddAttribute(i++, "CssClass", "flex-direction: column;");
|
||||
|
||||
layoutItemBuilder.AddAttribute(i++, "Template", (RenderFragment<object>)((context) => ((editor) =>
|
||||
{
|
||||
var j = 0;
|
||||
j = 0;
|
||||
switch (attrList.DataType)
|
||||
{
|
||||
|
||||
|
|
@ -141,8 +170,14 @@ namespace TIAMSharedUI.Pages.Components
|
|||
editor.AddAttribute(j++, "Text", property.GetValue(Data));
|
||||
editor.AddAttribute(j++, "TextExpression", lambda);
|
||||
editor.AddAttribute(j++, "CssClass", "form-field");
|
||||
|
||||
if(isActive)
|
||||
{
|
||||
editor.AddAttribute(j++, "Id", "ActiveInput");
|
||||
}
|
||||
editor.AddAttribute(j++, "TextChanged", EventCallback.Factory.Create<string>(this, str => { property.SetValue(Data, str); }));
|
||||
editor.CloseComponent();
|
||||
|
||||
break;
|
||||
}
|
||||
case DataType.Password:
|
||||
|
|
@ -162,6 +197,30 @@ namespace TIAMSharedUI.Pages.Components
|
|||
editor.OpenComponent<DxMaskedInput<string>>(j++);
|
||||
editor.AddAttribute(j++, "Value", property.GetValue(Data));
|
||||
editor.AddAttribute(j++, "Mask", TIAMRegularExpressions.PhoneNumberMask);
|
||||
editor.AddAttribute(j++, "MaskMode", MaskMode.RegEx);
|
||||
editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnInput);
|
||||
editor.AddAttribute(j++, "ValueExpression", lambda);
|
||||
editor.AddAttribute(j++, "NullText", "+11234567890");
|
||||
editor.AddAttribute(j++, "TextChanged", EventCallback.Factory.Create<string>(this, str => SetPhoneNumber(property, Data, str)));
|
||||
//editor.AddAttribute(j++, "TextChanged", EventCallback.Factory.Create<string>(this, str => { property.SetValue(Data, str); }));
|
||||
editor.AddAttribute(i++, "Template", (RenderFragment<object>)((context) => ((editor2) =>
|
||||
{
|
||||
editor2.OpenComponent<DxRegExMaskProperties>(j++);
|
||||
editor2.AddAttribute(j++, "PlaceholdersVisible", false);
|
||||
editor2.CloseComponent();
|
||||
})));
|
||||
editor.CloseComponent();
|
||||
break;
|
||||
}
|
||||
case DataType.EmailAddress:
|
||||
{
|
||||
editor.OpenComponent<DxMaskedInput<string>>(j++);
|
||||
editor.AddAttribute(j++, "Value", property.GetValue(Data));
|
||||
editor.AddAttribute(j++, "Mask", TIAMRegularExpressions.EmailMask);
|
||||
editor.AddAttribute(j++, "MaskMode", MaskMode.RegEx);
|
||||
editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnInput);
|
||||
//MaskAutoCompleteMode="@((MaskAutoCompleteMode)AutoCompleteMode)"
|
||||
editor.AddAttribute(j++, "MaskAutoCompleteMode", MaskAutoCompleteMode.Strong);
|
||||
editor.AddAttribute(j++, "ValueExpression", lambda);
|
||||
editor.AddAttribute(j++, "ValueChanged", EventCallback.Factory.Create<string>(this, str => { property.SetValue(Data, str); }));
|
||||
editor.CloseComponent();
|
||||
|
|
@ -187,6 +246,7 @@ namespace TIAMSharedUI.Pages.Components
|
|||
editor.AddAttribute(j++, "Value", property.GetValue(Data));
|
||||
|
||||
editor.AddAttribute(j++, "Mask", "n6");
|
||||
editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnInput);
|
||||
editor.AddAttribute(j++, "ValueExpression", lambda);
|
||||
editor.AddAttribute(j++, "CssClass", "form-field");
|
||||
editor.AddAttribute(j++, "ValueChanged", EventCallback.Factory.Create<double>(this, str => { property.SetValue(Data, str); }));
|
||||
|
|
@ -199,15 +259,15 @@ namespace TIAMSharedUI.Pages.Components
|
|||
editor.OpenComponent<DxMaskedInput<int>>(j);
|
||||
|
||||
editor.AddAttribute(j++, "Value", property.GetValue(Data));
|
||||
|
||||
editor.AddAttribute(j++, "Mask", "n0");
|
||||
editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnInput);
|
||||
editor.AddAttribute(j++, "Mask", NumericMask.WholeNumber);
|
||||
editor.AddAttribute(j++, "ValueExpression", lambda);
|
||||
editor.AddAttribute(j++, "CssClass", "form-field");
|
||||
editor.AddAttribute(j++, "ValueChanged", EventCallback.Factory.Create<int>(this, str => { property.SetValue(Data, str); }));
|
||||
editor.CloseComponent();
|
||||
break;
|
||||
}
|
||||
else if (property.PropertyType == typeof(string) && property.Name == "Occupation")
|
||||
else if (property.PropertyType == typeof(IEnumerable<string>) && property.Name == "Occupation")
|
||||
{
|
||||
|
||||
editor.OpenComponent<DxComboBox<string, string>>(j);
|
||||
|
|
@ -218,9 +278,38 @@ namespace TIAMSharedUI.Pages.Components
|
|||
editor.CloseComponent();
|
||||
break;
|
||||
}
|
||||
else if (property.PropertyType == typeof(DriverModel) && property.Name == "Driver")
|
||||
{
|
||||
//load possible drivers for this serviceprovider
|
||||
|
||||
//DriverModel driver = (DriverModel)property.GetValue(Data);
|
||||
IEnumerable<DriverModel> drivers = new DriverModel[] {
|
||||
new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "John Doe"),
|
||||
new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "Jane Doe"),
|
||||
new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "James Doe")
|
||||
};
|
||||
|
||||
var defaultDriver = drivers.FirstOrDefault();
|
||||
|
||||
//editor.OpenElement(j++, "p");
|
||||
//editor.AddContent(j++, localizer.GetString("Driver"));
|
||||
//editor.CloseElement();
|
||||
editor.OpenComponent<DxComboBox<DriverModel, DriverModel>>(j);
|
||||
editor.AddAttribute(j++, "Data", drivers);
|
||||
editor.AddAttribute(j++, "TextFieldName", nameof (defaultDriver.Name));
|
||||
editor.AddAttribute(j++, "Value", drivers.FirstOrDefault());
|
||||
//editor.AddAttribute(j++, "Text", defaultDriver);
|
||||
editor.AddAttribute(j++, "CssClass", "form-field");
|
||||
//editor.AddAttribute(j++, "TextExpression", lambda);
|
||||
editor.AddAttribute(j++, "ValueExpression", lambda);
|
||||
editor.AddAttribute(j++, "ValueChanged", EventCallback.Factory.Create<DriverModel>(this, str => { property.SetValue(Data, str); }));
|
||||
editor.CloseComponent();
|
||||
break;
|
||||
}
|
||||
else if (property.PropertyType == typeof(TransferDestination))
|
||||
{
|
||||
|
||||
editor.OpenComponent<ChooseDestination>(j);
|
||||
editor.CloseComponent();
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -249,7 +338,7 @@ namespace TIAMSharedUI.Pages.Components
|
|||
layoutItemBuilder.AddAttribute(i++, "Click", EventCallback.Factory.Create<MouseEventArgs>(this, OnNext));
|
||||
layoutItemBuilder.AddAttribute(i++, "SubmitFormOnClick", false);
|
||||
layoutItemBuilder.AddAttribute(i++, "CssClass", "btn btn-primary mt-3");
|
||||
layoutItemBuilder.AddAttribute(i++, "Text", "Next");
|
||||
layoutItemBuilder.AddAttribute(i++, "Text", localizer.GetString(ResourceKeys.ButtonNext));
|
||||
layoutItemBuilder.CloseComponent();
|
||||
}
|
||||
if (j > 0)
|
||||
|
|
@ -258,7 +347,7 @@ namespace TIAMSharedUI.Pages.Components
|
|||
layoutItemBuilder.AddAttribute(i++, "Click", EventCallback.Factory.Create<MouseEventArgs>(this, OnPrevious));
|
||||
layoutItemBuilder.AddAttribute(i++, "SubmitFormOnClick", false);
|
||||
layoutItemBuilder.AddAttribute(i++, "CssClass", "btn btn-secondary mt-3");
|
||||
layoutItemBuilder.AddAttribute(i++, "Text", "Previous");
|
||||
layoutItemBuilder.AddAttribute(i++, "Text", localizer.GetString(ResourceKeys.ButtonPrevious));
|
||||
layoutItemBuilder.CloseComponent();
|
||||
}
|
||||
layoutItemBuilder.CloseElement(); //close div
|
||||
|
|
@ -277,12 +366,33 @@ namespace TIAMSharedUI.Pages.Components
|
|||
|
||||
}
|
||||
layoutItemBuilder.OpenComponent<DxFormLayoutItem>(i++);
|
||||
layoutItemBuilder.AddAttribute(i++, "ColSpanMd", 12);
|
||||
layoutItemBuilder.AddAttribute(i++, "CssClass", "full-width");
|
||||
layoutItemBuilder.AddAttribute(i++, "Template", (RenderFragment<object>)((context) => ((editor) =>
|
||||
{
|
||||
LogToBrowserConsole.LogToBC($"Submit button {CurrentStep}, {propertyList.Length}");
|
||||
editor.OpenComponent<DxButton>(i++);
|
||||
|
||||
editor.OpenElement(i++, "button");
|
||||
editor.AddAttribute(i++, "type", "submit");
|
||||
editor.AddAttribute(i++, "class", "btn btn-primary mt-3");
|
||||
if (CurrentStep < propertyList.Length - 1)
|
||||
{
|
||||
editor.AddAttribute(i++, "disabled", "true");
|
||||
|
||||
}
|
||||
//editor.AddAttribute(i++, "disabled", "true");
|
||||
|
||||
editor.OpenElement(i++, "span");
|
||||
editor.AddAttribute(i++, "class", _spinnerClass);
|
||||
|
||||
editor.CloseElement();
|
||||
editor.AddContent(i++, localizer.GetString(SubmitButtonText));
|
||||
editor.CloseElement();
|
||||
|
||||
/*editor.OpenComponent<DxButton>(i++);
|
||||
editor.AddAttribute(i++, "SubmitFormOnClick", true);
|
||||
editor.AddAttribute(i++, "Text", "Submit");
|
||||
editor.AddAttribute(i++, "Text", SubmitButtonText);
|
||||
editor.AddAttribute(i++, "IconClass", _spinnerClass);
|
||||
editor.AddAttribute(i++, "CssClass", "btn btn-primary mt-3");
|
||||
if (CurrentStep == propertyList.Length-1)
|
||||
{
|
||||
|
|
@ -292,10 +402,7 @@ namespace TIAMSharedUI.Pages.Components
|
|||
{
|
||||
editor.AddAttribute(i++, "Visible", false);
|
||||
}
|
||||
editor.OpenElement(i++, "span");
|
||||
editor.AddAttribute(i++, "class", _spinnerClass);
|
||||
editor.CloseElement();
|
||||
editor.CloseComponent();
|
||||
editor.CloseComponent();*/
|
||||
})));
|
||||
|
||||
layoutItemBuilder.CloseComponent();
|
||||
|
|
@ -303,7 +410,10 @@ namespace TIAMSharedUI.Pages.Components
|
|||
formLayoutBuilder.CloseComponent();
|
||||
};
|
||||
|
||||
|
||||
|
||||
private void SetPhoneNumber(PropertyInfo property, object Data, string str)
|
||||
{
|
||||
LogToBrowserConsole.LogToBC($"SetPhoneNumber called with {str}");
|
||||
property.SetValue(Data, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,115 @@
|
|||
@page "/dbtest"
|
||||
@using TIAMSharedUI.Pages.Components
|
||||
@using TIAMWebApp.Shared.Application.Interfaces
|
||||
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||
@using TIAMWebApp.Shared.Application.Utility
|
||||
@inject LogToBrowserConsole logToBrowserConsole
|
||||
@inject IWizardProcessor WizardProcessor
|
||||
<h3>TestPage</h3>
|
||||
<div class="container mt-3">
|
||||
|
||||
<ChooseDestination></ChooseDestination>
|
||||
<hr/>
|
||||
<DbTestComponent></DbTestComponent>
|
||||
|
||||
<div class="target-container" @onclick="@(() => EulaVisible = true)">
|
||||
<button class="btn btn-primary">NEW TRANSFERDESTINATION</button>
|
||||
<button class="btn btn-primary">NEW TRANSFER</button>
|
||||
</div>
|
||||
<DxPopup CssClass="popup-demo-events"
|
||||
@bind-Visible="@EulaVisible"
|
||||
ShowFooter="true"
|
||||
CloseOnEscape="false"
|
||||
CloseOnOutsideClick="false"
|
||||
ShowCloseButton="false"
|
||||
HeaderText="DevExpress EULA"
|
||||
Closing="EulaPopupClosing"
|
||||
Closed="EulaPopupClosed">
|
||||
<BodyContentTemplate>
|
||||
<InputWizard Data=@myModel OnSubmit="SubmitForm"></InputWizard>
|
||||
</BodyContentTemplate>
|
||||
<FooterContentTemplate Context="Context">
|
||||
<div class="popup-demo-events-footer">
|
||||
<!--DxCheckBox CssClass="popup-demo-events-checkbox" @bind-Checked="@EulaAccepted">I accept the terms of the EULA</!--DxCheckBox-->
|
||||
<!--DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="Context.CloseCallback" /-->
|
||||
<DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text="Cancel" Click="CancelEulaClick" />
|
||||
</div>
|
||||
</FooterContentTemplate>
|
||||
</DxPopup>
|
||||
<DxPopup CssClass="popup-demo-events"
|
||||
@bind-Visible="@EulaVisible"
|
||||
ShowFooter="true"
|
||||
CloseOnEscape="false"
|
||||
CloseOnOutsideClick="false"
|
||||
ShowCloseButton="false"
|
||||
HeaderText="DevExpress EULA"
|
||||
Closing="EulaPopupClosing"
|
||||
Closed="EulaPopupClosed">
|
||||
<BodyContentTemplate>
|
||||
<InputWizard Data=@myModel2 OnSubmit="SubmitForm"></InputWizard>
|
||||
</BodyContentTemplate>
|
||||
<FooterContentTemplate Context="Context">
|
||||
<div class="popup-demo-events-footer">
|
||||
<!--DxCheckBox CssClass="popup-demo-events-checkbox" @bind-Checked="@EulaAccepted">I accept the terms of the EULA</!--DxCheckBox-->
|
||||
<!--DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="Context.CloseCallback" /-->
|
||||
<DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text="Cancel" Click="CancelEulaClick" />
|
||||
</div>
|
||||
</FooterContentTemplate>
|
||||
</DxPopup>
|
||||
<DxPopup @bind-Visible="@MessageBoxVisible"
|
||||
ShowFooter="true"
|
||||
HeaderText="DevExpress EULA"
|
||||
BodyText="You must read and accept the terms of the EULA to continue.">
|
||||
<FooterContentTemplate Context="Context">
|
||||
<DxButton CssClass="popup-button my-1 ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="Context.CloseCallback" />
|
||||
<DxButton CssClass="popup-button my-1 ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text="Cancel" Click="CancelEulaClick" />
|
||||
</FooterContentTemplate>
|
||||
</DxPopup>
|
||||
|
||||
|
||||
</div>
|
||||
@code {
|
||||
|
||||
public TransferDestinationWizardModel myModel = new TransferDestinationWizardModel();
|
||||
public void SubmitForm(object Result)
|
||||
public TransferWizardModel myModel2 = new TransferWizardModel();
|
||||
|
||||
bool EulaAccepted { get; set; }
|
||||
bool EulaVisible { get; set; }
|
||||
bool MessageBoxVisible { get; set; }
|
||||
bool SkipEulaCheck { get; set; }
|
||||
void TryAgainClick()
|
||||
{
|
||||
MessageBoxVisible = false;
|
||||
}
|
||||
void CancelEulaClick()
|
||||
{
|
||||
myModel = new TransferDestinationWizardModel();
|
||||
SkipEulaCheck = true;
|
||||
MessageBoxVisible = false;
|
||||
EulaVisible = false;
|
||||
}
|
||||
void EulaPopupClosed()
|
||||
{
|
||||
EulaAccepted = false;
|
||||
SkipEulaCheck = false;
|
||||
}
|
||||
void EulaPopupClosing(PopupClosingEventArgs args)
|
||||
{
|
||||
if (SkipEulaCheck)
|
||||
return;
|
||||
args.Cancel = !EulaAccepted;
|
||||
MessageBoxVisible = !EulaAccepted;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
public async Task SubmitForm(object Result)
|
||||
{
|
||||
//await WizardProcessor.ProcessWizardAsync(Result.GetType(), Result);
|
||||
logToBrowserConsole.LogToBC($"Submitted nested form: {Result.GetType().FullName}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<!--We need to check if the user is owner of a swerviceprovider-->
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="container">
|
||||
|
||||
|
||||
<!--App admin-->
|
||||
|
|
|
|||
|
|
@ -1,69 +1,190 @@
|
|||
@page "/user/properties"
|
||||
@using TIAM.Entities.ServiceProviders
|
||||
@using TIAM.Resources
|
||||
@using TIAMSharedUI.Pages.Components
|
||||
@using TIAMSharedUI.Shared
|
||||
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||
@using TIAMWebApp.Shared.Application.Utility
|
||||
@layout AdminLayout
|
||||
@inject LogToBrowserConsole logToBrowserConsole
|
||||
@inject IStringLocalizer<TIAMResources> localizer
|
||||
<h3>Properties</h3>
|
||||
|
||||
<h4>You have no properties yet...</h4>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class=" col-12 col-xl-6">
|
||||
<div class="card card-admin" style="border-radius: 16px;">
|
||||
<div class="card-header py-2 px-4">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span class="fw-bold text-body">Service providers list</span>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<!--div class="target-container" @onclick="@(() => EulaVisible = true)">
|
||||
<button class="btn btn-primary">Create</button>
|
||||
</div-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body card-admin-body py-2 px-4">
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
|
||||
<DxGrid Data="@OrderData">
|
||||
|
||||
|
||||
@*<DxPopup CssClass="popup-demo-events"
|
||||
@bind-Visible="@EulaVisible"
|
||||
ShowFooter="true"
|
||||
CloseOnEscape="false"
|
||||
CloseOnOutsideClick="false"
|
||||
ShowCloseButton="true"
|
||||
HeaderText="@localizer.GetString(ResourceKeys.ServiceProviderTitle)"
|
||||
Closing="EulaPopupClosing"
|
||||
Closed="EulaPopupClosed">
|
||||
<BodyContentTemplate>
|
||||
<InputWizard Data=@myModel OnSubmit="SubmitForm" SubmitButtonText=@ResourceKeys.ButtonSave TitleResourceString=@ResourceKeys.ServiceProviderTitle></InputWizard>
|
||||
</BodyContentTemplate>
|
||||
<FooterContentTemplate Context="Context">
|
||||
<div class="popup-demo-events-footer">
|
||||
<!--DxCheckBox CssClass="popup-demo-events-checkbox" @bind-Checked="@EulaAccepted">I accept the terms of the EULA</!--DxCheckBox-->
|
||||
<!--DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="Context.CloseCallback" /-->
|
||||
<DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text=@localizer.GetString(ResourceKeys.ButtonCancel) Click="CancelCreateClick" />
|
||||
</div>
|
||||
</FooterContentTemplate>
|
||||
</DxPopup>*@
|
||||
|
||||
<DxGrid @ref="Grid"
|
||||
Data="OrderData"
|
||||
PageSize="12"
|
||||
KeyFieldName="Id"
|
||||
ValidationEnabled="false"
|
||||
CustomizeEditModel="Grid_CustomizeEditModel"
|
||||
EditModelSaving="Grid_EditModelSaving"
|
||||
DataItemDeleting="Grid_DataItemDeleting"
|
||||
EditMode="GridEditMode.PopupEditForm"
|
||||
KeyboardNavigationEnabled="true">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Date" DisplayFormat="D" MinWidth="100">
|
||||
<DxGridCommandColumn Width="160px" />
|
||||
<DxGridDataColumn FieldName="Name" MinWidth="80">
|
||||
<CellDisplayTemplate>
|
||||
<a class="d-block text-left" href="transferdetails">@context.Value</a>
|
||||
</CellDisplayTemplate>
|
||||
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="Income" Width="15%" />
|
||||
<DxGridDataColumn FieldName="TransactionId" Width="15%" />
|
||||
<DxGridDataColumn FieldName="Status" Width="10%" />
|
||||
<DxGridDataColumn FieldName="OwnerId" MinWidth="80" />
|
||||
|
||||
</Columns>
|
||||
</DxGrid>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<h4> Some <span class="small text-muted"> conclusion </span></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class=" col-12 col-xl-6">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
IGrid Grid { get; set; }
|
||||
object? OrderData { get; set; }
|
||||
|
||||
public ServiceProviderWizardModel myModel = new ServiceProviderWizardModel();
|
||||
|
||||
bool EulaAccepted { get; set; }
|
||||
bool EulaVisible { get; set; }
|
||||
|
||||
|
||||
void CancelCreateClick()
|
||||
{
|
||||
|
||||
|
||||
EulaVisible = false;
|
||||
}
|
||||
void EulaPopupClosed()
|
||||
{
|
||||
EulaAccepted = false;
|
||||
|
||||
}
|
||||
void EulaPopupClosing(PopupClosingEventArgs args)
|
||||
{
|
||||
myModel = new ServiceProviderWizardModel();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
public async Task SubmitForm(object Result)
|
||||
{
|
||||
//await WizardProcessor.ProcessWizardAsync(Result.GetType(), Result);
|
||||
logToBrowserConsole.LogToBC($"Submitted nested form: {Result.GetType().FullName}");
|
||||
}
|
||||
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
await Grid.StartEditRowAsync(0);
|
||||
}
|
||||
|
||||
void Grid_CustomizeEditModel(GridCustomizeEditModelEventArgs e)
|
||||
{
|
||||
if (e.IsNew)
|
||||
{
|
||||
var newEmployee = (TiamServiceProvider)e.EditModel;
|
||||
newEmployee.Name = "John";
|
||||
newEmployee.OwnerId = Guid.NewGuid();
|
||||
}
|
||||
}
|
||||
|
||||
async Task Grid_EditModelSaving(GridEditModelSavingEventArgs e)
|
||||
{
|
||||
if (e.IsNew)
|
||||
//add new orderData to orderData array
|
||||
logToBrowserConsole.LogToBC("New orderData added");
|
||||
//await NwindDataService.InsertEmployeeAsync((EditableEmployee)e.EditModel);
|
||||
else
|
||||
logToBrowserConsole.LogToBC("orderData updated");
|
||||
//modify orderData where orderData.Name == e.EditModel.Name
|
||||
|
||||
//await NwindDataService.UpdateEmployeeAsync((EditableEmployee)e.DataItem, (EditableEmployee)e.EditModel);
|
||||
|
||||
await UpdateDataAsync();
|
||||
}
|
||||
async Task Grid_DataItemDeleting(GridDataItemDeletingEventArgs e)
|
||||
{
|
||||
//await NwindDataService.RemoveEmployeeAsync((EditableEmployee)e.DataItem);
|
||||
//remove orderData from orderData array
|
||||
logToBrowserConsole.LogToBC("orderData deleted");
|
||||
//await UpdateDataAsync();
|
||||
}
|
||||
async Task UpdateDataAsync()
|
||||
{
|
||||
//DataSource = await NwindDataService.GetEmployeesEditableAsync();
|
||||
//refresh grid
|
||||
logToBrowserConsole.LogToBC("orderData grid refreshed");
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
OrderData = new object[]
|
||||
OrderData = new TiamServiceProvider[]
|
||||
{
|
||||
new {
|
||||
Date = DateTime.Now.AddDays(3),
|
||||
Income = "$5",
|
||||
TransactionId = "POX987532582",
|
||||
Status = "Finished"
|
||||
},
|
||||
new {
|
||||
Date = DateTime.Today.AddDays(-2),
|
||||
Income = "$5",
|
||||
TransactionId = "POX645646382",
|
||||
Status = "Finished"
|
||||
},
|
||||
new
|
||||
{
|
||||
Date = DateTime.Today.AddDays(-6),
|
||||
Income = "$8",
|
||||
TransactionId = "POX645766311",
|
||||
Status = "Finished"
|
||||
},
|
||||
new TiamServiceProvider(Guid.NewGuid(), "BAT", Guid.NewGuid()),
|
||||
new TiamServiceProvider(Guid.NewGuid(), "TIAM", Guid.NewGuid()),
|
||||
new TiamServiceProvider(Guid.NewGuid(), "TestHotel", Guid.NewGuid())
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,294 @@
|
|||
@page "/user/transfers"
|
||||
@using TIAM.Entities.ServiceProviders
|
||||
@using TIAM.Resources
|
||||
@using TIAMSharedUI.Pages.Components
|
||||
@using TIAMSharedUI.Shared
|
||||
@using TIAMWebApp.Shared.Application.Models
|
||||
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||
@using TIAMWebApp.Shared.Application.Utility
|
||||
@layout AdminLayout
|
||||
@inject LogToBrowserConsole logToBrowserConsole
|
||||
@inject IStringLocalizer<TIAMResources> localizer
|
||||
<PageTitle>Transfers</PageTitle>
|
||||
<h3>Properties</h3>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class=" col-12">
|
||||
<div class="card card-admin" style="border-radius: 16px; height: 80vh !important">
|
||||
<div class="card-header py-2 px-4">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span class="fw-bold text-body">Service providers list</span>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<!--div class="target-container" @onclick="@(() => EulaVisible = true)">
|
||||
<button class="btn btn-primary">Create</button>
|
||||
</div-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body card-admin-body py-2 px-4">
|
||||
<div class="d-flex flex-column mb-4 pb-2">
|
||||
<div class="align-self-end pl-2 pb-2">
|
||||
<DxButton Text="Column Chooser"
|
||||
RenderStyle="ButtonRenderStyle.Secondary"
|
||||
IconCssClass="btn-column-chooser"
|
||||
Click="ColumnChooserButton_Click" />
|
||||
</div>
|
||||
<DxGrid @ref="Grid"
|
||||
Data="TransferData"
|
||||
PageSize="8"
|
||||
KeyFieldName="Id"
|
||||
ValidationEnabled="false"
|
||||
CustomizeEditModel="Grid_CustomizeEditModel"
|
||||
EditModelSaving="Grid_EditModelSaving"
|
||||
DataItemDeleting="Grid_DataItemDeleting"
|
||||
EditMode="GridEditMode.EditForm"
|
||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||
KeyboardNavigationEnabled="true"
|
||||
ShowFilterRow="true">
|
||||
<Columns>
|
||||
<DxGridCommandColumn Width="8%" FixedPosition="GridColumnFixedPosition.Left" />
|
||||
|
||||
<DxGridDataColumn FieldName="Id" MinWidth="80" Width="10%" Visible="false" />
|
||||
<DxGridDataColumn FieldName="Destination" FixedPosition="GridColumnFixedPosition.Left" MinWidth="80" Width="10%">
|
||||
<CellDisplayTemplate>
|
||||
@{
|
||||
var keyField = context.Value;
|
||||
<a class="d-block text-left" href="transferdetails">@context.Value</a>
|
||||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="PickupAddress" FixedPosition="GridColumnFixedPosition.Left" MinWidth="80" Width="15%" />
|
||||
<DxGridDataColumn FieldName="TripDate" MinWidth="80" Width="10%" />
|
||||
<DxGridDataColumn FieldName="NumberOfPassengers" MinWidth="40" Width="3%" />
|
||||
<DxGridDataColumn FieldName="FullName" MinWidth="80" />
|
||||
<DxGridDataColumn FieldName="PhoneNumber" MinWidth="80" Width="10%" />
|
||||
<DxGridDataColumn FieldName="EmailAddress" MinWidth="80" Width="10%">
|
||||
<CellDisplayTemplate>
|
||||
@{
|
||||
var keyField = context.Value;
|
||||
string buttonText = "Contact";
|
||||
<DxButton Click="() => SendMail(keyField)" Text="@buttonText" RenderStyle="ButtonRenderStyle.Primary" />
|
||||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="Driver" FixedPosition="GridColumnFixedPosition.Right" MinWidth="80" Width="15%">
|
||||
<CellDisplayTemplate>
|
||||
@{
|
||||
DriverModel keyField = (DriverModel)context.Value;
|
||||
string driverText = keyField.Name;
|
||||
<p>@driverText</p>
|
||||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
|
||||
</Columns>
|
||||
|
||||
<EditFormTemplate Context="EditFormContext">
|
||||
@{
|
||||
var transfer = (TransferWizardModel)EditFormContext.EditModel;
|
||||
}
|
||||
<DxFormLayout CssClass="w-100">
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.DestinationAddress) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("Destination")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.PickupAddress) ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("PickupAddress")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption="Trip date:" ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("TripDate")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption="Passengers:" ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("NumberOfPassengers")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption="Full name:" ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("FullName")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption="Phone number:" ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("PhoneNumber")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption="Email:" ColSpanMd="6">
|
||||
@EditFormContext.GetEditor("EmailAddress")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption="Driver:" ColSpanMd="6">
|
||||
<DxComboBox Data="@drivers"
|
||||
NullText="Select driver..."
|
||||
FilteringMode="DataGridFilteringMode.Contains"
|
||||
TextFieldName="Name"
|
||||
ValueFieldName="Name"
|
||||
Value="@transfer.Driver.Name"
|
||||
ValueChanged="(string newCellValue) => {
|
||||
transfer.Driver = drivers.FirstOrDefault(x => x.Name == newCellValue);
|
||||
logToBrowserConsole.LogToBC(newCellValue);
|
||||
}">
|
||||
</DxComboBox>
|
||||
</DxFormLayoutItem>
|
||||
|
||||
</DxFormLayout>
|
||||
</EditFormTemplate>
|
||||
|
||||
</DxGrid>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<h4> Some <span class="small text-muted"> conclusion </span></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class=" col-12 col-xl-6">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
IGrid Grid { get; set; }
|
||||
//object? TransferData { get; set; }
|
||||
|
||||
public TransferWizardModel myModel = new TransferWizardModel();
|
||||
|
||||
bool EulaAccepted { get; set; }
|
||||
bool EulaVisible { get; set; }
|
||||
|
||||
//IEnumerable<DriverModel> drivers { get; set; }
|
||||
|
||||
IEnumerable<DriverModel> drivers { get; set; } = new DriverModel[] {
|
||||
new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "John Doe"),
|
||||
new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "Jane Doe"),
|
||||
new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "James Doe")
|
||||
};
|
||||
|
||||
object? TransferData = new TransferWizardModel[]
|
||||
{
|
||||
new TransferWizardModel(Guid.NewGuid(), "1087, Budapest, Százados út 30/a", "Nyugati Pályaudvar", DateTime.UtcNow.AddDays(3), 3, "John Malkovich", "+13021234567", "john.malkovich@stars.com", new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "John Doe")),
|
||||
new TransferWizardModel(Guid.NewGuid(), "1027, Budapest, Batthyányi tér 3", "Budapest, Koós Károly sétány 21", DateTime.UtcNow.AddDays(6), 3, "John Malkovich", "+13021234567", "john.malkovich@stars.com", new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "Jane Doe")),
|
||||
new TransferWizardModel(Guid.NewGuid(), "1087, Budapest, Százados út 30/a", "Nyugati Pályaudvar", DateTime.UtcNow.AddDays(2), 3, "John Malkovich", "+13021234567", "john.malkovich@stars.com", new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "James Doe")),
|
||||
new TransferWizardModel(Guid.NewGuid(), "1087, Budapest, Százados út 30/a", "Nyugati Pályaudvar", DateTime.UtcNow.AddDays(4).AddHours(-6), 3, "John Malkovich", "+13021234567", "john.malkovich@stars.com", new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "James Doe")),
|
||||
new TransferWizardModel(Guid.NewGuid(), "1087, Budapest, Százados út 30/a", "Nyugati Pályaudvar", DateTime.UtcNow.AddDays(7), 3, "John Malkovich", "+13021234567", "john.malkovich@stars.com", new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "Joan Doe")),
|
||||
new TransferWizardModel(Guid.NewGuid(), "1087, Budapest, Százados út 30/a", "Nyugati Pályaudvar", DateTime.UtcNow.AddDays(1), 3, "John Malkovich", "+13021234567", "john.malkovich@stars.com", new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "James Doe")),
|
||||
new TransferWizardModel(Guid.NewGuid(), "1087, Budapest, Százados út 30/a", "Nyugati Pályaudvar", DateTime.UtcNow.AddDays(6).AddHours(3), 3, "John Malkovich", "+13021234567", "john.malkovich@stars.com", new DriverModel(Guid.NewGuid(), Guid.NewGuid(), "John Doe"))
|
||||
|
||||
};
|
||||
|
||||
void SendMail(object emailAddress)
|
||||
{
|
||||
logToBrowserConsole.LogToBC($"Sending mail to {emailAddress}");
|
||||
}
|
||||
|
||||
void CancelCreateClick()
|
||||
{
|
||||
|
||||
|
||||
EulaVisible = false;
|
||||
}
|
||||
void EulaPopupClosed()
|
||||
{
|
||||
EulaAccepted = false;
|
||||
|
||||
}
|
||||
void EulaPopupClosing(PopupClosingEventArgs args)
|
||||
{
|
||||
myModel = new TransferWizardModel();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
public async Task SubmitForm(object Result)
|
||||
{
|
||||
//await WizardProcessor.ProcessWizardAsync(Result.GetType(), Result);
|
||||
logToBrowserConsole.LogToBC($"Submitted nested form: {Result.GetType().FullName}");
|
||||
}
|
||||
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
//if (firstRender)
|
||||
// await Grid.StartEditRowAsync(0);
|
||||
}
|
||||
|
||||
void Grid_CustomizeEditModel(GridCustomizeEditModelEventArgs e)
|
||||
{
|
||||
if (e.IsNew)
|
||||
{
|
||||
var newEmployee = (TransferWizardModel)e.EditModel;
|
||||
newEmployee.Id = Guid.NewGuid();
|
||||
newEmployee.Destination = "ghjgkg hkgh ghjkghgkjgh";
|
||||
newEmployee.PickupAddress = "ghjgkg hkgh ghjkghgkjgh";
|
||||
newEmployee.TripDate = DateTime.UtcNow.AddDays(3);
|
||||
newEmployee.NumberOfPassengers = 1;
|
||||
newEmployee.FullName = "ghjgkg hkgh ghjkghgkjgh";
|
||||
newEmployee.PhoneNumber = "+13021234567";
|
||||
newEmployee.EmailAddress = "ghjgkg hkgh ghjkghgkjgh";
|
||||
newEmployee.Driver = drivers.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
async Task Grid_EditModelSaving(GridEditModelSavingEventArgs e)
|
||||
{
|
||||
if (e.IsNew)
|
||||
//add new orderData to orderData array
|
||||
logToBrowserConsole.LogToBC("New orderData added");
|
||||
//await NwindDataService.InsertEmployeeAsync((EditableEmployee)e.EditModel);
|
||||
else
|
||||
logToBrowserConsole.LogToBC("orderData updated");
|
||||
//modify transferData where transferData.Id == e.EditModel.Id
|
||||
//get transfer from TransferData by Id
|
||||
|
||||
foreach (var transferToModify in (TransferWizardModel[])TransferData)
|
||||
{
|
||||
myModel = (TransferWizardModel)e.EditModel;
|
||||
|
||||
if (transferToModify.Id == myModel.Id)
|
||||
{
|
||||
transferToModify.Driver = myModel.Driver;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//await NwindDataService.UpdateEmployeeAsync((EditableEmployee)e.DataItem, (EditableEmployee)e.EditModel);
|
||||
|
||||
await UpdateDataAsync();
|
||||
}
|
||||
async Task Grid_DataItemDeleting(GridDataItemDeletingEventArgs e)
|
||||
{
|
||||
//await NwindDataService.RemoveEmployeeAsync((EditableEmployee)e.DataItem);
|
||||
//remove orderData from orderData array
|
||||
logToBrowserConsole.LogToBC("orderData deleted");
|
||||
//await UpdateDataAsync();
|
||||
}
|
||||
async Task UpdateDataAsync()
|
||||
{
|
||||
//DataSource = await NwindDataService.GetEmployeesEditableAsync();
|
||||
//refresh grid
|
||||
logToBrowserConsole.LogToBC("orderData grid refreshed");
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ColumnChooserButton_Click()
|
||||
{
|
||||
Grid.ShowColumnChooser();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -34,6 +34,11 @@
|
|||
Properties
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="user/transfers">
|
||||
Transfers
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="serviceprovider">
|
||||
My profile
|
||||
|
|
|
|||
|
|
@ -71,6 +71,18 @@ select {
|
|||
|
||||
/*my blazor overrides*/
|
||||
|
||||
|
||||
.dxbl-grid {
|
||||
--dxbl-grid-font-family: inherit !important;
|
||||
--dxbl-grid-font-size: 0.75rem !important;
|
||||
--dxbl-grid-line-height: 1.3 !important;
|
||||
--dxbl-grid-min-width: 240px;
|
||||
--dxbl-grid-bg: #e7e6f7;
|
||||
--dxbl-grid-color: #58457b;
|
||||
color: darkslategrey !important;
|
||||
}
|
||||
|
||||
|
||||
.dxbl-text-edit {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ using System.Resources;
|
|||
using TIAMWebApp.Client;
|
||||
using TIAMWebApp.Client.Services;
|
||||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using TIAMWebApp.Shared.Application.Services;
|
||||
using TIAMWebApp.Shared.Application.Utility;
|
||||
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
|
|
@ -25,7 +26,7 @@ builder.Services.AddScoped<LogToBrowserConsole>();
|
|||
builder.Services.AddBlazoredLocalStorage();
|
||||
builder.Services.AddSingleton<ISessionService, SessionServiceWeb>();
|
||||
builder.Services.AddSingleton<IComponentUpdateService, ComponentUpdateServiceWeb>();
|
||||
builder.Services.AddScoped<IServiceProviderDataService, ServiceProviderDataServiceWeb>();
|
||||
builder.Services.AddScoped<IServiceProviderDataService, ServiceProviderDataService>();
|
||||
builder.Services.AddScoped<IWizardProcessor, WizardProcessor>();
|
||||
//WebSpecific
|
||||
builder.Services.AddScoped<SessionStorageAccessor>();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<link href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.css" rel="stylesheet" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
|
||||
<link href="_content/DevExpress.Blazor.Themes/blazing-dark.bs5.min.css" asp-append-version="true" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Themes/blazing-berry.bs5.min.css" asp-append-version="true" rel="stylesheet" />
|
||||
<link href="_content/TIAMSharedUI/css/app.css" rel="stylesheet" />
|
||||
<link href="_content/TIAMSharedUI/css/TourIAm.css" rel="stylesheet" />
|
||||
<link rel="icon" type="image/png" href="_content/TIAMSharedUI/favicon.png" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
using AyCode.Interfaces.Entities;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TIAMWebApp.Shared.Application.Models
|
||||
{
|
||||
public class CarModel : IEntityGuid, ITimeStampInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Make { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string Color { get; set; }
|
||||
public string Year { get; set; }
|
||||
|
||||
public string LicensePlate { get; set; }
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
|
||||
public CarModel() { }
|
||||
public CarModel(string make, string type, string color, string year, string licensePlate) : this(Guid.NewGuid(), make, type, color, year, licensePlate)
|
||||
{ }
|
||||
public CarModel(Guid id, string make, string type, string color, string year, string licensePlate)
|
||||
{
|
||||
Id = id;
|
||||
Make = make;
|
||||
Type = type;
|
||||
Color = color;
|
||||
Year = year;
|
||||
LicensePlate = licensePlate;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
using AyCode.Entities.Locations;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using TIAM.Resources;
|
||||
|
||||
namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||
{
|
||||
public class ServiceProviderWizardModel
|
||||
{
|
||||
|
||||
//[Required(ErrorMessage = "The Username value should be specified.")]
|
||||
[Required(ErrorMessage = "The name should be specified.")]
|
||||
[DataType(DataType.Text)]
|
||||
[Display(Name = ResourceKeys.ServiceProviderName, ResourceType = typeof(TIAMResources))]
|
||||
public string? Name { get; set; }
|
||||
|
||||
|
||||
|
||||
public ServiceProviderWizardModel() { }
|
||||
public ServiceProviderWizardModel(string name) : this(Guid.NewGuid(), name) { }
|
||||
public ServiceProviderWizardModel(Guid id, string name) {
|
||||
Name = name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -15,14 +15,17 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
|||
{
|
||||
|
||||
//[Required(ErrorMessage = "The Username value should be specified.")]
|
||||
[Required(ErrorMessage = "The Destination name should be specified.")]
|
||||
[DataType(DataType.Text)]
|
||||
[Display(Name = ResourceKeys.DestinationName, ResourceType = typeof(TIAMResources))]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "The Destination info should be specified.")]
|
||||
[DataType(DataType.MultilineText)]
|
||||
[Display(Name = ResourceKeys.DestinationInfo, ResourceType = typeof(TIAMResources))]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "The address should be specified.")]
|
||||
[DataType(DataType.Text)]
|
||||
[Display(Name = ResourceKeys.DestinationAddress, ResourceType = typeof(TIAMResources))]
|
||||
public string? Address { get; set; }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,110 @@
|
|||
using AyCode.Entities.Locations;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using TIAM.Resources;
|
||||
|
||||
namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||
{
|
||||
public class TransferWizardModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
//[Required(ErrorMessage = "The Username value should be specified.")]
|
||||
[Required(ErrorMessage = "The destination address should be specified.")]
|
||||
[DataType(DataType.Text)]
|
||||
[Display(Name = ResourceKeys.Destination, ResourceType = typeof(TIAMResources))]
|
||||
public string? Destination { get; set; }
|
||||
|
||||
//[Required(ErrorMessage = "The Username value should be specified.")]
|
||||
[Required(ErrorMessage = "The pickup address should be specified.")]
|
||||
[DataType(DataType.Text)]
|
||||
[Display(Name = ResourceKeys.PickupAddress, ResourceType = typeof(TIAMResources))]
|
||||
public string? PickupAddress { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "The pickup time should be specified.")]
|
||||
[DataType(DataType.Date)]
|
||||
[Display(Name = ResourceKeys.PickupTime, ResourceType = typeof(TIAMResources))]
|
||||
public DateTime TripDate { get; set; } = DateTime.UtcNow.AddDays(2);
|
||||
|
||||
[Required(ErrorMessage = "The amount of passengers should be specified.")]
|
||||
[DataType("Int")]
|
||||
[Display(Name = ResourceKeys.NumberOfPassengers, ResourceType = typeof(TIAMResources))]
|
||||
public int NumberOfPassengers { get; set; } = 1;
|
||||
|
||||
//full name
|
||||
[Required(ErrorMessage = "The full name should be specified.")]
|
||||
[DataType(DataType.Text)]
|
||||
[Display(Name = ResourceKeys.FullName, ResourceType = typeof(TIAMResources))]
|
||||
public string? FullName { get; set; }
|
||||
|
||||
//phone number
|
||||
[Required(ErrorMessage = "The phone number should be specified.")]
|
||||
[DataType(DataType.PhoneNumber)]
|
||||
[Display(Name = ResourceKeys.PhoneNumber, ResourceType = typeof(TIAMResources))]
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
//email address
|
||||
[Required(ErrorMessage = "The email address should be specified.")]
|
||||
[DataType(DataType.EmailAddress)]
|
||||
[Display(Name = ResourceKeys.EmailAddress, ResourceType = typeof(TIAMResources))]
|
||||
public string? EmailAddress { get; set; }
|
||||
|
||||
[DataType("Price")]
|
||||
[Display(Name = ResourceKeys.Price, ResourceType = typeof(TIAMResources))]
|
||||
public int? Price { get; set;}
|
||||
|
||||
[DataType("Driver")]
|
||||
[Display(Name = ResourceKeys.Driver, ResourceType = typeof(TIAMResources))]
|
||||
public DriverModel Driver { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public TransferWizardModel() { }
|
||||
public TransferWizardModel(string destination, string pickupAddress) : this(Guid.NewGuid(), destination, pickupAddress) { }
|
||||
public TransferWizardModel(Guid id, string destination, string pickupAddress) {
|
||||
Destination = destination;
|
||||
PickupAddress = pickupAddress;
|
||||
}
|
||||
|
||||
public TransferWizardModel(string destination, string pickupAddress, DateTime tripDate, int numberOfPassengers, string fullName, string phoneNumber, string emailAddress) : this(Guid.NewGuid(), destination, pickupAddress, tripDate, numberOfPassengers, fullName, phoneNumber, emailAddress) { }
|
||||
|
||||
|
||||
public TransferWizardModel(Guid id, string destination, string pickupAddress, DateTime tripDate, int numberOfPassengers, string fullName, string phoneNumber, string emailAddress)
|
||||
{
|
||||
Id = id;
|
||||
Destination = destination;
|
||||
PickupAddress = pickupAddress;
|
||||
TripDate = tripDate;
|
||||
NumberOfPassengers = numberOfPassengers;
|
||||
FullName = fullName;
|
||||
PhoneNumber = phoneNumber;
|
||||
EmailAddress = emailAddress;
|
||||
}
|
||||
|
||||
public TransferWizardModel(string destination, string pickupAddress, DateTime tripDate, int numberOfPassengers, string fullName, string phoneNumber, string emailAddress, DriverModel driver) : this(Guid.NewGuid(), destination, pickupAddress, tripDate, numberOfPassengers, fullName, phoneNumber, emailAddress, driver) { }
|
||||
|
||||
|
||||
public TransferWizardModel(Guid id, string destination, string pickupAddress, DateTime tripDate, int numberOfPassengers, string fullName, string phoneNumber, string emailAddress, DriverModel driver)
|
||||
{
|
||||
Id = id;
|
||||
Destination = destination;
|
||||
PickupAddress = pickupAddress;
|
||||
TripDate = tripDate;
|
||||
NumberOfPassengers = numberOfPassengers;
|
||||
FullName = fullName;
|
||||
PhoneNumber = phoneNumber;
|
||||
EmailAddress = emailAddress;
|
||||
Driver = driver;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
using AyCode.Interfaces.Entities;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TIAMWebApp.Shared.Application.Models
|
||||
{
|
||||
public class DriverModel : IEntityGuid, ITimeStampInfo
|
||||
{
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public Guid ProductId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public List<CarModel> Cars { get; set; } = new();
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
|
||||
public DriverModel() { }
|
||||
public DriverModel(Guid userId, Guid productId, string name) : this(Guid.NewGuid(), userId, productId, name) { }
|
||||
public DriverModel(Guid id, Guid userId, Guid productId, string name)
|
||||
{
|
||||
Id = id;
|
||||
UserId = userId;
|
||||
ProductId = productId;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
using AyCode.Interfaces.StorageHandlers;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using System.Net.Http.Json;
|
||||
using TIAM.Database.DataLayers.Users;
|
||||
|
|
@ -11,9 +9,9 @@ using TIAMWebApp.Shared.Application.Interfaces;
|
|||
using TIAMWebApp.Shared.Application.Models;
|
||||
using TIAMWebApp.Shared.Application.Utility;
|
||||
|
||||
namespace TIAMWebApp.Client.Services
|
||||
namespace TIAMWebApp.Shared.Application.Services
|
||||
{
|
||||
public class ServiceProviderDataServiceWeb : IServiceProviderDataService
|
||||
public class ServiceProviderDataService : IServiceProviderDataService
|
||||
{
|
||||
private readonly HttpClient http;
|
||||
private readonly ISecureStorageHandler secureStorageHandler;
|
||||
|
|
@ -21,7 +19,7 @@ namespace TIAMWebApp.Client.Services
|
|||
private readonly LogToBrowserConsole logToBrowserConsole;
|
||||
|
||||
|
||||
public ServiceProviderDataServiceWeb(HttpClient http, ISecureStorageHandler secureStorageHandler, IJSRuntime jSRuntime)
|
||||
public ServiceProviderDataService(HttpClient http, ISecureStorageHandler secureStorageHandler, IJSRuntime jSRuntime)
|
||||
{
|
||||
this.http = http;
|
||||
this.secureStorageHandler = secureStorageHandler;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,47 @@
|
|||
public static class ResourceKeys
|
||||
{
|
||||
//general
|
||||
public const string ButtonCancel = "ButtonCancel";
|
||||
public const string ButtonNext = "ButtonNext";
|
||||
public const string ButtonPrevious = "ButtonPrevious";
|
||||
public const string ButtonFinish = "ButtonFinish";
|
||||
public const string ButtonSave = "ButtonSave";
|
||||
|
||||
public const string ButtonDelete = "ButtonDelete";
|
||||
public const string ButtonEdit = "ButtonEdit";
|
||||
public const string FullName = "FullName";
|
||||
public const string EmailAddress = "EmailAddress";
|
||||
public const string PhoneNumber = "PhoneNumber";
|
||||
public const string Password = "Password";
|
||||
public const string ConfirmPassword = "ConfirmPassword";
|
||||
public const string RememberMe = "RememberMe";
|
||||
public const string Login = "Login";
|
||||
public const string Register = "Register";
|
||||
public const string ForgotPassword = "ForgotPassword";
|
||||
public const string ResetPassword = "ResetPassword";
|
||||
public const string ConfirmPasswordReset = "ConfirmPasswordReset";
|
||||
public const string ConfirmEmail = "ConfirmEmail";
|
||||
public const string Price = "Price";
|
||||
public const string Driver = "Driver";
|
||||
|
||||
//wizard
|
||||
public const string TransferDestinationTitle = "TransferDestinationTitle";
|
||||
public const string DestinationName = "DestinationName";
|
||||
public const string DestinationInfo = "DestinationInfo";
|
||||
public const string DestinationAddress = "DestinationAddress";
|
||||
public const string DestinationLatitude = "DestinationLatitude";
|
||||
public const string DestinationLongitude = "DestinationLongitude";
|
||||
public const string Test = "Test";
|
||||
public const string ServiceProviderTitle = "ServiceProviderTitle";
|
||||
public const string ServiceProviderName = "ServiceProviderName";
|
||||
public const string ServiceProviderOwnerId = "ServiceProviderOwnerId";
|
||||
|
||||
public const string TransferTitle = "TransferTitle";
|
||||
public const string PickupAddress = "PickupAddress";
|
||||
public const string Destination = "Destination";
|
||||
public const string PickupTime = "PickupTime";
|
||||
public const string NumberOfPassengers = "NumberOfPassengers";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace TIAMWebApp.Shared.Application.Utility
|
|||
public static class TIAMRegularExpressions
|
||||
{
|
||||
|
||||
public const string EmailMask = "(\\w|[.-])+@(\\w|-)+\\.(\\w|-){2,4}";
|
||||
public const string EmailMask = @"(\w|[.-])+@(\w|-)+\.(\w|-){2,4}";
|
||||
public const string PhoneNumberMask = "\\+(9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*(\\d{1,2})";
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue