Merge branch 'master' of http://git2.aycode.com/Adam/TourIAm
This commit is contained in:
commit
1d88ab484f
|
|
@ -13,6 +13,7 @@ public static class TiamConstClient
|
|||
Guid.Parse("4cbaed43-2465-4d99-84f1-c8bc6b7025f7"),
|
||||
Guid.Parse("540271f6-c604-4c16-8160-d5a7cafedf00")
|
||||
};
|
||||
public static string SystemEmailAddress = "system@touriam.com";
|
||||
#if RELEASE
|
||||
public static LogLevel DefaultLogLevelClient = LogLevel.Debug;
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -150,6 +150,15 @@ namespace TIAM.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Commission.
|
||||
/// </summary>
|
||||
public static string Commission {
|
||||
get {
|
||||
return ResourceManager.GetString("Commission", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirm Email.
|
||||
/// </summary>
|
||||
|
|
@ -249,6 +258,15 @@ namespace TIAM.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Additional fee.
|
||||
/// </summary>
|
||||
public static string ExtraPrice {
|
||||
get {
|
||||
return ResourceManager.GetString("ExtraPrice", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flight or train number.
|
||||
/// </summary>
|
||||
|
|
@ -547,7 +565,7 @@ namespace TIAM.Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Price.
|
||||
/// Looks up a localized string similar to Price for 1-4.
|
||||
/// </summary>
|
||||
public static string Price {
|
||||
get {
|
||||
|
|
@ -556,7 +574,7 @@ namespace TIAM.Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Price 2.
|
||||
/// Looks up a localized string similar to Price for 5-6.
|
||||
/// </summary>
|
||||
public static string Price2 {
|
||||
get {
|
||||
|
|
@ -565,7 +583,7 @@ namespace TIAM.Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Price 3.
|
||||
/// Looks up a localized string similar to Price for 7-8.
|
||||
/// </summary>
|
||||
public static string Price3 {
|
||||
get {
|
||||
|
|
|
|||
|
|
@ -147,6 +147,9 @@
|
|||
<data name="Comment" xml:space="preserve">
|
||||
<value>Megjegyzés</value>
|
||||
</data>
|
||||
<data name="Commission" xml:space="preserve">
|
||||
<value>Árrés</value>
|
||||
</data>
|
||||
<data name="ConfirmEmail" xml:space="preserve">
|
||||
<value>E-mail cím megerősítése</value>
|
||||
</data>
|
||||
|
|
@ -180,6 +183,9 @@
|
|||
<data name="EmailAddress" xml:space="preserve">
|
||||
<value>E-mail</value>
|
||||
</data>
|
||||
<data name="ExtraPrice" xml:space="preserve">
|
||||
<value>Extra költség</value>
|
||||
</data>
|
||||
<data name="FlightNumber" xml:space="preserve">
|
||||
<value>Járatszám</value>
|
||||
</data>
|
||||
|
|
@ -280,13 +286,13 @@
|
|||
<value>Indulási idő</value>
|
||||
</data>
|
||||
<data name="Price" xml:space="preserve">
|
||||
<value>Ár</value>
|
||||
<value>Ár 1-4</value>
|
||||
</data>
|
||||
<data name="Price2" xml:space="preserve">
|
||||
<value>Ár 2</value>
|
||||
<value>Ár 5-6</value>
|
||||
</data>
|
||||
<data name="Price3" xml:space="preserve">
|
||||
<value>Ár 3</value>
|
||||
<value>Ár 7-8</value>
|
||||
</data>
|
||||
<data name="ReceiverId" xml:space="preserve">
|
||||
<value>Címzett azonosítója</value>
|
||||
|
|
|
|||
|
|
@ -147,6 +147,9 @@
|
|||
<data name="Comment" xml:space="preserve">
|
||||
<value>Comment</value>
|
||||
</data>
|
||||
<data name="Commission" xml:space="preserve">
|
||||
<value>Commission</value>
|
||||
</data>
|
||||
<data name="ConfirmEmail" xml:space="preserve">
|
||||
<value>Confirm Email</value>
|
||||
</data>
|
||||
|
|
@ -180,6 +183,9 @@
|
|||
<data name="EmailAddress" xml:space="preserve">
|
||||
<value>Email</value>
|
||||
</data>
|
||||
<data name="ExtraPrice" xml:space="preserve">
|
||||
<value>Additional fee</value>
|
||||
</data>
|
||||
<data name="FlightNumber" xml:space="preserve">
|
||||
<value>Flight or train number</value>
|
||||
</data>
|
||||
|
|
@ -280,13 +286,13 @@
|
|||
<value>Pick up time</value>
|
||||
</data>
|
||||
<data name="Price" xml:space="preserve">
|
||||
<value>Price</value>
|
||||
<value>Price for 1-4</value>
|
||||
</data>
|
||||
<data name="Price2" xml:space="preserve">
|
||||
<value>Price 2</value>
|
||||
<value>Price for 5-6</value>
|
||||
</data>
|
||||
<data name="Price3" xml:space="preserve">
|
||||
<value>Price 3</value>
|
||||
<value>Price for 7-8</value>
|
||||
</data>
|
||||
<data name="ReceiverId" xml:space="preserve">
|
||||
<value>Receiver Id</value>
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
<DxGridDataColumn FieldName="PassengerCount" Caption="Passengers" Width="90" TextAlignment="GridTextAlignment.Center" CaptionAlignment="GridTextAlignment.Center" />
|
||||
<DxGridDataColumn FieldName="LuggageCount" Caption="Luggages" Width="80" TextAlignment="GridTextAlignment.Center" CaptionAlignment="GridTextAlignment.Center" />
|
||||
<DxGridDataColumn FieldName="FlightNumber" Caption="FlightNum" Width="95" TextAlignment="GridTextAlignment.Center" CaptionAlignment="GridTextAlignment.Center" />
|
||||
<DxGridDataColumn FieldName="Price" Caption="Price" Width="70" CaptionAlignment="GridTextAlignment.Center" />
|
||||
|
||||
<DxGridDataColumn FieldName="FullName" />
|
||||
<DxGridDataColumn FieldName="ContactPhone" Width="120" />
|
||||
<DxGridDataColumn FieldName="ContactEmail" Width="120">
|
||||
|
|
|
|||
|
|
@ -22,12 +22,7 @@
|
|||
|
||||
<Animation Effect="@Effect.FadeInUp" Class="glass" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||
<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>
|
||||
|
||||
<TransferDestinationGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto" GetAllTag="SignalRTags.GetAllTransferDestinations"></TransferDestinationGridComponent>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using TIAMWebApp.Shared.Application.Interfaces;
|
|||
using Microsoft.AspNetCore.Components;
|
||||
using TIAMWebApp.Shared.Application.Utility;
|
||||
using AyCode.Services.Loggers;
|
||||
using TIAM.Entities.Addresses;
|
||||
|
||||
namespace TIAMSharedUI.Pages.User.SysAdmins
|
||||
{
|
||||
|
|
@ -74,15 +75,9 @@ namespace TIAMSharedUI.Pages.User.SysAdmins
|
|||
// throw new NotImplementedException();
|
||||
//}
|
||||
|
||||
void Grid_CustomizeEditModel(GridCustomizeEditModelEventArgs e)
|
||||
async void Grid_CustomizeEditModel(GridCustomizeEditModelEventArgs e)
|
||||
{
|
||||
if (!e.IsNew) return;
|
||||
|
||||
var newDestination = (TransferDestinationWizardModel)e.EditModel;
|
||||
newDestination.Id = Guid.NewGuid().ToString();
|
||||
newDestination.Name = "Destination name";
|
||||
newDestination.Description = "Type some description here";
|
||||
newDestination.AddressString = "The address of the destination";
|
||||
|
||||
}
|
||||
|
||||
void Grid_CustomizeElement(GridCustomizeElementEventArgs e)
|
||||
|
|
@ -90,73 +85,8 @@ namespace TIAMSharedUI.Pages.User.SysAdmins
|
|||
|
||||
}
|
||||
|
||||
async Task Grid_EditModelSaving(GridEditModelSavingEventArgs e)
|
||||
{
|
||||
var transferDestinationWizardModel = (TransferDestinationWizardModel)e.EditModel;
|
||||
|
||||
|
||||
if (e.IsNew)
|
||||
{
|
||||
await TransferDataService.CreateTransferDestination(TransferDestinationWizardModel.CopyToTransferDestination(transferDestinationWizardModel));
|
||||
//await transferDataService.CreateTransferDestination(new TransferDestination
|
||||
/*{
|
||||
Id = Guid.NewGuid(),
|
||||
Name = myModel.Name,
|
||||
Description = myModel.Description,
|
||||
AddressString = myModel.AddressString,
|
||||
Price = myModel.Price,
|
||||
PriceType = myModel.PriceType
|
||||
});*/
|
||||
_logger.Info("New orderData added");
|
||||
|
||||
//add mymodel to transferData array
|
||||
_transferDestinationWizardModels.Add(transferDestinationWizardModel);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.Info("orderData updated");
|
||||
//modify transferData where transferData.Id == e.EditModel.Id
|
||||
//get transfer from TransferData by Id
|
||||
|
||||
//var abg = ((TransferDestinationWizardModel[])TransferDataFromDb).Length;
|
||||
|
||||
foreach (var transferToModify in _transferDestinationWizardModels)
|
||||
{
|
||||
if (transferToModify.Id != transferDestinationWizardModel.Id)
|
||||
continue;
|
||||
|
||||
transferToModify.Id = transferDestinationWizardModel.Id;
|
||||
transferToModify.Name = transferDestinationWizardModel.Name;
|
||||
transferToModify.Description = transferDestinationWizardModel.Description;
|
||||
transferToModify.AddressString = transferDestinationWizardModel.AddressString;
|
||||
transferToModify.Price = transferDestinationWizardModel.Price;
|
||||
transferToModify.PriceType = transferDestinationWizardModel.PriceType;
|
||||
|
||||
await TransferDataService.UpdateTransferDestination(TransferDestinationWizardModel.CopyToTransferDestination(transferToModify));
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: ne a teljes grid-et refresh-eljük, elég lenne csak az adott sort! - J.
|
||||
await UpdateDataAsync();
|
||||
}
|
||||
|
||||
async Task Grid_DataItemDeleting(GridDataItemDeletingEventArgs e)
|
||||
{
|
||||
//remove orderData from orderData array
|
||||
_logger.Info("orderData deleted");
|
||||
|
||||
//var transferDestinationWizardModel = (TransferDestinationWizardModel)e.DataItem;
|
||||
//await TransferDataService.CreateTransferDestination(TransferDestinationWizardModel.CopyToTransferDestination(transferDestinationWizardModel));
|
||||
//await UpdateDataAsync();
|
||||
}
|
||||
|
||||
async Task UpdateDataAsync()
|
||||
{
|
||||
//await TransferDataService.GetDestinationsAsync();
|
||||
//refresh grid
|
||||
|
||||
await FillGridDataSource();
|
||||
_logger.Info("orderData grid refreshed");
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
|
@ -164,26 +94,9 @@ namespace TIAMSharedUI.Pages.User.SysAdmins
|
|||
|
||||
_logger = new LoggerClient<ManageTransferDestinations>(LogWriters.ToArray());
|
||||
|
||||
await FillGridDataSource();
|
||||
//await FillGridDataSource();
|
||||
}
|
||||
|
||||
private async Task FillGridDataSource()
|
||||
{
|
||||
var destinations = await TransferDataService.GetDestinationsAsync();
|
||||
|
||||
foreach (var item in destinations)
|
||||
{
|
||||
_transferDestinationWizardModels.Add(new TransferDestinationWizardModel(item.Id, item.Name, item.Description, item.AddressString, item.Price, item.Price2, item.Price3, item.Address));
|
||||
|
||||
_logger.DetailConditional($"_transferDestinationWizardModels add: {item.Name}");
|
||||
}
|
||||
|
||||
_logger.Info($"_transferDestinationWizardModels: {_transferDestinationWizardModels.Count}");
|
||||
}
|
||||
|
||||
void ColumnChooserButton_Click()
|
||||
{
|
||||
Grid.ShowColumnChooser();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
@using TIAM.Entities.Transfers
|
||||
@using TIAM.Entities.Addresses
|
||||
@using TIAM.Entities.Transfers
|
||||
@using TIAM.Entities.Drivers
|
||||
@using TIAM.Models.Dtos.Users
|
||||
@using TIAM.Resources
|
||||
|
|
@ -66,7 +67,7 @@
|
|||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.DestinationName) ColSpanMd="6">
|
||||
@editFormContext.GetEditor("Name")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Destination) ColSpanMd="6">
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.DestinationInfo) ColSpanMd="6">
|
||||
@editFormContext.GetEditor("Description")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.DestinationAddress) ColSpanMd="6">
|
||||
|
|
@ -75,13 +76,13 @@
|
|||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
@editFormContext.GetEditor("Price")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price2) ColSpanMd="6">
|
||||
@editFormContext.GetEditor("Price2")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price3) ColSpanMd="6">
|
||||
@editFormContext.GetEditor("Price3")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Commission) ColSpanMd="6">
|
||||
@editFormContext.GetEditor("ProductCommis")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption=@localizer.GetString(ResourceKeys.Price) ColSpanMd="6">
|
||||
|
|
@ -112,9 +113,12 @@
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void DataItemSaving(GridEditModelSavingEventArgs obj)
|
||||
{
|
||||
_logger.Debug($"DataItemSaving");
|
||||
|
||||
}
|
||||
|
||||
private void DataItemDeleting(GridDataItemDeletingEventArgs obj)
|
||||
|
|
@ -126,6 +130,15 @@
|
|||
{
|
||||
if (!e.IsNew) return;
|
||||
|
||||
var newDestination = (TransferDestination)e.EditModel;
|
||||
newDestination.Id = Guid.NewGuid();
|
||||
newDestination.Name = "Destination name";
|
||||
newDestination.Description = "Type some description here";
|
||||
newDestination.AddressString = "The address of the destination";
|
||||
Guid addressId = Guid.NewGuid();
|
||||
newDestination.Address = new Address();
|
||||
newDestination.Address.Id = addressId;
|
||||
newDestination.Address.AddressText = newDestination.AddressString;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -35,7 +35,6 @@
|
|||
<DxMenuItem NavigateUrl="@url2" Text="My cars" />
|
||||
}
|
||||
|
||||
<DxMenuItem NavigateUrl="sysadmin/users" Text="Users" />
|
||||
</Items>
|
||||
</DxMenuItem>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
},
|
||||
"SendGrid": {
|
||||
//"Key": "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"
|
||||
//"Key": "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" //TourIAm App, ID: 0uh-dfhGRjCzaFZHjFccYQ
|
||||
"Key": "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"
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,10 @@
|
|||
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 Price2 = "Price2";
|
||||
public const string Price3 = "Price3";
|
||||
public const string ExtraPrice = "ExtraPrice";
|
||||
public const string Commission = "Commission";
|
||||
public const string Driver = "Driver";
|
||||
|
||||
//wizard
|
||||
|
|
|
|||
Loading…
Reference in New Issue