This commit is contained in:
Adam 2024-03-13 19:59:27 +01:00
parent b48d77e627
commit 481fefb7a1
9 changed files with 75 additions and 16 deletions

View File

@ -26,6 +26,8 @@ namespace TIAM.Entities.Transfers
//public PriceType PriceType { get; set; } //public PriceType PriceType { get; set; }
public double Price { get; set; } public double Price { get; set; }
public double Price2 { get; set; }
public double Price3 { get; set; }
//TEMPORARY!!! //TEMPORARY!!!
public string? AddressString { get; set; } public string? AddressString { get; set; }
@ -42,12 +44,12 @@ namespace TIAM.Entities.Transfers
Id = id; Id = id;
AddressString = addressString; AddressString = addressString;
} }
public TransferDestination(Guid id, string name, string addressString) : this(id, addressString) public TransferDestination(Guid id, string name, string addressString, double price, double price2, double price3) : this(id, addressString)
{ {
Name = name; Name = name;
} }
public TransferDestination(Guid id, string name, string description, string addressString) : this(id, name, addressString) public TransferDestination(Guid id, string name, string description, string addressString, double price, double price2, double price3) : this(id, name, addressString, price, price2, price3)
{ {
Description = description; Description = description;
} }

View File

@ -339,6 +339,24 @@ namespace TIAM.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Price 2.
/// </summary>
public static string Price2 {
get {
return ResourceManager.GetString("Price2", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Price 3.
/// </summary>
public static string Price3 {
get {
return ResourceManager.GetString("Price3", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Receiver Id. /// Looks up a localized string similar to Receiver Id.
/// </summary> /// </summary>

View File

@ -210,6 +210,12 @@
<data name="Price" xml:space="preserve"> <data name="Price" xml:space="preserve">
<value>Price</value> <value>Price</value>
</data> </data>
<data name="Price2" xml:space="preserve">
<value>Price 2</value>
</data>
<data name="Price3" xml:space="preserve">
<value>Price 3</value>
</data>
<data name="ReceiverId" xml:space="preserve"> <data name="ReceiverId" xml:space="preserve">
<value>Receiver Id</value> <value>Receiver Id</value>
</data> </data>

View File

@ -60,7 +60,9 @@
<DxGridDataColumn FieldName="Description" FixedPosition="GridColumnFixedPosition.Left" MinWidth="80" Width="20%" /> <DxGridDataColumn FieldName="Description" FixedPosition="GridColumnFixedPosition.Left" MinWidth="80" Width="20%" />
<DxGridDataColumn FieldName="AddressString" MinWidth="80" Width="20%" /> <DxGridDataColumn FieldName="AddressString" MinWidth="80" Width="20%" />
<DxGridDataColumn FieldName="PriceType" MinWidth="80" Width="20%" /> <DxGridDataColumn FieldName="PriceType" MinWidth="80" Width="20%" />
<DxGridDataColumn FieldName="Price" MinWidth="80" Width="20%" /> <DxGridDataColumn FieldName="Price" MinWidth="80" />
<DxGridDataColumn FieldName="Price2" MinWidth="80" />
<DxGridDataColumn FieldName="Price3" MinWidth="80" />
</Columns> </Columns>

View File

@ -176,7 +176,7 @@ namespace TIAMSharedUI.Pages.User.SysAdmins
{ {
//add new transferwizardmodel to transferData array //add new transferwizardmodel to transferData array
TransferDataFromDb = ((TransferDestinationWizardModel[])TransferDataFromDb).Append( TransferDataFromDb = ((TransferDestinationWizardModel[])TransferDataFromDb).Append(
new TransferDestinationWizardModel(item.Id, item.Name, item.Description, item.AddressString, item.Price, item.PriceType, item.Address)).ToArray(); new TransferDestinationWizardModel(item.Id, item.Name, item.Description, item.AddressString, item.Price, item.Price2, item.Price3, item.Address)).ToArray();
logToBrowserConsole.LogToBC($"TransferDataFromDb: {item.Name}"); logToBrowserConsole.LogToBC($"TransferDataFromDb: {item.Name}");
} }

View File

@ -174,6 +174,12 @@
<data name="NavMenu.Transfer" xml:space="preserve"> <data name="NavMenu.Transfer" xml:space="preserve">
<value>Transzfer</value> <value>Transzfer</value>
</data> </data>
<data name="Price2" xml:space="preserve">
<value>Ár 2</value>
</data>
<data name="Price3" xml:space="preserve">
<value>Ár 3</value>
</data>
<data name="RegisterRegister" xml:space="preserve"> <data name="RegisterRegister" xml:space="preserve">
<value>Regisztráció</value> <value>Regisztráció</value>
</data> </data>

View File

@ -52,7 +52,19 @@ namespace TIAMWebApp.Server.Controllers
[Route(APIUrls.GetTransferDestinationsRouteName)] [Route(APIUrls.GetTransferDestinationsRouteName)]
public async Task<IEnumerable<TransferDestination>> GetTransferDestinations() public async Task<IEnumerable<TransferDestination>> GetTransferDestinations()
{ {
return await _transferDestinationDal.Context.TransferDestinations.ToListAsync(); var transferDestinations = await _adminDal.Context.TransferDestinations.ToListAsync();
foreach (var transferDestination in transferDestinations)
{
Console.WriteLine($"TransferDestination: {transferDestination.Id}");
Console.WriteLine($"TransferDestination: {transferDestination.AddressId}");
Console.WriteLine($"TransferDestination: {transferDestination.Name}");
Console.WriteLine($"TransferDestination: {transferDestination.Price}");
Console.WriteLine($"TransferDestination: {transferDestination.Price2}");
Console.WriteLine($"TransferDestination: {transferDestination.Price3}");
Console.WriteLine($"TransferDestination: {transferDestination.AddressString}");
Console.WriteLine($"TransferDestination: {transferDestination.Description}");
}
return transferDestinations;
} }
[AllowAnonymous] [AllowAnonymous]
@ -104,7 +116,7 @@ namespace TIAMWebApp.Server.Controllers
Console.WriteLine($"TransferDestination to be created: {transferDestination.Price}"); Console.WriteLine($"TransferDestination to be created: {transferDestination.Price}");
//Console.WriteLine($"TransferDestination to be created: {transferDestination.Price2}"); //Console.WriteLine($"TransferDestination to be created: {transferDestination.Price2}");
//Console.WriteLine($"TransferDestination to be created: {transferDestination.Price3}"); //Console.WriteLine($"TransferDestination to be created: {transferDestination.Price3}");
Console.WriteLine($"TransferDestination to be created: {transferDestination.PriceType}"); //Console.WriteLine($"TransferDestination to be created: {transferDestination.PriceType}");
Console.WriteLine($"TransferDestination to be created: {transferDestination.AddressString}"); Console.WriteLine($"TransferDestination to be created: {transferDestination.AddressString}");
Console.WriteLine($"TransferDestination to be created: {transferDestination.Description}"); Console.WriteLine($"TransferDestination to be created: {transferDestination.Description}");
@ -160,9 +172,9 @@ namespace TIAMWebApp.Server.Controllers
Console.WriteLine($"TransferDestination to be updated: {transferDestination.Id}"); Console.WriteLine($"TransferDestination to be updated: {transferDestination.Id}");
Console.WriteLine($"TransferDestination to be updated new name: {transferDestination.Name}"); Console.WriteLine($"TransferDestination to be updated new name: {transferDestination.Name}");
Console.WriteLine($"TransferDestination to be updated new price: {transferDestination.Price}"); Console.WriteLine($"TransferDestination to be updated new price: {transferDestination.Price}");
//Console.WriteLine($"TransferDestination to be updated new price: {transferDestination.Price2}"); Console.WriteLine($"TransferDestination to be updated new price: {transferDestination.Price2}");
//Console.WriteLine($"TransferDestination to be updated new price: {transferDestination.Price3}"); Console.WriteLine($"TransferDestination to be updated new price: {transferDestination.Price3}");
Console.WriteLine($"TransferDestination to be updated new priceType: {transferDestination.PriceType}"); //Console.WriteLine($"TransferDestination to be updated new priceType: {transferDestination.PriceType}");
Console.WriteLine($"TransferDestination to be updated new address: {transferDestination.AddressString}"); Console.WriteLine($"TransferDestination to be updated new address: {transferDestination.AddressString}");
Console.WriteLine($"TransferDestination to be updated new description: {transferDestination.Description}"); Console.WriteLine($"TransferDestination to be updated new description: {transferDestination.Description}");

View File

@ -42,7 +42,16 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
[DataType("Price")] [DataType("Price")]
[Display(Name = ResourceKeys.Price, ResourceType = typeof(TIAMResources))] [Display(Name = ResourceKeys.Price, ResourceType = typeof(TIAMResources))]
public double Price { get; set; } public double Price { get; set; }
[Required(ErrorMessage = "The price should be specified.")]
[DataType("Price")]
[Display(Name = ResourceKeys.Price, ResourceType = typeof(TIAMResources))]
public double Price2 { get; set; }
[Required(ErrorMessage = "The price should be specified.")]
[DataType("Price")]
[Display(Name = ResourceKeys.Price, ResourceType = typeof(TIAMResources))]
public double Price3 { get; set; }
public PriceType PriceType { get; set; } public PriceType PriceType { get; set; }
public Address Address { get; set; } public Address Address { get; set; }
@ -57,9 +66,9 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
public TransferDestinationWizardModel() { } public TransferDestinationWizardModel() { }
public TransferDestinationWizardModel(string name, string description, string addressString, double price, PriceType priceType, Address address) :this(Guid.NewGuid(), name, description, addressString, price, priceType, address) public TransferDestinationWizardModel(string name, string description, string addressString, double price, double price2, double price3, Address address) :this(Guid.NewGuid(), name, description, addressString, price, price2, price3, address)
{ } { }
public TransferDestinationWizardModel(Guid id, string name, string description, string addressString, double price, PriceType priceType, Address address) public TransferDestinationWizardModel(Guid id, string name, string description, string addressString, double price, double price2, double price3, Address address)
{ {
Id = id.ToString(); Id = id.ToString();
@ -67,7 +76,9 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
Description = description; Description = description;
AddressString = addressString; AddressString = addressString;
Price = price; Price = price;
PriceType = priceType; Price2 = price2;
Price3 = price3;
//PriceType = priceType;
Address = address; Address = address;
} }
@ -81,9 +92,9 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
destination.Description = model.Description; destination.Description = model.Description;
destination.AddressString = model.AddressString; destination.AddressString = model.AddressString;
destination.Price = model.Price; destination.Price = model.Price;
//destination.Price2 = model.Price; destination.Price2 = model.Price2;
//destination.Price3 = model.Price; destination.Price3 = model.Price3;
destination.PriceType = model.PriceType; //destination.PriceType = model.PriceType;
destination.Address = model.Address; destination.Address = model.Address;
if (destination.Address == null) if (destination.Address == null)

View File

@ -22,6 +22,8 @@
public const string ConfirmPasswordReset = "ConfirmPasswordReset"; public const string ConfirmPasswordReset = "ConfirmPasswordReset";
public const string ConfirmEmail = "ConfirmEmail"; public const string ConfirmEmail = "ConfirmEmail";
public const string Price = "Price"; public const string Price = "Price";
public const string Price2 = "Price 2";
public const string Price3 = "Price 3";
public const string Driver = "Driver"; public const string Driver = "Driver";
//wizard //wizard