improvements, fixes, etc...
This commit is contained in:
parent
3604bdbc30
commit
ffb0187395
|
|
@ -91,18 +91,21 @@ namespace TIAM.Database.DataLayers.Admins
|
||||||
public async Task<TransferToDriver?> UpdateTransferToDriverAsync(TransferToDriver transferToDriver)
|
public async Task<TransferToDriver?> UpdateTransferToDriverAsync(TransferToDriver transferToDriver)
|
||||||
{
|
{
|
||||||
var transferToDriverId = transferToDriver.Id;
|
var transferToDriverId = transferToDriver.Id;
|
||||||
|
TransferToDriver transferToDriver2 = null!;
|
||||||
|
|
||||||
var result = await TransactionAsync(ctx =>
|
var result = await TransactionAsync(ctx =>
|
||||||
{
|
{
|
||||||
var transferToDriver2 = ctx.TransferToDrivers.FirstOrDefault(x => x.Id == transferToDriverId)!;
|
transferToDriver2 = ctx.TransferToDrivers.FirstOrDefault(x => x.Id == transferToDriverId)!;
|
||||||
transferToDriver2.CarId = transferToDriver.CarId;
|
transferToDriver2.CarId = transferToDriver.CarId;
|
||||||
transferToDriver2.LicencePlate = transferToDriver.LicencePlate;
|
transferToDriver2.LicencePlate = transferToDriver.LicencePlate;
|
||||||
transferToDriver2.UserProductMappingId = transferToDriver.UserProductMappingId;
|
transferToDriver2.UserProductMappingId = transferToDriver.UserProductMappingId;
|
||||||
transferToDriver2.TransferId = transferToDriver.TransferId;
|
transferToDriver2.TransferId = transferToDriver.TransferId;
|
||||||
|
transferToDriver2.Price = transferToDriver.Price;
|
||||||
|
|
||||||
return ctx.TransferToDrivers.Update(transferToDriver2).State == EntityState.Modified;
|
return ctx.TransferToDrivers.Update(transferToDriver2).State == EntityState.Modified;
|
||||||
});
|
});
|
||||||
|
|
||||||
return result ? transferToDriver : null;
|
return result ? transferToDriver2 : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<bool> RemoveTransferToDriverAsync(TransferToDriver transferToDriver) => TransactionAsync(ctx => ctx.RemoveTransferToDriver(transferToDriver.Id));
|
public Task<bool> RemoveTransferToDriverAsync(TransferToDriver transferToDriver) => TransactionAsync(ctx => ctx.RemoveTransferToDriver(transferToDriver.Id));
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using AyCode.Interfaces;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using AyCode.Interfaces;
|
||||||
using AyCode.Models.Users;
|
using AyCode.Models.Users;
|
||||||
using TIAM.Entities.Products;
|
using TIAM.Entities.Products;
|
||||||
using TIAM.Entities.Profiles;
|
using TIAM.Entities.Profiles;
|
||||||
|
|
@ -7,11 +9,20 @@ using TIAM.Entities.Users;
|
||||||
|
|
||||||
namespace TIAM.Models.Dtos.Users;
|
namespace TIAM.Models.Dtos.Users;
|
||||||
|
|
||||||
public class UserModelDto : AcUserModelDtoBase<UserDto, Profile, Company, UserToCompany>, IProductsRelation, IUserModelDtoMinBase, IAcModelDtoBase<User>
|
public class UserModelDto : AcUserModelDtoBase<UserDto, Profile, Company, UserToCompany>, IProductsRelation, IUserModelDtoMinBase, IAcModelDtoBase<User>, IProfileForeignKey
|
||||||
{
|
{
|
||||||
public List<UserProductMapping> UserProductMappings { get; set; }
|
public List<UserProductMapping> UserProductMappings { get; set; }
|
||||||
public List<Product> Products { get; set; }
|
public List<Product> Products { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
[JsonIgnore]
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
public Guid ProfileId
|
||||||
|
{
|
||||||
|
get => ProfileDto.Id;
|
||||||
|
set => ProfileDto.Id = value;
|
||||||
|
}
|
||||||
|
|
||||||
public UserModelDto(){}
|
public UserModelDto(){}
|
||||||
public UserModelDto(User user) : base(user)
|
public UserModelDto(User user) : base(user)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
using AyCode.Models.Users;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using AyCode.Interfaces.TimeStampInfo;
|
||||||
|
using AyCode.Models.Users;
|
||||||
using TIAM.Entities.Addresses;
|
using TIAM.Entities.Addresses;
|
||||||
using TIAM.Entities.Products;
|
using TIAM.Entities.Products;
|
||||||
using TIAM.Entities.Profiles;
|
using TIAM.Entities.Profiles;
|
||||||
|
|
@ -9,15 +12,18 @@ namespace TIAM.Models.Dtos.Users
|
||||||
{
|
{
|
||||||
public class UserModelDtoDetail : AcUserModelDtoDetailBase<UserDtoDetail, Profile, Company, UserToCompany, Address>, IProductsRelation, IUserModelDtoMinBase, IProfileForeignKey
|
public class UserModelDtoDetail : AcUserModelDtoDetailBase<UserDtoDetail, Profile, Company, UserToCompany, Address>, IProductsRelation, IUserModelDtoMinBase, IProfileForeignKey
|
||||||
{
|
{
|
||||||
|
public List<UserProductMapping> UserProductMappings { get; set; }
|
||||||
|
public List<Product> Products { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
[JsonIgnore]
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
public Guid ProfileId
|
public Guid ProfileId
|
||||||
{
|
{
|
||||||
get => ProfileDto.Id;
|
get => ProfileDto.Id;
|
||||||
set {}
|
set => ProfileDto.Id = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<UserProductMapping> UserProductMappings { get; set; }
|
|
||||||
public List<Product> Products { get; set; }
|
|
||||||
|
|
||||||
public UserModelDtoDetail()
|
public UserModelDtoDetail()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,14 @@
|
||||||
DetailExpandButtonDisplayMode="DetailExpandButtonDisplayMode">
|
DetailExpandButtonDisplayMode="DetailExpandButtonDisplayMode">
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="false" Width="70" MinWidth="70" FixedPosition="GridColumnFixedPosition.Left" />
|
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="false" Width="70" MinWidth="70" FixedPosition="GridColumnFixedPosition.Left" />
|
||||||
<DxGridDataColumn FieldName="Id" GroupIndex="0" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||||
<DxGridDataColumn FieldName="AddressText" />
|
<DxGridDataColumn FieldName="AddressText" />
|
||||||
<DxGridDataColumn FieldName="IsValid" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
<DxGridDataColumn FieldName="IsValid" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
||||||
<DxGridDataColumn FieldName="IsHelper" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
<DxGridDataColumn FieldName="IsHelper" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
||||||
<DxGridDataColumn FieldName="Latitude" Width="40" />
|
<DxGridDataColumn FieldName="Latitude" Width="40" />
|
||||||
<DxGridDataColumn FieldName="Longitude" Width="40" />
|
<DxGridDataColumn FieldName="Longitude" Width="40" />
|
||||||
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" />
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<EditFormTemplate>
|
<EditFormTemplate>
|
||||||
@{
|
@{
|
||||||
|
|
|
||||||
|
|
@ -14,28 +14,28 @@
|
||||||
@using AyCode.Core
|
@using AyCode.Core
|
||||||
@inject IServiceProviderDataService serviceProviderDataService
|
@inject IServiceProviderDataService serviceProviderDataService
|
||||||
@inject IUserDataService userDataService
|
@inject IUserDataService userDataService
|
||||||
@inject ITransferDataService transferDataService
|
@inject ITransferDataService transferDataService
|
||||||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||||
|
|
||||||
|
|
||||||
<AddressGrid @ref="Grid" Data="_detailGridData"
|
<AddressGrid @ref="Grid" Data="_detailGridData"
|
||||||
PageSize="5"
|
PageSize="5"
|
||||||
ValidationEnabled="false"
|
ValidationEnabled="false"
|
||||||
CustomizeEditModel="CustomizeEditModel"
|
CustomizeEditModel="CustomizeEditModel"
|
||||||
EditMode="GridEditMode.EditForm"
|
EditMode="GridEditMode.EditForm"
|
||||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||||
ShowFilterRow="true">
|
ShowFilterRow="true">
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="false" Width="70" MinWidth="70" FixedPosition="GridColumnFixedPosition.Left" />
|
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="false" Width="70" MinWidth="70" FixedPosition="GridColumnFixedPosition.Left" />
|
||||||
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
||||||
<DxGridDataColumn FieldName="AddressText" />
|
<DxGridDataColumn FieldName="AddressText" />
|
||||||
<DxGridDataColumn FieldName="IsValid" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
<DxGridDataColumn FieldName="IsValid" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
||||||
<DxGridDataColumn FieldName="IsHelper" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
<DxGridDataColumn FieldName="IsHelper" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
||||||
<DxGridDataColumn FieldName="Latitude" Width="40"/>
|
<DxGridDataColumn FieldName="Latitude" Width="40" />
|
||||||
<DxGridDataColumn FieldName="Longitude" Width="40"/>
|
<DxGridDataColumn FieldName="Longitude" Width="40" />
|
||||||
<DxGridDataColumn FieldName="Created" Width="40"/>
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
<DxGridDataColumn FieldName="Modified" Width="40"/>
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<EditFormTemplate>
|
<EditFormTemplate>
|
||||||
@{
|
@{
|
||||||
Address bleh = (Address)context.EditModel;
|
Address bleh = (Address)context.EditModel;
|
||||||
|
|
@ -47,8 +47,8 @@
|
||||||
</AddressGrid>
|
</AddressGrid>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter]public object AddressContext { get; set; }
|
[Parameter] public object AddressContext { get; set; }
|
||||||
[Parameter]public string ContextIdType { get; set; }
|
[Parameter] public string ContextIdType { get; set; }
|
||||||
IGrid Grid { get; set; }
|
IGrid Grid { get; set; }
|
||||||
|
|
||||||
List<TIAM.Entities.Addresses.Address> _detailGridData = new List<Address>();
|
List<TIAM.Entities.Addresses.Address> _detailGridData = new List<Address>();
|
||||||
|
|
@ -59,23 +59,23 @@
|
||||||
|
|
||||||
public void SaveAddress(object addressOwnerToSave)
|
public void SaveAddress(object addressOwnerToSave)
|
||||||
{
|
{
|
||||||
|
|
||||||
Grid.SaveChangesAsync();
|
Grid.SaveChangesAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
Address myAddress = new Address();
|
Address myAddress = new Address();
|
||||||
|
|
||||||
|
|
||||||
_logger = new LoggerClient<AddressGridComponent>(LogWriters.ToArray());
|
_logger = new LoggerClient<AddressGridComponent>(LogWriters.ToArray());
|
||||||
if(ContextIdType == null)
|
if (ContextIdType == null)
|
||||||
{
|
{
|
||||||
//get all profiles from DB
|
//get all profiles from DB
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (ContextIdType)
|
switch (ContextIdType)
|
||||||
{
|
{
|
||||||
case ("userprofile"):
|
case ("userprofile"):
|
||||||
|
|
@ -104,13 +104,13 @@
|
||||||
break;
|
break;
|
||||||
case ("transferdestination"):
|
case ("transferdestination"):
|
||||||
//get address for transferDestination
|
//get address for transferDestination
|
||||||
TransferDestination resultData5 = (TransferDestination)AddressContext;
|
TransferDestination resultData5 = (TransferDestination)AddressContext;
|
||||||
if (resultData5.Address != null)
|
if (resultData5.Address != null)
|
||||||
_detailGridData.Add(resultData5.Address);
|
_detailGridData.Add(resultData5.Address);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Info($"DetailGridData: {_detailGridData.Count}");
|
_logger.Info($"DetailGridData: {_detailGridData.Count}");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@
|
||||||
<DxGridDataColumn FieldName="YearOfMake"/>
|
<DxGridDataColumn FieldName="YearOfMake"/>
|
||||||
<DxGridDataColumn FieldName="SeatNumber"/>
|
<DxGridDataColumn FieldName="SeatNumber"/>
|
||||||
<DxGridDataColumn FieldName="CarMotorType"/>
|
<DxGridDataColumn FieldName="CarMotorType"/>
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
@{
|
@{
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@
|
||||||
<DxGridDataColumn FieldName="YearOfMake"/>
|
<DxGridDataColumn FieldName="YearOfMake"/>
|
||||||
<DxGridDataColumn FieldName="SeatNumber"/>
|
<DxGridDataColumn FieldName="SeatNumber"/>
|
||||||
<DxGridDataColumn FieldName="CarMotorType"/>
|
<DxGridDataColumn FieldName="CarMotorType"/>
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
@{
|
@{
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@
|
||||||
<DxGridDataColumn FieldName="Id" GroupIndex="0" />
|
<DxGridDataColumn FieldName="Id" GroupIndex="0" />
|
||||||
<DxGridDataColumn FieldName="UserId" />
|
<DxGridDataColumn FieldName="UserId" />
|
||||||
<DxGridDataColumn FieldName="ServiceProviderId" Width="40%" />
|
<DxGridDataColumn FieldName="ServiceProviderId" Width="40%" />
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
@* <DxGridDataColumn FieldName="Permissions" /> *@
|
@* <DxGridDataColumn FieldName="Permissions" /> *@
|
||||||
</Columns>
|
</Columns>
|
||||||
<EditFormTemplate Context="EditFormContext">
|
<EditFormTemplate Context="EditFormContext">
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,9 @@
|
||||||
<div style="@_errorCss" @ref="_errorMessage"><p>User not found, type another email please</p></div>
|
<div style="@_errorCss" @ref="_errorMessage"><p>User not found, type another email please</p></div>
|
||||||
<DxGrid Data="@FoundUsers" RowClick="@OnRowClick">
|
<DxGrid Data="@FoundUsers" RowClick="@OnRowClick">
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridDataColumn FieldName="Id" Caption="ID" />
|
<DxGridDataColumn FieldName="Id" Caption="ID" />
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</DxGrid>
|
</DxGrid>
|
||||||
</BodyContentTemplate>
|
</BodyContentTemplate>
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,8 @@
|
||||||
</DxGridDataColumn>
|
</DxGridDataColumn>
|
||||||
<DxGridDataColumn FieldName="AffiliateId" DisplayFormat="N" />
|
<DxGridDataColumn FieldName="AffiliateId" DisplayFormat="N" />
|
||||||
<DxGridDataColumn FieldName="CommissionPercent" />
|
<DxGridDataColumn FieldName="CommissionPercent" />
|
||||||
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" />
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" />
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
@* <DxGridDataColumn FieldName="ContactEmail">
|
@* <DxGridDataColumn FieldName="ContactEmail">
|
||||||
|
|
||||||
</DxGridDataColumn> *@
|
</DxGridDataColumn> *@
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@
|
||||||
EditMode="GridEditMode.EditForm"
|
EditMode="GridEditMode.EditForm"
|
||||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||||
AllowSelectRowByClick="false"
|
AllowSelectRowByClick="false"
|
||||||
|
PageSize="13"
|
||||||
ShowFilterRow="true">
|
ShowFilterRow="true">
|
||||||
|
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
@ -137,6 +138,7 @@
|
||||||
}
|
}
|
||||||
</CellDisplayTemplate>
|
</CellDisplayTemplate>
|
||||||
</DxGridDataColumn>
|
</DxGridDataColumn>
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
|
|
|
||||||
|
|
@ -71,28 +71,34 @@
|
||||||
DataItemDeleting="Grid_DataItemDeleting"
|
DataItemDeleting="Grid_DataItemDeleting"
|
||||||
EditMode="GridEditMode.EditForm"
|
EditMode="GridEditMode.EditForm"
|
||||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||||
|
PageSize="15"
|
||||||
|
TextWrapEnabled = "false"
|
||||||
|
AllowSelectRowByClick = "true"
|
||||||
|
HighlightRowOnHover = "true"
|
||||||
|
AutoCollapseDetailRow = "true"
|
||||||
|
AutoExpandAllGroupRows = "false"
|
||||||
ShowFilterRow="true">
|
ShowFilterRow="true">
|
||||||
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" />
|
<DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left"/>
|
||||||
<DxGridDataColumn Name="@Localizer.GetString("Id")" FieldName="Id" SortIndex="0" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
<DxGridDataColumn Caption="@Localizer.GetString("Id")" FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N"/>
|
||||||
<DxGridDataColumn Name="@Localizer.GetString("FullName")" FieldName="ProfileDto.FullName" />
|
<DxGridDataColumn Caption="@Localizer.GetString("FullName")" FieldName="ProfileDto.FullName"/>
|
||||||
<DxGridDataColumn Name="@Localizer.GetString("PhoneNumber")" FieldName="UserDto.PhoneNumber" />
|
<DxGridDataColumn Caption="@Localizer.GetString("PhoneNumber")" FieldName="UserDto.PhoneNumber"/>
|
||||||
<DxGridDataColumn Name="@Localizer.GetString("Created")" FieldName="UserDto.Created" />
|
<DxGridDataColumn Caption="@Localizer.GetString("RefferalId")" FieldName="UserDto.RefferalId" />
|
||||||
<DxGridDataColumn Name="@Localizer.GetString("EmailConfirmed")" FieldName="UserDto.EmailConfirmed" />
|
<DxGridDataColumn Caption="@Localizer.GetString("EmailConfirmed")" FieldName="UserDto.EmailConfirmed" Width="120" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
<DxGridDataColumn FieldName="UserDto.RefferalId" />
|
<DxGridDataColumn Caption="@Localizer.GetString("EmailAddress")" Width="240" FieldName="UserDto.EmailAddress" SortIndex="0" />
|
||||||
<DxGridDataColumn Width="240px" FieldName="UserDto.EmailAddress"/>
|
<DxGridDataColumn Caption="Send email" Width="110" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center">
|
||||||
<DxGridDataColumn Width="110px" FieldName="UserDto.EmailAddress">
|
|
||||||
<CellDisplayTemplate>
|
<CellDisplayTemplate>
|
||||||
@{
|
@{
|
||||||
var keyField = context.Value;
|
var keyField = context.Value;
|
||||||
var keyItem = (UserModelDtoDetail)context.DataItem;
|
var keyItem = (UserModelDtoDetail)context.DataItem;
|
||||||
|
|
||||||
var buttonText = "Contact";
|
var buttonText = "Contact";
|
||||||
<DxButton Click="() => SendMail(keyItem)" IconCssClass="btn-icon-envelope" Text="@buttonText" RenderStyle="ButtonRenderStyle.Primary" />
|
<DxButton Click="() => SendMail(keyItem)" IconCssClass="btn-icon-envelope" Text="@buttonText" RenderStyle="ButtonRenderStyle.Primary"/>
|
||||||
}
|
}
|
||||||
</CellDisplayTemplate>
|
</CellDisplayTemplate>
|
||||||
</DxGridDataColumn>
|
</DxGridDataColumn>
|
||||||
|
<DxGridDataColumn Caption="@Localizer.GetString("Created")" FieldName="UserDto.Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn Caption="@Localizer.GetString("Modified")" FieldName="UserDto.Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@
|
||||||
<text>@System.Text.RegularExpressions.Regex.Replace((displayTextContext.Value as string)!, "<(.|\n)*?>", string.Empty)</text>
|
<text>@System.Text.RegularExpressions.Regex.Replace((displayTextContext.Value as string)!, "<(.|\n)*?>", string.Empty)</text>
|
||||||
</CellDisplayTemplate>
|
</CellDisplayTemplate>
|
||||||
</DxGridDataColumn>
|
</DxGridDataColumn>
|
||||||
<DxGridDataColumn FieldName="IsReaded" Caption="Readed" Width="70" CaptionAlignment="GridTextAlignment.Center" />
|
<DxGridDataColumn FieldName="IsReaded" Caption="Readed" Width="70" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
<DxGridDataColumn FieldName="Created" Width="100" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" />
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="100" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
@{
|
@{
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
@using TIAMWebApp.Shared.Application.Services
|
@using TIAMWebApp.Shared.Application.Services
|
||||||
@using AyCode.Interfaces.Addresses
|
@using AyCode.Interfaces.Addresses
|
||||||
@using TIAM.Entities.Emails
|
@using TIAM.Entities.Emails
|
||||||
|
@using AyCode.Core
|
||||||
@inject IServiceProviderDataService serviceProviderDataService
|
@inject IServiceProviderDataService serviceProviderDataService
|
||||||
@inject IUserDataService userDataService
|
@inject IUserDataService userDataService
|
||||||
@inject ITransferDataService transferDataService
|
@inject ITransferDataService transferDataService
|
||||||
|
|
@ -30,16 +31,17 @@
|
||||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||||
ShowFilterRow="false">
|
ShowFilterRow="false">
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridCommandColumn NewButtonVisible="false" Width="8%" FixedPosition="GridColumnFixedPosition.Left" />
|
<DxGridCommandColumn Width="135" MinWidth="135" DeleteButtonVisible="AcDomain.IsDeveloperVersion" EditButtonVisible="AcDomain.IsDeveloperVersion" FixedPosition="GridColumnFixedPosition.Left" />
|
||||||
<DxGridDataColumn FieldName="Id" GroupIndex="0" />
|
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||||
<DxGridDataColumn FieldName="AddressText" />
|
<DxGridDataColumn FieldName="AddressText" />
|
||||||
<DxGridDataColumn FieldName="IsValid" Width="40" />
|
<DxGridDataColumn FieldName="IsValid" Width="40" />
|
||||||
<DxGridDataColumn FieldName="IsHelper" Width="40" />
|
<DxGridDataColumn FieldName="IsHelper" Width="40" />
|
||||||
<DxGridDataColumn FieldName="Latitude" Width="40" />
|
<DxGridDataColumn FieldName="Latitude" Width="40" />
|
||||||
<DxGridDataColumn FieldName="Longitude" Width="40" />
|
<DxGridDataColumn FieldName="Longitude" Width="40" />
|
||||||
<DxGridDataColumn FieldName="Created" Width="40" />
|
<DxGridDataColumn FieldName="IsReaded" Caption="Readed" Width="70" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
<DxGridDataColumn FieldName="Modified" Width="40" />
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="100" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
|
||||||
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
@{
|
@{
|
||||||
<text>@(((EmailMessage)context.DataItem).Text)</text>
|
<text>@(((EmailMessage)context.DataItem).Text)</text>
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@
|
||||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductType) FieldName="ProductType" Width="130" />
|
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductType) FieldName="ProductType" Width="130" />
|
||||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.Price) FieldName="Price" Width="100" />
|
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.Price) FieldName="Price" Width="100" />
|
||||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductDescription) FieldName="Description" />
|
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductDescription) FieldName="Description" />
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@
|
||||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductType) FieldName="ProductType" Width="130" />
|
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductType) FieldName="ProductType" Width="130" />
|
||||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.Price) FieldName="Price" Width="100" />
|
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.Price) FieldName="Price" Width="100" />
|
||||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductDescription) FieldName="Description" />
|
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductDescription) FieldName="Description" />
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@
|
||||||
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||||
<DxGridDataColumn FieldName="Name" />
|
<DxGridDataColumn FieldName="Name" />
|
||||||
<DxGridDataColumn FieldName="FullName" />
|
<DxGridDataColumn FieldName="FullName" />
|
||||||
<DxGridDataColumn FieldName="Created" Width="40%" />
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
<DxGridDataColumn FieldName="Modified" />
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
|
|
|
||||||
|
|
@ -22,15 +22,16 @@
|
||||||
PageSize="5"
|
PageSize="5"
|
||||||
ValidationEnabled="false"
|
ValidationEnabled="false"
|
||||||
EditMode="GridEditMode.EditForm"
|
EditMode="GridEditMode.EditForm"
|
||||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
ColumnResizeMode="GridColumnResizeMode.NextColumn">
|
||||||
ShowFilterRow="true">
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" />
|
<DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" />
|
||||||
<DxGridDataColumn FieldName="Id" GroupIndex="0" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
|
||||||
<DxGridDataColumn FieldName="OwnerId" />
|
<DxGridDataColumn FieldName="OwnerId" />
|
||||||
<DxGridDataColumn FieldName="Name" Width="40%" />
|
<DxGridDataColumn FieldName="Name" Width="40%" />
|
||||||
<DxGridDataColumn FieldName="AffiliateId" />
|
<DxGridDataColumn FieldName="AffiliateId" />
|
||||||
<DxGridDataColumn FieldName="CommissionPercent" />
|
<DxGridDataColumn FieldName="CommissionPercent" />
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,8 @@
|
||||||
<DxGridDataColumn FieldName="Price3" MinWidth="80" />
|
<DxGridDataColumn FieldName="Price3" MinWidth="80" />
|
||||||
<DxGridDataColumn FieldName="ProductCommis" MinWidth="80" />
|
<DxGridDataColumn FieldName="ProductCommis" MinWidth="80" />
|
||||||
<DxGridDataColumn FieldName="ExtraPrice" MinWidth="80" />
|
<DxGridDataColumn FieldName="ExtraPrice" MinWidth="80" />
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@
|
||||||
<DxGridDataColumn FieldName="Price2" />
|
<DxGridDataColumn FieldName="Price2" />
|
||||||
<DxGridDataColumn FieldName="Price3" />
|
<DxGridDataColumn FieldName="Price3" />
|
||||||
<DxGridDataColumn FieldName="ProductCommis" />
|
<DxGridDataColumn FieldName="ProductCommis" />
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@
|
||||||
<DxGridDataColumn FieldName="Price2" />
|
<DxGridDataColumn FieldName="Price2" />
|
||||||
<DxGridDataColumn FieldName="Price3" />
|
<DxGridDataColumn FieldName="Price3" />
|
||||||
<DxGridDataColumn FieldName="ProductCommis" />
|
<DxGridDataColumn FieldName="ProductCommis" />
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
<DxTabs>
|
<DxTabs>
|
||||||
|
|
|
||||||
|
|
@ -38,34 +38,36 @@
|
||||||
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||||
@{
|
@{
|
||||||
var userEmailFieldName = $"{nameof(TransferToDriver.UserProductMapping)}.{nameof(UserProductMapping.User)}.{nameof(User.EmailAddress)}";
|
var userEmailFieldName = $"{nameof(TransferToDriver.UserProductMapping)}.{nameof(UserProductMapping.User)}.{nameof(User.EmailAddress)}";
|
||||||
var userEmailFieldName2 = $"{nameof(UserProductMapping.User)}.{nameof(User.EmailAddress)}";
|
|
||||||
|
var userEmailFieldNameComboItem = $"{nameof(UserProductMapping.User)}.{nameof(User.EmailAddress)}";
|
||||||
|
var userNameFieldNameComboItem = $"{nameof(UserProductMapping.User)}.{nameof(User.FullName)}";
|
||||||
}
|
}
|
||||||
<DxGridDataColumn FieldName="@userEmailFieldName" Caption="Driver" SortIndex="0">
|
<DxGridDataColumn FieldName="@userEmailFieldName" Caption="Driver" SortIndex="0">
|
||||||
<CellEditTemplate>
|
<CellEditTemplate>
|
||||||
@{
|
@{
|
||||||
var transferToDriverDataItem = (TransferToDriver)context.DataItem;
|
|
||||||
var transferToDriverEditModel = (TransferToDriver)context.EditModel;
|
var transferToDriverEditModel = (TransferToDriver)context.EditModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
<DxComboBox Data="@_drivers.Where(x => x.ProductId == (transferToDriverDataItem?.UserProductMapping.ProductId ?? TiamConstClient.TransferProductId))"
|
<DxComboBox Data="@_drivers"
|
||||||
TData="@UserProductMapping"
|
TData="@UserProductMapping"
|
||||||
TValue="@UserProductMapping"
|
TValue="@UserProductMapping"
|
||||||
TextFieldName="@userEmailFieldName2"
|
TextFieldName="@userEmailFieldNameComboItem"
|
||||||
Value="@_drivers.FirstOrDefault(x => x.Id == transferToDriverEditModel.UserProductMappingId)"
|
Value="@_drivers.FirstOrDefault(x => x.Id == transferToDriverEditModel.UserProductMappingId)"
|
||||||
ValueChanged="v => transferToDriverEditModel.UserProductMappingId = v.Id"
|
ValueChanged="v => transferToDriverEditModel.UserProductMappingId = v.Id"
|
||||||
SearchFilterCondition="ListSearchFilterCondition.Contains"
|
SearchFilterCondition="ListSearchFilterCondition.Contains"
|
||||||
SearchMode="ListSearchMode.AutoSearch">
|
SearchMode="ListSearchMode.AutoSearch">
|
||||||
<Columns>
|
<Columns>
|
||||||
@* <DxListEditorColumn FieldName="Id"/> *@
|
@* <DxListEditorColumn FieldName="Id"/> *@
|
||||||
<DxListEditorColumn FieldName="@userEmailFieldName2" Caption="Driver email" />
|
<DxListEditorColumn FieldName="@userEmailFieldNameComboItem" Caption="Driver email" />
|
||||||
|
<DxListEditorColumn FieldName="@userNameFieldNameComboItem" Caption="Driver name" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</DxComboBox>
|
</DxComboBox>
|
||||||
|
|
||||||
</CellEditTemplate>
|
</CellEditTemplate>
|
||||||
</DxGridDataColumn>
|
</DxGridDataColumn>
|
||||||
|
|
||||||
<DxGridDataColumn FieldName="CarId" Caption="Car">
|
<DxGridDataColumn FieldName="CarId" Caption="Car">
|
||||||
<CellDisplayTemplate>
|
<CellDisplayTemplate>
|
||||||
@{
|
@{
|
||||||
var transferToDriver = (TransferToDriver)context.DataItem;
|
var transferToDriver = (TransferToDriver)context.DataItem;
|
||||||
<text>@_cars.FirstOrDefault(x => x.Id == transferToDriver.CarId)?.LicencePlate</text>
|
<text>@_cars.FirstOrDefault(x => x.Id == transferToDriver.CarId)?.LicencePlate</text>
|
||||||
|
|
@ -86,7 +88,7 @@
|
||||||
SearchMode="ListSearchMode.AutoSearch">
|
SearchMode="ListSearchMode.AutoSearch">
|
||||||
<Columns>
|
<Columns>
|
||||||
@* <DxListEditorColumn FieldName="Id"/> *@
|
@* <DxListEditorColumn FieldName="Id"/> *@
|
||||||
<DxListEditorColumn FieldName="LicencePlate" Caption="LicencePlate"/>
|
<DxListEditorColumn FieldName="LicencePlate" Caption="LicencePlate" />
|
||||||
<DxListEditorColumn FieldName="Manufacture" Caption="Manufacture" />
|
<DxListEditorColumn FieldName="Manufacture" Caption="Manufacture" />
|
||||||
<DxListEditorColumn FieldName="CarModel" Caption="Model" />
|
<DxListEditorColumn FieldName="CarModel" Caption="Model" />
|
||||||
<DxListEditorColumn FieldName="SeatNumber" Caption="SeatNumber" />
|
<DxListEditorColumn FieldName="SeatNumber" Caption="SeatNumber" />
|
||||||
|
|
@ -95,34 +97,36 @@
|
||||||
</CellEditTemplate>
|
</CellEditTemplate>
|
||||||
</DxGridDataColumn>
|
</DxGridDataColumn>
|
||||||
|
|
||||||
@* <DxGridDataColumn FieldName="CarId">
|
|
||||||
<CellEditTemplate>
|
|
||||||
@{
|
|
||||||
var transferToDriverId = ((TransferToDriver)context.DataItem).Id;
|
|
||||||
}
|
|
||||||
|
|
||||||
<DxDropDownBox QueryDisplayText="QueryText"
|
|
||||||
DropDownWidthMode="DropDownWidthMode.ContentWidth"
|
|
||||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
|
|
||||||
NullText="Select a car...">
|
|
||||||
<DropDownBodyTemplate>
|
|
||||||
<CarDetailGridComponent GetAllTag="SignalRTags.GetAllCars"/>
|
|
||||||
</DropDownBodyTemplate>
|
|
||||||
</DxDropDownBox>
|
|
||||||
</CellEditTemplate>
|
|
||||||
</DxGridDataColumn>
|
|
||||||
*@
|
|
||||||
@* <DxGridDataColumn FieldName="CarId">
|
@* <DxGridDataColumn FieldName="CarId">
|
||||||
<EditSettings>
|
<CellEditTemplate>
|
||||||
<DxComboBoxSettings Data="_cars" SearchMode="ListSearchMode.AutoSearch"
|
@{
|
||||||
ValueFieldName="Id"
|
var transferToDriverId = ((TransferToDriver)context.DataItem).Id;
|
||||||
TextFieldName="LicencePlate" />
|
}
|
||||||
</EditSettings>
|
|
||||||
|
<DxDropDownBox QueryDisplayText="QueryText"
|
||||||
|
DropDownWidthMode="DropDownWidthMode.ContentWidth"
|
||||||
|
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
|
||||||
|
NullText="Select a car...">
|
||||||
|
<DropDownBodyTemplate>
|
||||||
|
<CarDetailGridComponent GetAllTag="SignalRTags.GetAllCars"/>
|
||||||
|
</DropDownBodyTemplate>
|
||||||
|
</DxDropDownBox>
|
||||||
|
</CellEditTemplate>
|
||||||
|
</DxGridDataColumn>
|
||||||
|
*@
|
||||||
|
@* <DxGridDataColumn FieldName="CarId">
|
||||||
|
<EditSettings>
|
||||||
|
<DxComboBoxSettings Data="_cars" SearchMode="ListSearchMode.AutoSearch"
|
||||||
|
ValueFieldName="Id"
|
||||||
|
TextFieldName="LicencePlate" />
|
||||||
|
</EditSettings>
|
||||||
</DxGridDataColumn>*@
|
</DxGridDataColumn>*@
|
||||||
|
|
||||||
|
|
||||||
<DxGridDataColumn FieldName="Price" />
|
<DxGridDataColumn FieldName="Price" />
|
||||||
@* <DxGridDataColumn FieldName="LicencePlate" ReadOnly="true" /> *@
|
@* <DxGridDataColumn FieldName="LicencePlate" ReadOnly="true" /> *@
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</TransferToDriversDetailGrid>
|
</TransferToDriversDetailGrid>
|
||||||
|
|
||||||
|
|
@ -143,7 +147,6 @@
|
||||||
|
|
||||||
_logger.Info($"DetailGridData: {ParentData.TransferToDrivers.Count}");
|
_logger.Info($"DetailGridData: {ParentData.TransferToDrivers.Count}");
|
||||||
|
|
||||||
//EZ NEM JÓ, FILTER-ELNI KELL A PRODUCT-RA!!! - J.
|
|
||||||
_cars.AddRange((await AdminSignalRClient.GetAllAsync<List<Car>>(SignalRTags.GetAllCarsByProductId, TiamConstClient.TransferProductId))!);
|
_cars.AddRange((await AdminSignalRClient.GetAllAsync<List<Car>>(SignalRTags.GetAllCarsByProductId, TiamConstClient.TransferProductId))!);
|
||||||
// AdminSignalRClient.GetAllAsync<List<Car>>(SignalRTags.GetAllCars, response =>
|
// AdminSignalRClient.GetAllAsync<List<Car>>(SignalRTags.GetAllCars, response =>
|
||||||
// {
|
// {
|
||||||
|
|
@ -151,14 +154,7 @@
|
||||||
// return Task.CompletedTask;
|
// return Task.CompletedTask;
|
||||||
// }).Forget();
|
// }).Forget();
|
||||||
|
|
||||||
//EZ NEM JÓ, FILTER-ELNI KELL A PRODUCT-RA!!! - J.
|
|
||||||
_drivers.AddRange(_cars.DistinctBy(x => x.UserProductMappingId).Select(x => x.UserProductMapping));
|
_drivers.AddRange(_cars.DistinctBy(x => x.UserProductMappingId).Select(x => x.UserProductMapping));
|
||||||
//_drivers.AddRange((await AdminSignalRClient.GetAllAsync<List<UserProductMapping>>(SignalRTags.GetAllDrivers))!);
|
|
||||||
// AdminSignalRClient.GetAllAsync<List<UserProductMapping>>(SignalRTags.GetAllDrivers, response =>
|
|
||||||
// {
|
|
||||||
// _drivers.AddRange(response.ResponseData!);
|
|
||||||
// return Task.CompletedTask;
|
|
||||||
// }).Forget();
|
|
||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
}
|
}
|
||||||
|
|
@ -185,6 +181,8 @@
|
||||||
|
|
||||||
private void DataItemChanged(GridDataItemChangedEventArgs<TransferToDriver> args)
|
private void DataItemChanged(GridDataItemChangedEventArgs<TransferToDriver> args)
|
||||||
{
|
{
|
||||||
|
//ParentData?.TransferToDrivers?.UpdateCollection(args.DataItem, args.TrackingState == TrackingState.Remove);
|
||||||
|
|
||||||
OnTransferToDriverChanged.InvokeAsync(args.DataItem);
|
OnTransferToDriverChanged.InvokeAsync(args.DataItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,7 @@
|
||||||
CustomizeEditModel="CustomizeEditModel"
|
CustomizeEditModel="CustomizeEditModel"
|
||||||
EditMode="GridEditMode.EditForm"
|
EditMode="GridEditMode.EditForm"
|
||||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||||
DetailExpandButtonDisplayMode="DetailExpandButtonDisplayMode"
|
DetailExpandButtonDisplayMode="DetailExpandButtonDisplayMode">
|
||||||
ShowFilterRow="true">
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridCommandColumn Width="135" MinWidth="135" DeleteButtonVisible="AcDomain.IsDeveloperVersion" EditButtonVisible="AcDomain.IsDeveloperVersion" FixedPosition="GridColumnFixedPosition.Left" />
|
<DxGridCommandColumn Width="135" MinWidth="135" DeleteButtonVisible="AcDomain.IsDeveloperVersion" EditButtonVisible="AcDomain.IsDeveloperVersion" FixedPosition="GridColumnFixedPosition.Left" />
|
||||||
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||||
|
|
@ -47,6 +46,8 @@
|
||||||
@* <DxGridDataColumn FieldName="UserProductMapping.Product.Name" Caption="Service name" /> *@
|
@* <DxGridDataColumn FieldName="UserProductMapping.Product.Name" Caption="Service name" /> *@
|
||||||
@* <DxGridDataColumn FieldName="@nameof(Product.ServiceProvider.Name)" Caption="Company name" /> *@
|
@* <DxGridDataColumn FieldName="@nameof(Product.ServiceProvider.Name)" Caption="Company name" /> *@
|
||||||
<DxGridDataColumn FieldName="Permissions" />
|
<DxGridDataColumn FieldName="Permissions" />
|
||||||
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
@{
|
@{
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,8 @@ namespace TIAMSharedUI.Shared.Components.Grids
|
||||||
|
|
||||||
if (e.IsNew) await AddDataItemAsync(dataItem);
|
if (e.IsNew) await AddDataItemAsync(dataItem);
|
||||||
else await UpdateDataItemAsync(dataItem);
|
else await UpdateDataItemAsync(dataItem);
|
||||||
|
|
||||||
|
_dataSource.UpdateCollection(dataItem, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task SaveChangesToServerAsync()
|
private Task SaveChangesToServerAsync()
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,11 @@
|
||||||
|
|
||||||
@inherits ErrorBoundary
|
@inherits ErrorBoundary
|
||||||
|
|
||||||
|
@* <DxPopup @ref="ErrorPopup" HeaderText="Popup"/> *@
|
||||||
|
|
||||||
|
@code {
|
||||||
|
bool PopupVisible { get; set; } = false;
|
||||||
|
}
|
||||||
|
|
||||||
@if (_currentError != null)
|
@if (_currentError != null)
|
||||||
{
|
{
|
||||||
|
|
@ -23,6 +28,7 @@ else
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
//public DxPopup ErrorPopup;
|
||||||
private Exception? _currentError;
|
private Exception? _currentError;
|
||||||
private LoggerClient _logger;
|
private LoggerClient _logger;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue