This commit is contained in:
Adam 2024-06-27 14:25:29 +02:00
commit 9f371a2de9
29 changed files with 92 additions and 175 deletions

View File

@ -21,6 +21,9 @@ public class TransferToDriver : IEntityGuid, ITimeStampInfo, IUserProductMapping
public virtual Transfer Transfer { get; set; }
public virtual UserProductMapping UserProductMapping { get; set; }
/// <summary>
/// History LicencePlate!
/// </summary>
public string LicencePlate { get; set; }
public double Price { get; set; }

View File

@ -257,9 +257,6 @@ else
private MessageWizardModel _messageWizardModel = new();
private bool _popupVisible;
private bool _autoCollapseDetailRow;
public List<string> IgnoreList =
[
"ReceiverEmailAddress",

View File

@ -67,12 +67,10 @@
SignalRClient="AdminSignalRClient"
PageSize="12"
KeyFieldName="Id"
ValidationEnabled="false"
DetailRowDisplayMode="GridDetailRowDisplayMode.Always"
CustomizeEditModel="Grid_CustomizeEditModel"
EditMode="GridEditMode.EditRow"
KeyboardNavigationEnabled="true">
EditMode="GridEditMode.EditRow">
<Columns>
<DxGridCommandColumn Width="160px" />
<DxGridDataColumn FieldName="Id" MinWidth="80">

View File

@ -32,14 +32,11 @@
ContextIds="@CompanyId"
Logger="_logger"
SignalRClient="AdminSignalRClient"
AutoCollapseDetailRow="false"
KeyboardNavigationEnabled="true"
CustomizeElement="Grid_CustomizeElement"
CustomizeEditModel="Grid_CustomizeEditModel"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
ShowFilterRow="true"
KeyFieldName="Id">
ShowFilterRow="true">
<Columns>
<DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" />
@ -56,18 +53,18 @@
</Columns>
@* <DetailRowTemplate>
<CompaniesNestedUserProductMapping CurrentCompany="(TIAM.Entities.ServiceProviders.Company)context.DataItem" KeyboardNavigationEnabled="true" />
<CompaniesNestedUserProductMapping CurrentCompany="(TIAM.Entities.ServiceProviders.Company)context.DataItem" />
</DetailRowTemplate> *@
<DetailRowTemplate>
<DxTabs>
<DxTabPage Text="Profile">
<ProfileGridComponent ParentData="((Company)myContext.DataItem)" KeyboardNavigationEnabled="true" />
<ProfileGridComponent ParentData="((Company)myContext.DataItem)" />
</DxTabPage>
<DxTabPage Text="Products">
<ProductDetailGridComponent GetAllTag="SignalRTags.GetProductsByOwnerId" ContextId="((Company)myContext.DataItem).Id" ParentData="((Company)myContext.DataItem)" KeyboardNavigationEnabled="true" />
<ProductDetailGridComponent GetAllTag="SignalRTags.GetProductsByOwnerId" ContextId="((Company)myContext.DataItem).Id" ParentData="((Company)myContext.DataItem)" />
</DxTabPage>
<DxTabPage Text="Address">
<AddressDetailGridComponent ParentData="((Company)myContext.DataItem).Profile" KeyboardNavigationEnabled="true" />
<AddressDetailGridComponent ParentData="((Company)myContext.DataItem).Profile" />
</DxTabPage>
</DxTabs>
</DetailRowTemplate>

View File

@ -29,11 +29,7 @@
OnGridEditModelSaving="DataItemSaving"
OnGridItemDeleting="DataItemDeleting"
OnGridItemChanged="DataItemChanged"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
TextWrapEnabled="false"
AutoExpandAllGroupRows="true"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
DetailExpandButtonDisplayMode="DetailExpandButtonDisplayMode">
@ -58,7 +54,6 @@
</AddressDetailGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public IAcAddressRelation<Address> ParentData { get; set; } = null!;
[Parameter] public IList<Address>? DataSource { get; set; }
[Parameter] public EventCallback<Address> OnAddressChanged { get; set; }

View File

@ -20,9 +20,6 @@
<AddressGrid @ref="Grid" Data="_detailGridData"
PageSize="5"
AutoExpandAllGroupRows="true"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
CustomizeEditModel="CustomizeEditModel"
EditMode="GridEditMode.EditForm"
@ -50,12 +47,8 @@
</AddressGrid>
@code {
[Parameter]
public bool KeyboardNavigationEnabled { get; set; }
[Parameter]
public object AddressContext { get; set; }
[Parameter]
public string ContextIdType { get; set; }
[Parameter]public object AddressContext { get; set; }
[Parameter]public string ContextIdType { get; set; }
IGrid Grid { get; set; }
List<TIAM.Entities.Addresses.Address> _detailGridData = new List<Address>();

View File

@ -23,9 +23,6 @@
GetAllMessageTag="GetAllTag"
SignalRClient="AdminSignalRClient"
PageSize="10"
AutoExpandAllGroupRows="true"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
CustomizeEditModel="CustomizeEditModel"
EditMode="GridEditMode.EditForm"
@ -54,7 +51,7 @@
<DxTabs>
<DxTabPage Text="Driving permissions assigned">
<UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsById" ContextIds="new[] { ((Car)context.DataItem).UserProductMappingId }" KeyboardNavigationEnabled="true"/>
<UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsById" ContextIds="new[] { ((Car)context.DataItem).UserProductMappingId }" />
</DxTabPage>
</DxTabs>
@ -98,7 +95,6 @@
@code {
[Parameter] public Guid ContextId { get; set; }
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public ICarRelation ParentData { get; set; } = null!;
[Parameter] public int GetAllTag { get; set; } = SignalRTags.GetAllCars;
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;

View File

@ -22,9 +22,6 @@
GetAllMessageTag="GetAllTag"
SignalRClient="AdminSignalRClient"
PageSize="10"
AutoExpandAllGroupRows="true"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
CustomizeEditModel="CustomizeEditModel"
EditMode="GridEditMode.EditForm"
@ -53,7 +50,7 @@
<DxTabs>
<DxTabPage Text="Driving permissions assigned">
<UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsById" ContextIds="new[] { ((Car)context.DataItem).UserProductMappingId }" KeyboardNavigationEnabled="true"/>
<UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsById" ContextIds="new[] { ((Car)context.DataItem).UserProductMappingId }" />
</DxTabPage>
</DxTabs>
@ -95,7 +92,6 @@
</CarGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public ICarRelation ParentData { get; set; } = null!;
[Parameter] public int GetAllTag { get; set; } = SignalRTags.GetAllCars;
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;

View File

@ -13,9 +13,6 @@
</div>
<DxGrid Data="_detailGridData"
PageSize="5"
AutoExpandAllGroupRows="true"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
CustomizeEditModel="CustomizeEditModel"
EditModelSaving="EditModelSaving"
@ -53,10 +50,7 @@
</DxGrid>
@code {
[Parameter]
public bool KeyboardNavigationEnabled { get; set; }
[Parameter]
public Company CurrentCompany { get; set; }
[Parameter]public Company CurrentCompany { get; set; }
List<UserToCompany> _detailGridData;

View File

@ -62,9 +62,6 @@
GetAllMessageTag="GetAllTag"
SignalRClient="AdminSignalRClient"
PageSize="10"
AutoExpandAllGroupRows="true"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
CustomizeElement="Grid_CustomizeElement"
CustomizeEditModel="CustomizeEditModel"
@ -91,10 +88,10 @@
<DxTabs>
<DxTabPage Text="Products">
<ProductDetailGridComponent GetAllTag="SignalRTags.GetProductsById" ContextId="((UserProductMapping)context.DataItem).ProductId" KeyboardNavigationEnabled="true" />
<ProductDetailGridComponent GetAllTag="SignalRTags.GetProductsById" ContextId="((UserProductMapping)context.DataItem).ProductId" />
</DxTabPage>
<DxTabPage Text="Cars">
<CarDetailGridComponent GetAllTag="SignalRTags.GetCarsForUserProductMapping" ContextId="((UserProductMapping)context.DataItem).Id" KeyboardNavigationEnabled="true" />
<CarDetailGridComponent GetAllTag="SignalRTags.GetCarsForUserProductMapping" ContextId="((UserProductMapping)context.DataItem).Id" />
</DxTabPage>
</DxTabs>
}
@ -130,7 +127,6 @@
@code {
[Parameter] public Guid ContextId { get; set; }
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public IProductRelation ParentData { get; set; } = null!;
[Parameter] public int GetAllTag { get; set; } = SignalRTags.GetAllUserProductMappings;
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;

View File

@ -60,7 +60,6 @@
IGrid Grid { get; set; }
//object? MasterGridData { get; set; }
bool AutoCollapseDetailRow { get; set; }
public List<string> IgnoreList =
[

View File

@ -60,8 +60,6 @@
IGrid Grid { get; set; }
//object? MasterGridData { get; set; }
bool AutoCollapseDetailRow { get; set; }
protected override async Task OnInitializedAsync()
{

View File

@ -87,14 +87,11 @@
Logger="_logger"
SignalRClient="AdminSignalRClient"
AutoCollapseDetailRow="_autoCollapseDetailRow"
KeyboardNavigationEnabled="true"
CustomizeElement="Grid_CustomizeElement"
CustomizeEditModel="Grid_CustomizeEditModel"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
ShowFilterRow="true"
KeyFieldName="Id">
ShowFilterRow="true">
<Columns>
<DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" />
@ -126,18 +123,18 @@
</Columns>
@* <DetailRowTemplate>
<CompaniesNestedUserProductMapping CurrentCompany="(TIAM.Entities.ServiceProviders.Company)context.DataItem" KeyboardNavigationEnabled="true" />
<CompaniesNestedUserProductMapping CurrentCompany="(TIAM.Entities.ServiceProviders.Company)context.DataItem" />
</DetailRowTemplate> *@
<DetailRowTemplate>
<DxTabs ActiveTabIndexChanged="ActiveTabIndexChanged">
<DxTabPage Text="Profile">
<ProfileGridComponent ParentData="((Company)context.DataItem)" KeyboardNavigationEnabled="true" />
<ProfileGridComponent ParentData="((Company)context.DataItem)" />
</DxTabPage>
<DxTabPage Text="Products">
<ProductDetailGridComponent @ref="_productDetailGridComponent" DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto" GetAllTag="SignalRTags.GetProductsByOwnerId" OnGridEditModelSaving="OnProductGridItemSaving" ContextId="((Company)context.DataItem).Id" ParentData="(Company)context.DataItem" KeyboardNavigationEnabled="true" />
<ProductDetailGridComponent @ref="_productDetailGridComponent" DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto" GetAllTag="SignalRTags.GetProductsByOwnerId" OnGridEditModelSaving="OnProductGridItemSaving" ContextId="((Company)context.DataItem).Id" ParentData="(Company)context.DataItem" />
</DxTabPage>
<DxTabPage Text="Address">
<AddressDetailGridComponent ParentData="((Company)context.DataItem).Profile" KeyboardNavigationEnabled="true" />
<AddressDetailGridComponent ParentData="((Company)context.DataItem).Profile" />
</DxTabPage>
</DxTabs>
</DetailRowTemplate>
@ -177,7 +174,6 @@
private bool _setOwnerPopupVisible;
private CompanyGrid _gridCompany;
private bool _autoCollapseDetailRow;
private Company _companyToSetOwner = null;
@ -351,16 +347,6 @@
_gridCompany.ExpandDetailRow(0);
}
}
void AutoCollapseDetailRow_Changed(bool newValue)
{
_autoCollapseDetailRow = newValue;
if (!newValue) return;
_gridCompany.BeginUpdate();
_gridCompany.CollapseAllDetailRows();
_gridCompany.ExpandDetailRow(0);
_gridCompany.EndUpdate();
}
private void ActiveTabIndexChanged(int index)
{

View File

@ -52,11 +52,7 @@
bool PopupVisible { get; set; }
bool AutoCollapseDetailRow { get; set; }
void Grid_CustomizeElement(GridCustomizeElementEventArgs e)
{
if (e.ElementType == GridElementType.DataRow && e.VisibleIndex % 2 == 1)

View File

@ -90,13 +90,10 @@
CustomizeElement="Grid_CustomizeElement"
CustomizeEditModel="Grid_CustomizeEditModel"
AutoCollapseDetailRow="_autoCollapseDetailRow"
KeyboardNavigationEnabled="true"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
AllowSelectRowByClick="false"
ShowFilterRow="true"
KeyFieldName="Id">
ShowFilterRow="true">
<Columns>
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="AcDomain.IsDeveloperVersion" Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" />
@ -112,8 +109,6 @@
}
</CellDisplayTemplate>
</DxGridDataColumn>
<DxGridDataColumn FieldName="PaymentId" DisplayFormat="N"/>
<DxGridDataColumn Caption="Paid" FieldName="Paid" />
<DxGridDataColumn FieldName="FromAddress"/>
<DxGridDataColumn FieldName="ToAddress"/>
<DxGridDataColumn FieldName="Appointment" DisplayFormat="g" Width="140" />
@ -130,6 +125,8 @@
</CellDisplayTemplate>
</DxGridDataColumn>
<DxGridDataColumn FieldName="PassengerCount"/>
<DxGridDataColumn FieldName="PaymentId" DisplayFormat="N" />
<DxGridDataColumn Caption="Paid" FieldName="Paid" />
<DxGridDataColumn FieldName="TransferStatusType" SortIndex="0" SortOrder="GridColumnSortOrder.Ascending" SortMode="GridColumnSortMode.Value">
<CellDisplayTemplate>
@{
@ -144,10 +141,10 @@
<DetailRowTemplate>
<DxTabs>
<DxTabPage Text="Messages">
<MessageDetailGridComponent ContextId="((Transfer)context.DataItem).Id" KeyboardNavigationEnabled="true" />
<MessageDetailGridComponent ContextId="((Transfer)context.DataItem).Id" />
</DxTabPage>
<DxTabPage Text="Driver">
<TransferToDriverGridComponent ContextId="((Transfer)context.DataItem).Id" ParentData="(Transfer)context.DataItem" KeyboardNavigationEnabled="true" />
<TransferToDriverGridComponent ContextId="((Transfer)context.DataItem).Id" ParentData="(Transfer)context.DataItem" />
</DxTabPage>
</DxTabs>
</DetailRowTemplate>
@ -235,7 +232,6 @@
private LoggerClient<ManageTransfers> _logger;
private bool _popupVisible;
private bool _autoCollapseDetailRow;
private TransferGrid _gridTransfer;
private DxTagBox<TransferStatusModel, TransferStatusModel> _filterTag;
@ -489,15 +485,4 @@
//_gridTransfer.ExpandDetailRow(0);
}
}
void AutoCollapseDetailRow_Changed(bool newValue)
{
_autoCollapseDetailRow = newValue;
if (!newValue) return;
_gridTransfer.BeginUpdate();
_gridTransfer.CollapseAllDetailRows();
_gridTransfer.ExpandDetailRow(0);
_gridTransfer.EndUpdate();
}
}

View File

@ -60,7 +60,6 @@
IGrid Grid { get; set; }
//object? MasterGridData { get; set; }
bool AutoCollapseDetailRow { get; set; }
public List<string> IgnoreList =
[

View File

@ -65,16 +65,13 @@
<DxGrid @ref="Grid"
Data="UserData"
AutoCollapseDetailRow="AutoCollapseDetailRow"
KeyboardNavigationEnabled="true"
CustomizeElement="Grid_CustomizeElement"
CustomizeEditModel="Grid_CustomizeEditModel"
EditModelSaving="Grid_EditModelSaving"
DataItemDeleting="Grid_DataItemDeleting"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
ShowFilterRow="true"
KeyFieldName="Id">
ShowFilterRow="true">
<Columns>
<DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" />
@ -100,16 +97,16 @@
<DetailRowTemplate>
<DxTabs>
<DxTabPage Text="Profile">
<ProfileGridComponent ParentData="((UserModelDtoDetail)context.DataItem)" KeyboardNavigationEnabled="true" />
<ProfileGridComponent ParentData="((UserModelDtoDetail)context.DataItem)" />
</DxTabPage>
<DxTabPage Text="Address">
<AddressDetailGridComponent ParentData="((UserModelDtoDetail)context.DataItem).ProfileDto" KeyboardNavigationEnabled="true" />
<AddressDetailGridComponent ParentData="((UserModelDtoDetail)context.DataItem).ProfileDto" />
</DxTabPage>
<DxTabPage Text="Companies owned">
<ServiceProviderGridComponent ContextId="((UserModelDtoDetail)context.DataItem).Id" />
</DxTabPage>
<DxTabPage Text="Roles in services">
<UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsByUserId" ContextIds="new [] {((UserModelDtoDetail)context.DataItem).Id}" KeyboardNavigationEnabled="true" />
<UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsByUserId" ContextIds="new [] {((UserModelDtoDetail)context.DataItem).Id}" />
</DxTabPage>
</DxTabs>
@ -166,7 +163,6 @@
IGrid Grid { get; set; }
//object? MasterGridData { get; set; }
bool AutoCollapseDetailRow { get; set; }
public List<string> IgnoreList =
[
@ -338,15 +334,4 @@
Grid.ExpandDetailRow(0);
}
}
void AutoCollapseDetailRow_Changed(bool newValue)
{
AutoCollapseDetailRow = newValue;
if (!newValue) return;
Grid.BeginUpdate();
Grid.CollapseAllDetailRows();
Grid.ExpandDetailRow(0);
Grid.EndUpdate();
}
}

View File

@ -26,9 +26,7 @@
Logger="_logger"
SignalRClient="AdminSignalRClient"
ContextIds="@(ContextId.IsNullOrEmpty() ? throw new InvalidDataException($"ContextId.IsNullOrEmpty(); ContextId: {ContextId}") : [ContextId.Value])"
KeyFieldName="Id"
CustomizeElement="CustomizeElement"
TextWrapEnabled="false">
CustomizeElement="CustomizeElement">
<Columns>
<DxGridCommandColumn Width="135" MinWidth="135" DeleteButtonVisible="AcDomain.IsDeveloperVersion" EditButtonVisible="AcDomain.IsDeveloperVersion" FixedPosition="GridColumnFixedPosition.Left" />
@ -61,7 +59,6 @@
</MessageDetailGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public Guid? ContextId { get; set; }
//[Parameter] public IEmailMessageRelation ParentData { get; set; } = null!;
[Parameter] public bool IsSubjectVisible { get; set; } = true;

View File

@ -25,9 +25,6 @@
Logger="_logger"
SignalRClient="AdminSignalRClient"
PageSize="5"
AutoExpandAllGroupRows="true"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
@ -51,8 +48,6 @@
</MessageGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
private MessageGrid _messageGrid = null!;
private LoggerClient<MessageGridComponent> _logger = null!;

View File

@ -32,9 +32,6 @@
OnGridEditModelSaving="DataItemSaving"
OnGridItemDeleting="DataItemDeleting"
OnGridItemChanged="DataItemChanged"
TextWrapEnabled="false"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
@ -56,7 +53,7 @@
</UserProductMappingGridComponent>
</DxTabPage>
<DxTabPage Text="Profile">
<ProfileGridComponent ParentData="((Product)context.DataItem)" KeyboardNavigationEnabled="true" />
<ProfileGridComponent ParentData="((Product)context.DataItem)" />
</DxTabPage>
</DxTabs>
</DetailRowTemplate>
@ -85,7 +82,6 @@
</ProductDetailGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public Guid? ContextId { get; set; }
[Parameter] public IProductsRelation? ParentData { get; set; } = null!;
[Parameter] public EventCallback<GridEditModelSavingEventArgs> OnGridEditModelSaving { get; set; }

View File

@ -28,9 +28,6 @@
OnGridEditModelSaving="DataItemSaving"
OnGridItemDeleting="DataItemDeleting"
OnGridItemChanged="DataItemChanged"
TextWrapEnabled="false"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
@ -49,14 +46,14 @@
<DetailRowTemplate>
<DxTabs>
<DxTabPage Text="Prices">
<TransferDestinationToProductDetailGridComponent GetAllTag="SignalRTags.GetTransferDestinationToProductsByProductId" ContextIds="new [] {((Product)context.DataItem).Id}" KeyboardNavigationEnabled="true" />
<TransferDestinationToProductDetailGridComponent GetAllTag="SignalRTags.GetTransferDestinationToProductsByProductId" ContextIds="new [] {((Product)context.DataItem).Id}" />
</DxTabPage>
<DxTabPage Text="Permissions">
<UserProductMappingGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Never" ContextIds="new[] { ((Product)context.DataItem).Id }" GetAllTag="SignalRTags.GetUserProductMappingsByProductId">
</UserProductMappingGridComponent>
</DxTabPage>
<DxTabPage Text="Profile">
<ProfileGridComponent ParentData="((Product)context.DataItem)" KeyboardNavigationEnabled="true" />
<ProfileGridComponent ParentData="((Product)context.DataItem)" />
</DxTabPage>
</DxTabs>
</DetailRowTemplate>
@ -85,7 +82,6 @@
</ProductGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public EventCallback<GridEditModelSavingEventArgs> OnGridEditModelSaving { get; set; }
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;

View File

@ -20,11 +20,7 @@
ContextIds="@(ParentData.ProfileId.IsNullOrEmpty() ? throw new InvalidDataException($"ParentData.ProfileId.IsNullOrEmpty(); ParentData.ProfileId: {ParentData.ProfileId}") : [ParentData.ProfileId])"
Logger="_logger"
SignalRClient="AdminSignalRClient"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
TextWrapEnabled="false"
AutoExpandAllGroupRows="true"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
DetailExpandButtonDisplayMode="DetailExpandButtonDisplayMode">
@ -39,7 +35,7 @@
<DetailRowTemplate>
<DxTabs>
<DxTabPage Text="Address">
<AddressDetailGridComponent ParentData="((Profile)context.DataItem)" KeyboardNavigationEnabled="true" />
<AddressDetailGridComponent ParentData="((Profile)context.DataItem)" />
</DxTabPage>
</DxTabs>
</DetailRowTemplate>
@ -48,7 +44,6 @@
@code {
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public IProfileForeignKey ParentData { get; set; } = null!;
private ProfileDetailGrid _profileGrid = null!;

View File

@ -20,9 +20,6 @@
SignalRClient="AdminSignalRClient"
ContextIds="ContextIds"
PageSize="5"
AutoExpandAllGroupRows="true"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
@ -39,7 +36,7 @@
<DxTabs>
<DxTabPage Text="Products">
<ProductDetailGridComponent ParentData="(Company)context.DataItem" ContextId="((Company)context.DataItem).Id" KeyboardNavigationEnabled="true" />
<ProductDetailGridComponent ParentData="(Company)context.DataItem" ContextId="((Company)context.DataItem).Id" />
</DxTabPage>
</DxTabs>
@ -67,7 +64,6 @@
</CompanyDetailGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public UserModelDtoDetail UserModelDtoDetail { get; set; }
[Parameter] public Guid? ContextId { get; set; }

View File

@ -23,12 +23,10 @@
SignalRClient="AdminSignalRClient"
PageSize="8"
GetAllMessageTag="GetAllTag"
KeyFieldName="Id"
ValidationEnabled="false"
CustomizeEditModel="CustomizeEditModel"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.ColumnsContainer"
KeyboardNavigationEnabled="true"
ShowFilterRow="true">
<Columns>
<DxGridCommandColumn Width="8%" FixedPosition="GridColumnFixedPosition.Left" />
@ -54,7 +52,7 @@
<DetailRowTemplate>
<DxTabs>
<DxTabPage Text="Prices">
<TransferDestinationToProductDetailGridComponent GetAllTag="SignalRTags.GetTransferDestinationToProductsByTransferDestinationId" ContextIds="new [] {((TransferDestination)context.DataItem).Id}" KeyboardNavigationEnabled="true" />
<TransferDestinationToProductDetailGridComponent GetAllTag="SignalRTags.GetTransferDestinationToProductsByTransferDestinationId" ContextIds="new [] {((TransferDestination)context.DataItem).Id}" />
</DxTabPage>
</DxTabs>
</DetailRowTemplate>
@ -94,7 +92,6 @@
</TransferDestinationGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public Guid? ContextId { get; set; }
[Parameter] public int GetAllTag { get; set; }
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;

View File

@ -22,8 +22,6 @@
ContextIds="ContextIds"
GetAllMessageTag="GetAllTag"
PageSize="10"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn">
@ -47,7 +45,7 @@
<DxTabs>
<DxTabPage Text="Partner">
<ProductDetailGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto" GetAllTag="SignalRTags.GetProductsById" ContextId="((TransferDestinationToProduct)context.DataItem).ProductId" ParentData="(Company)context.DataItem" KeyboardNavigationEnabled="true" />
<ProductDetailGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto" GetAllTag="SignalRTags.GetProductsById" ContextId="((TransferDestinationToProduct)context.DataItem).ProductId" ParentData="(Company)context.DataItem" />
</DxTabPage>
</DxTabs>
@ -81,7 +79,6 @@
</TransferDestinationToProductDetailGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
[Parameter] public Guid[]? ContextIds { get; set; } = null!;
[Parameter] public int GetAllTag { get; set; } = SignalRTags.GetAllTransferDestinationToProducts;

View File

@ -20,8 +20,6 @@
Logger="_logger"
SignalRClient="AdminSignalRClient"
PageSize="10"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
EditMode="GridEditMode.EditForm"
ColumnResizeMode="GridColumnResizeMode.NextColumn">
@ -71,7 +69,6 @@
</TransferDestinationToProductGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
private LoggerClient<TransferDestinationToProductGridComponent> _logger = null!;

View File

@ -11,6 +11,10 @@
@using AyCode.Core.Enums
@using AyCode.Core.Extensions
@using AyCode.Core
@using AyCode.Core.Helpers
@using AyCode.Services.SignalRs
@using TIAM.Entities.Users
@using TIAM.Services
@inject IUserDataService UserDataService
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
@inject AdminSignalRClient AdminSignalRClient;
@ -23,23 +27,31 @@
OnGridEditModelSaving="DataItemSaving"
OnGridItemDeleting="DataItemDeleting"
OnGridItemChanged="DataItemChanged"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
CustomizeEditModel="CustomizeEditModel"
EditMode="GridEditMode.EditRow"
ColumnResizeMode="GridColumnResizeMode.NextColumn">
<Columns>
<DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" />
<DxGridDataColumn FieldName="Id" SortIndex="0" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
<DxGridDataColumn FieldName="CarId" Width="40%" />
<DxGridDataColumn FieldName="LicencePlate" />
<DxGridCommandColumn Width="150" MinWidth="150" FixedPosition="GridColumnFixedPosition.Left" />
<DxGridDataColumn FieldName="CarId" />
@*<DxGridDataColumn FieldName="CarId">
<EditSettings>
<DxComboBoxSettings Data="_cars" SearchMode="ListSearchMode.AutoSearch" Key
ValueFieldName="Id"
TextFieldName="LicencePlate" />
</EditSettings>
</DxGridDataColumn>*@
<DxGridDataColumn FieldName="Price" />
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
@{
var userEmailFieldName = $"{nameof(TransferToDriver.UserProductMapping)}.{nameof(UserProductMapping.User)}.{nameof(User.EmailAddress)}";
}
<DxGridDataColumn FieldName="@userEmailFieldName" Caption="User email" SortIndex="0" ReadOnly="true" />
<DxGridDataColumn FieldName="LicencePlate" ReadOnly="true" />
</Columns>
</TransferToDriversDetailGrid>
@code {
[Parameter] public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public Guid? ContextId { get; set; }
[Parameter] public ITransferToDriversRelation ParentData { get; set; } = null!;
[Parameter] public EventCallback<TransferToDriver> OnTransferToDriverChanged { get; set; }
@ -47,11 +59,37 @@
private TransferToDriversDetailGrid _transferToDriversGrid = null!;
private LoggerClient<TransferToDriverGridComponent> _logger = null!;
protected override void OnInitialized()
private List<Car> _cars = [];
protected override async Task OnInitializedAsync()
{
_logger = new LoggerClient<TransferToDriverGridComponent>(LogWriters.ToArray());
_logger.Info($"DetailGridData: {ParentData.TransferToDrivers.Count}");
//_cars.AddRange((await AdminSignalRClient.GetAllAsync<List<Car>>(SignalRTags.GetAllCars))!);
await base.OnInitializedAsync();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
// _transferToDriversGrid.BeginUpdate();
// _cars.AddRange((await AdminSignalRClient.GetAllAsync<List<Car>>(SignalRTags.GetAllCars))!);
// _transferToDriversGrid.EndUpdate();
// AdminSignalRClient.GetAllAsync<List<Car>>(SignalRTags.GetAllCars, response =>
// {
// if (response is { Status: SignalResponseStatus.Success, ResponseData: not null })
// _cars.AddRange(response.ResponseData);
// return Task.CompletedTask;
// }).Forget();
}
await base.OnAfterRenderAsync(firstRender);
}
private void DataItemChanged(GridDataItemChangedEventArgs<TransferToDriver> args)

View File

@ -22,9 +22,6 @@
GetAllMessageTag="GetAllTag"
SignalRClient="AdminSignalRClient"
PageSize="10"
AutoExpandAllGroupRows="true"
KeyboardNavigationEnabled="KeyboardNavigationEnabled"
KeyFieldName="Id"
ValidationEnabled="false"
CustomizeEditModel="CustomizeEditModel"
EditMode="GridEditMode.EditForm"
@ -55,7 +52,7 @@
@{
<DxTabs>
<DxTabPage Text="Products">
<ProductDetailGridComponent GetAllTag="SignalRTags.GetProductsById" ContextId="((UserProductMapping)context.DataItem).ProductId" KeyboardNavigationEnabled="true"/>
<ProductDetailGridComponent GetAllTag="SignalRTags.GetProductsById" ContextId="((UserProductMapping)context.DataItem).ProductId" />
</DxTabPage>
</DxTabs>
}
@ -82,9 +79,6 @@
</UserProductMappingGrid>
@code {
[Parameter]
public bool KeyboardNavigationEnabled { get; set; }
[Parameter] public IProductRelation ParentData { get; set; } = null!;
[Parameter] public int GetAllTag { get; set; } = SignalRTags.GetAllUserProductMappings;

View File

@ -230,6 +230,9 @@ namespace TIAMSharedUI.Shared.Components.Grids
{
if (!IsFirstInitializeParameters)
{
//if (typeof(TDataItem) is IId<Guid> || typeof(TDataItem) is IId<int>)
KeyFieldName = "Id";
base.DataItemDeleting = EventCallback.Factory.Create<GridDataItemDeletingEventArgs>(this, OnItemDeleting);
base.EditModelSaving = EventCallback.Factory.Create<GridEditModelSavingEventArgs>(this, OnItemSaving);
@ -243,6 +246,9 @@ namespace TIAMSharedUI.Shared.Components.Grids
TextWrapEnabled = false;
AllowSelectRowByClick = true;
HighlightRowOnHover = true;
AutoCollapseDetailRow = true;
AutoExpandAllGroupRows = false;
//KeyboardNavigationEnabled = true;
//var dataColumns = GetDataColumns();