diff --git a/TIAM.Entities/Transfers/TransferDestination.cs b/TIAM.Entities/Transfers/TransferDestination.cs
index 92b530c6..59e6ef16 100644
--- a/TIAM.Entities/Transfers/TransferDestination.cs
+++ b/TIAM.Entities/Transfers/TransferDestination.cs
@@ -26,6 +26,8 @@ namespace TIAM.Entities.Transfers
//public PriceType PriceType { get; set; }
public double Price { get; set; }
+ public double Price2 { get; set; }
+ public double Price3 { get; set; }
//TEMPORARY!!!
public string? AddressString { get; set; }
@@ -42,12 +44,12 @@ namespace TIAM.Entities.Transfers
Id = id;
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;
}
- 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;
}
diff --git a/TIAMResources/TIAMResources.Designer.cs b/TIAMResources/TIAMResources.Designer.cs
index 1d32329c..a1080ab0 100644
--- a/TIAMResources/TIAMResources.Designer.cs
+++ b/TIAMResources/TIAMResources.Designer.cs
@@ -339,6 +339,24 @@ namespace TIAM.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Price 2.
+ ///
+ public static string Price2 {
+ get {
+ return ResourceManager.GetString("Price2", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Price 3.
+ ///
+ public static string Price3 {
+ get {
+ return ResourceManager.GetString("Price3", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Receiver Id.
///
diff --git a/TIAMResources/TIAMResources.resx b/TIAMResources/TIAMResources.resx
index 525a9471..7ecef8c6 100644
--- a/TIAMResources/TIAMResources.resx
+++ b/TIAMResources/TIAMResources.resx
@@ -210,6 +210,12 @@
Price
+
+ Price 2
+
+
+ Price 3
+
Receiver Id
diff --git a/TIAMSharedUI/Pages/User/SysAdmins/TransferDestinations.razor b/TIAMSharedUI/Pages/User/SysAdmins/TransferDestinations.razor
index 548d6d51..14df84f3 100644
--- a/TIAMSharedUI/Pages/User/SysAdmins/TransferDestinations.razor
+++ b/TIAMSharedUI/Pages/User/SysAdmins/TransferDestinations.razor
@@ -60,7 +60,9 @@
-
+
+
+
diff --git a/TIAMSharedUI/Pages/User/SysAdmins/TransferDestinations.razor.cs b/TIAMSharedUI/Pages/User/SysAdmins/TransferDestinations.razor.cs
index 98f7583d..641ed50e 100644
--- a/TIAMSharedUI/Pages/User/SysAdmins/TransferDestinations.razor.cs
+++ b/TIAMSharedUI/Pages/User/SysAdmins/TransferDestinations.razor.cs
@@ -176,7 +176,7 @@ namespace TIAMSharedUI.Pages.User.SysAdmins
{
//add new transferwizardmodel to transferData array
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}");
}
diff --git a/TIAMSharedUI/Resources/MyResources.hu.resx b/TIAMSharedUI/Resources/MyResources.hu.resx
index c2e98cb4..f6f9f667 100644
--- a/TIAMSharedUI/Resources/MyResources.hu.resx
+++ b/TIAMSharedUI/Resources/MyResources.hu.resx
@@ -174,6 +174,12 @@
Transzfer
+
+ Ár 2
+
+
+ Ár 3
+
Regisztráció
diff --git a/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs b/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs
index 134ee884..c815ab7d 100644
--- a/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs
+++ b/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs
@@ -52,7 +52,19 @@ namespace TIAMWebApp.Server.Controllers
[Route(APIUrls.GetTransferDestinationsRouteName)]
public async Task> 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]
@@ -104,7 +116,7 @@ namespace TIAMWebApp.Server.Controllers
Console.WriteLine($"TransferDestination to be created: {transferDestination.Price}");
//Console.WriteLine($"TransferDestination to be created: {transferDestination.Price2}");
//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.Description}");
@@ -160,9 +172,9 @@ namespace TIAMWebApp.Server.Controllers
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 price: {transferDestination.Price}");
- //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 priceType: {transferDestination.PriceType}");
+ 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 priceType: {transferDestination.PriceType}");
Console.WriteLine($"TransferDestination to be updated new address: {transferDestination.AddressString}");
Console.WriteLine($"TransferDestination to be updated new description: {transferDestination.Description}");
diff --git a/TIAMWebApp/Shared/Models/ClientSide/UI/WizardModels/TransferDestinationWizardModel.cs b/TIAMWebApp/Shared/Models/ClientSide/UI/WizardModels/TransferDestinationWizardModel.cs
index a2d29a81..af8caf35 100644
--- a/TIAMWebApp/Shared/Models/ClientSide/UI/WizardModels/TransferDestinationWizardModel.cs
+++ b/TIAMWebApp/Shared/Models/ClientSide/UI/WizardModels/TransferDestinationWizardModel.cs
@@ -42,7 +42,16 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
[DataType("Price")]
[Display(Name = ResourceKeys.Price, ResourceType = typeof(TIAMResources))]
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 Address Address { get; set; }
@@ -57,9 +66,9 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
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();
@@ -67,7 +76,9 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
Description = description;
AddressString = addressString;
Price = price;
- PriceType = priceType;
+ Price2 = price2;
+ Price3 = price3;
+ //PriceType = priceType;
Address = address;
}
@@ -81,9 +92,9 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
destination.Description = model.Description;
destination.AddressString = model.AddressString;
destination.Price = model.Price;
- //destination.Price2 = model.Price;
- //destination.Price3 = model.Price;
- destination.PriceType = model.PriceType;
+ destination.Price2 = model.Price2;
+ destination.Price3 = model.Price3;
+ //destination.PriceType = model.PriceType;
destination.Address = model.Address;
if (destination.Address == null)
diff --git a/TIAMWebApp/Shared/Utility/ResourceKeys.cs b/TIAMWebApp/Shared/Utility/ResourceKeys.cs
index b31e631b..3b7e47fe 100644
--- a/TIAMWebApp/Shared/Utility/ResourceKeys.cs
+++ b/TIAMWebApp/Shared/Utility/ResourceKeys.cs
@@ -22,6 +22,8 @@
public const string ConfirmPasswordReset = "ConfirmPasswordReset";
public const string ConfirmEmail = "ConfirmEmail";
public const string Price = "Price";
+ public const string Price2 = "Price 2";
+ public const string Price3 = "Price 3";
public const string Driver = "Driver";
//wizard