DevExpress Fluent theme: grid/info panel refactor
Major refactor for DevExpress Fluent theme compatibility: - InfoPanel templates now use strongly-typed context (`InfoPanelContext`) - Unified grid layout with `MgGridWithInfoPanel` wrapper - CSS updated to use Fluent theme variables and container queries - App-wide CSS cleanup and formatting improvements - `.editorconfig` added for modern CSS support - Improved InfoPanel instance resolution for nested grids - Codebase is cleaner, more maintainable, and ready for further customization
This commit is contained in:
parent
e8d38f0038
commit
271868b4d5
|
|
@ -74,7 +74,6 @@
|
|||
</ToolbarTemplate>
|
||||
</GridProductDto>
|
||||
|
||||
|
||||
@code {
|
||||
[Inject] public required DatabaseClient Database { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -15,78 +15,80 @@
|
|||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||
@inject FruitBankSignalRClient FruitBankSignalRClient
|
||||
|
||||
<GridShippingItemBase @ref="Grid" ParentDataItem="ParentDataItem" DataSource="ShippingItems" AutoSaveLayoutName="GridShippingItem"
|
||||
SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false" CustomizeElement="Grid_CustomizeElement"
|
||||
OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" Caption="oiId" Width="125" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="ShippingDocumentId" Caption="ShippingDocument"
|
||||
Visible="@(!ParentDataItemIsShippingDocument)" ReadOnly="@(ParentDataItemIsShippingDocument)">
|
||||
<EditSettings>
|
||||
<DxComboBoxSettings Data="ShippingDocuments"
|
||||
ValueFieldName="Id"
|
||||
TextFieldName="@nameof(ShippingDocument.PdfFileName)"
|
||||
DropDownBodyCssClass="dd-body-class"
|
||||
ListRenderMode="ListRenderMode.Entire"
|
||||
SearchMode="ListSearchMode.AutoSearch"
|
||||
SearchFilterCondition="ListSearchFilterCondition.Contains"
|
||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto">
|
||||
<Columns>
|
||||
<DxListEditorColumn FieldName="@nameof(ShippingDocument.Id)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ShippingDocument.DocumentIdNumber)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ShippingDocument.PdfFileName)" />
|
||||
<DxListEditorColumn FieldName="@("Partner.Name")" />
|
||||
</Columns>
|
||||
</DxComboBoxSettings>
|
||||
</EditSettings>
|
||||
</DxGridDataColumn>
|
||||
<MgGridWithInfoPanel ShowInfoPanel="@IsMasterGrid">
|
||||
<GridContent>
|
||||
<GridShippingItemBase @ref="Grid" ParentDataItem="ParentDataItem" DataSource="ShippingItems" AutoSaveLayoutName="GridShippingItem"
|
||||
SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false" CustomizeElement="Grid_CustomizeElement"
|
||||
OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" Caption="oiId" Width="125" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="ShippingDocumentId" Caption="ShippingDocument"
|
||||
Visible="@(!ParentDataItemIsShippingDocument)" ReadOnly="@(ParentDataItemIsShippingDocument)">
|
||||
<EditSettings>
|
||||
<DxComboBoxSettings Data="ShippingDocuments"
|
||||
ValueFieldName="Id"
|
||||
TextFieldName="@nameof(ShippingDocument.PdfFileName)"
|
||||
DropDownBodyCssClass="dd-body-class"
|
||||
ListRenderMode="ListRenderMode.Entire"
|
||||
SearchMode="ListSearchMode.AutoSearch"
|
||||
SearchFilterCondition="ListSearchFilterCondition.Contains"
|
||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto">
|
||||
<Columns>
|
||||
<DxListEditorColumn FieldName="@nameof(ShippingDocument.Id)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ShippingDocument.DocumentIdNumber)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ShippingDocument.PdfFileName)" />
|
||||
<DxListEditorColumn FieldName="@("Partner.Name")" />
|
||||
</Columns>
|
||||
</DxComboBoxSettings>
|
||||
</EditSettings>
|
||||
</DxGridDataColumn>
|
||||
|
||||
<DxGridDataColumn FieldName="@("ShippingDocument.Partner.Name")" Caption="Patner" Width="125" ReadOnly="true" Visible="@(!ParentDataItemIsShippingDocument)" />
|
||||
<DxGridDataColumn FieldName="@("ShippingDocument.Partner.Name")" Caption="Patner" Width="125" ReadOnly="true" Visible="@(!ParentDataItemIsShippingDocument)" />
|
||||
|
||||
<DxGridDataColumn FieldName="ProductId" Caption="Product">
|
||||
<EditSettings>
|
||||
<DxComboBoxSettings Data="ProductDtos"
|
||||
ValueFieldName="Id"
|
||||
TextFieldName="Name"
|
||||
DropDownBodyCssClass="dd-body-class"
|
||||
ListRenderMode="ListRenderMode.Entire"
|
||||
SearchMode="ListSearchMode.AutoSearch"
|
||||
SearchFilterCondition="ListSearchFilterCondition.Contains"
|
||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto">
|
||||
<Columns>
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.Id)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.Name)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.AvailableQuantity)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.StockQuantity)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.IncomingQuantity)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.NetWeight)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.IsMeasurable)" />
|
||||
</Columns>
|
||||
</DxComboBoxSettings>
|
||||
</EditSettings>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="ProductId" Caption="Product">
|
||||
<EditSettings>
|
||||
<DxComboBoxSettings Data="ProductDtos"
|
||||
ValueFieldName="Id"
|
||||
TextFieldName="Name"
|
||||
DropDownBodyCssClass="dd-body-class"
|
||||
ListRenderMode="ListRenderMode.Entire"
|
||||
SearchMode="ListSearchMode.AutoSearch"
|
||||
SearchFilterCondition="ListSearchFilterCondition.Contains"
|
||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto">
|
||||
<Columns>
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.Id)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.Name)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.AvailableQuantity)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.StockQuantity)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.IncomingQuantity)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.NetWeight)" />
|
||||
<DxListEditorColumn FieldName="@nameof(ProductDto.IsMeasurable)" />
|
||||
</Columns>
|
||||
</DxComboBoxSettings>
|
||||
</EditSettings>
|
||||
</DxGridDataColumn>
|
||||
|
||||
<DxGridDataColumn FieldName="NameOnDocument" MinWidth="120" Caption="Name(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="Name" MinWidth="120" Caption="Name" Visible="false" />
|
||||
<DxGridDataColumn FieldName="PalletsOnDocument" Caption="Raklap(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="QuantityOnDocument" Caption="Mennyiség(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="NetWeightOnDocument" Caption="Net.súly(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="GrossWeightOnDocument" Caption="Br.súly(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="MeasuringCount" Caption="Mérések száma" />
|
||||
<DxGridDataColumn FieldName="NameOnDocument" MinWidth="120" Caption="Name(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="Name" MinWidth="120" Caption="Name" Visible="false" />
|
||||
<DxGridDataColumn FieldName="PalletsOnDocument" Caption="Raklap(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="QuantityOnDocument" Caption="Mennyiség(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="NetWeightOnDocument" Caption="Net.súly(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="GrossWeightOnDocument" Caption="Br.súly(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="MeasuringCount" Caption="Mérések száma" />
|
||||
|
||||
<DxGridDataColumn FieldName="MeasuredQuantity" Name="MeasuredQuantity" Caption="Mért mennyiség" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredNetWeight" Name="MeasuredNetWeight" Caption="Mért net.súly(kg)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredGrossWeight" Name="MeasuredGrossWeight" Caption="Mért br.súly(kg)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredQuantity" Name="MeasuredQuantity" Caption="Mért mennyiség" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredNetWeight" Name="MeasuredNetWeight" Caption="Mért net.súly(kg)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredGrossWeight" Name="MeasuredGrossWeight" Caption="Mért br.súly(kg)" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="IsMeasurable" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="IsMeasured" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="IsMeasurable" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="IsMeasured" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="Created" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="Modified" ReadOnly="true" />
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
@* <DataColumnCellDisplayTemplate>
|
||||
<DxGridDataColumn FieldName="Created" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="Modified" ReadOnly="true" />
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
@* <DataColumnCellDisplayTemplate>
|
||||
@{
|
||||
if (context.DataColumn.FieldName == nameof(ShippingItem.ShippingDocumentId))
|
||||
{
|
||||
|
|
@ -100,30 +102,31 @@
|
|||
}
|
||||
</DataColumnCellDisplayTemplate>
|
||||
*@ <DetailRowTemplate>
|
||||
@{
|
||||
var shippingItemPallets = ((ShippingItem)context.DataItem).ShippingItemPallets;
|
||||
<GridShippingItemPallets ShippingItemPallets="shippingItemPallets" IsMasterGrid="false"></GridShippingItemPallets>
|
||||
}
|
||||
</DetailRowTemplate>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
<GroupSummary>
|
||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||
FieldName="MeasuredQuantity"
|
||||
FooterColumnName="Quantity" />
|
||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||
FieldName="MeasuredGrossWeight"
|
||||
FooterColumnName="GrossWeight" />
|
||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||
FieldName="MeasuredNetWeight"
|
||||
FooterColumnName="NetWeight" />
|
||||
</GroupSummary>
|
||||
</GridShippingItemBase>
|
||||
@* </MgGridBase> *@
|
||||
@{
|
||||
var shippingItemPallets = ((ShippingItem)context.DataItem).ShippingItemPallets;
|
||||
<GridShippingItemPallets ShippingItemPallets="shippingItemPallets" IsMasterGrid="false"></GridShippingItemPallets>
|
||||
}
|
||||
</DetailRowTemplate>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
<GroupSummary>
|
||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||
FieldName="MeasuredQuantity"
|
||||
FooterColumnName="Quantity" />
|
||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||
FieldName="MeasuredGrossWeight"
|
||||
FooterColumnName="GrossWeight" />
|
||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||
FieldName="MeasuredNetWeight"
|
||||
FooterColumnName="NetWeight" />
|
||||
</GroupSummary>
|
||||
</GridShippingItemBase>
|
||||
</GridContent>
|
||||
</MgGridWithInfoPanel>
|
||||
|
||||
@code {
|
||||
//[Inject] public required ObjectLock ObjectLock { get; set; }
|
||||
|
|
|
|||
|
|
@ -15,32 +15,36 @@
|
|||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||
@inject FruitBankSignalRClient FruitBankSignalRClient
|
||||
|
||||
<GridGenericAttributeBase @ref="Grid" DataSource="GenericAttributes" AutoSaveLayoutName="GridGenericAttribute" SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
ParentDataItem="@ParentDataItem" CssClass="@GridCss" ValidationEnabled="false" OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.Id)" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
<MgGridWithInfoPanel ShowInfoPanel="@IsMasterGrid">
|
||||
<GridContent>
|
||||
<GridGenericAttributeBase @ref="Grid" DataSource="GenericAttributes" AutoSaveLayoutName="GridGenericAttribute" SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
ParentDataItem="@ParentDataItem" CssClass="@GridCss" ValidationEnabled="false" OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.Id)" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.KeyGroup)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.Key)" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.Value)" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.EntityId)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.StoreId)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.CreatedOrUpdatedDateUTC)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.KeyGroup)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.Key)" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.Value)" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.EntityId)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.StoreId)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="@nameof(GenericAttribute.CreatedOrUpdatedDateUTC)" ReadOnly="true" />
|
||||
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridGenericAttributeBase>
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridGenericAttributeBase>
|
||||
</GridContent>
|
||||
</MgGridWithInfoPanel>
|
||||
|
||||
@code {
|
||||
[Inject] public required DatabaseClient Database { get; set; }
|
||||
|
||||
[Parameter] public AcObservableCollection<GenericAttributeDto>? GenericAttributes{ get; set; }
|
||||
[Parameter] public AcObservableCollection<GenericAttributeDto>? GenericAttributes { get; set; }
|
||||
|
||||
//[Parameter] public object[]? ContextIds { get; set; }
|
||||
[Parameter] public IId<int>? ParentDataItem { get; set; }
|
||||
|
|
|
|||
|
|
@ -13,62 +13,66 @@
|
|||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||
@inject FruitBankSignalRClient FruitBankSignalRClient
|
||||
|
||||
<GridPartnerBase @ref="Grid"
|
||||
DataSource="Partners"
|
||||
AutoSaveLayoutName="GridPartner"
|
||||
SignalRClient="FruitBankSignalRClient"
|
||||
Logger="_logger"
|
||||
CssClass="@GridCss"
|
||||
ValidationEnabled="false"
|
||||
ShowInfoPanel="true"
|
||||
OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
<MgGridWithInfoPanel ShowInfoPanel="@IsMasterGrid">
|
||||
<GridContent>
|
||||
<GridPartnerBase @ref="Grid"
|
||||
DataSource="Partners"
|
||||
AutoSaveLayoutName="GridPartner"
|
||||
SignalRClient="FruitBankSignalRClient"
|
||||
Logger="_logger"
|
||||
CssClass="@GridCss"
|
||||
ValidationEnabled="false"
|
||||
ShowInfoPanel="true"
|
||||
OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="Name" />
|
||||
<DxGridDataColumn FieldName="TaxId" />
|
||||
<DxGridDataColumn FieldName="CertificationNumber" />
|
||||
<DxGridDataColumn FieldName="PostalCode" />
|
||||
<DxGridDataColumn FieldName="@nameof(Partner.Country)" />
|
||||
<DxGridDataColumn FieldName="State" />
|
||||
<DxGridDataColumn FieldName="County" />
|
||||
<DxGridDataColumn FieldName="City" />
|
||||
<DxGridDataColumn FieldName="Street" />
|
||||
<DxGridDataColumn FieldName="Name" />
|
||||
<DxGridDataColumn FieldName="TaxId" />
|
||||
<DxGridDataColumn FieldName="CertificationNumber" />
|
||||
<DxGridDataColumn FieldName="PostalCode" />
|
||||
<DxGridDataColumn FieldName="@nameof(Partner.Country)" />
|
||||
<DxGridDataColumn FieldName="State" />
|
||||
<DxGridDataColumn FieldName="County" />
|
||||
<DxGridDataColumn FieldName="City" />
|
||||
<DxGridDataColumn FieldName="Street" />
|
||||
|
||||
<DxGridDataColumn FieldName="Created" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="Modified" ReadOnly="true" />
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
<DetailRowTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
var partner = ((Partner)context.DataItem);
|
||||
var shippingDocuments = partner?.ShippingDocuments ?? [];
|
||||
<DxGridDataColumn FieldName="Created" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="Modified" ReadOnly="true" />
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
<DetailRowTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
var partner = ((Partner)context.DataItem);
|
||||
var shippingDocuments = partner?.ShippingDocuments ?? [];
|
||||
|
||||
<DxTabs>
|
||||
<DxTabPage Text="Szállítólevelek">
|
||||
@{
|
||||
var observableShippingDocuments = new AcObservableCollection<ShippingDocument>(shippingDocuments);
|
||||
<GridShippingDocument ShippingDocuments="@observableShippingDocuments" ParentDataItem="@partner" Partners="@Partners"></GridShippingDocument>
|
||||
}
|
||||
</DxTabPage>
|
||||
<DxTabs>
|
||||
<DxTabPage Text="Szállítólevelek">
|
||||
@{
|
||||
var observableShippingDocuments = new AcObservableCollection<ShippingDocument>(shippingDocuments);
|
||||
<GridShippingDocument ShippingDocuments="@observableShippingDocuments" ParentDataItem="@partner" Partners="@Partners"></GridShippingDocument>
|
||||
}
|
||||
</DxTabPage>
|
||||
|
||||
<DxTabPage Text="Szállítmány tételek">
|
||||
@{
|
||||
var observableShippingItems = new AcObservableCollection<ShippingItem>(shippingDocuments.SelectMany(sd => sd.ShippingItems ?? []));
|
||||
<GridShippingItemTemplate ShippingItems="@observableShippingItems" ParentDataItem="@partner" />
|
||||
}
|
||||
</DxTabPage>
|
||||
</DxTabs>
|
||||
}
|
||||
</DetailRowTemplate>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridPartnerBase>
|
||||
<DxTabPage Text="Szállítmány tételek">
|
||||
@{
|
||||
var observableShippingItems = new AcObservableCollection<ShippingItem>(shippingDocuments.SelectMany(sd => sd.ShippingItems ?? []));
|
||||
<GridShippingItemTemplate ShippingItems="@observableShippingItems" ParentDataItem="@partner" />
|
||||
}
|
||||
</DxTabPage>
|
||||
</DxTabs>
|
||||
}
|
||||
</DetailRowTemplate>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridPartnerBase>
|
||||
</GridContent>
|
||||
</MgGridWithInfoPanel>
|
||||
|
||||
@code {
|
||||
//[Inject] public required ObjectLock ObjectLock { get; set; }
|
||||
|
|
|
|||
|
|
@ -11,45 +11,47 @@
|
|||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||
@inject FruitBankSignalRClient FruitBankSignalRClient
|
||||
|
||||
<GridStockQuantityHistoryDtoBase @ref="Grid" ContextIds="ContextIds" ParentDataItem="ParentDataItem" DataSource="StockQuantityHistoryDtos"
|
||||
AutoSaveLayoutName="GridStockQuantityHistoryDto" SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" Width="125" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
<MgGridWithInfoPanel ShowInfoPanel="@IsMasterGrid">
|
||||
<GridContent>
|
||||
<GridStockQuantityHistoryDtoBase @ref="Grid" ContextIds="ContextIds" ParentDataItem="ParentDataItem" DataSource="StockQuantityHistoryDtos"
|
||||
AutoSaveLayoutName="GridStockQuantityHistoryDto" SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" Width="125" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="ProductId" ReadOnly="true" Visible="@IsMasterGrid">
|
||||
<EditSettings>
|
||||
<DxComboBoxSettings Data="ProductDtos"
|
||||
ValueFieldName="Id"
|
||||
TextFieldName="Name"
|
||||
DropDownBodyCssClass="dd-body-class"
|
||||
ListRenderMode="ListRenderMode.Entire"
|
||||
SearchMode="ListSearchMode.AutoSearch"
|
||||
SearchFilterCondition="ListSearchFilterCondition.Contains"
|
||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto" />
|
||||
</EditSettings>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="QuantityAdjustment" Width="135" Caption="Adj. Quantity" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="StockQuantity" Width="135" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="ProductId" ReadOnly="true" Visible="@IsMasterGrid">
|
||||
<EditSettings>
|
||||
<DxComboBoxSettings Data="ProductDtos"
|
||||
ValueFieldName="Id"
|
||||
TextFieldName="Name"
|
||||
DropDownBodyCssClass="dd-body-class"
|
||||
ListRenderMode="ListRenderMode.Entire"
|
||||
SearchMode="ListSearchMode.AutoSearch"
|
||||
SearchFilterCondition="ListSearchFilterCondition.Contains"
|
||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto" />
|
||||
</EditSettings>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="QuantityAdjustment" Width="135" Caption="Adj. Quantity" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="StockQuantity" Width="135" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="StockQuantityHistoryId" Width="135" Caption="SqhId" ReadOnly="true" Visible="false" />
|
||||
<DxGridDataColumn FieldName="NetWeightAdjustment" Width="135" Caption="Adj. NetWeight(kg)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="NetWeight" Width="135" Caption="Net Weight(kg)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="StockQuantityHistoryId" Width="135" Caption="SqhId" ReadOnly="true" Visible="false" />
|
||||
<DxGridDataColumn FieldName="NetWeightAdjustment" Width="135" Caption="Adj. NetWeight(kg)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="NetWeight" Width="135" Caption="Net Weight(kg)" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="Message" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="IsInconsistent" Width="105" Caption="Inconsistent" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="CombinationId" Width="125" ReadOnly="true" Visible="false" />
|
||||
<DxGridDataColumn FieldName="WarehouseId" Width="125" ReadOnly="true" Visible="false" />
|
||||
<DxGridDataColumn FieldName="Message" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="IsInconsistent" Width="105" Caption="Inconsistent" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="CombinationId" Width="125" ReadOnly="true" Visible="false" />
|
||||
<DxGridDataColumn FieldName="WarehouseId" Width="125" ReadOnly="true" Visible="false" />
|
||||
|
||||
<DxGridDataColumn FieldName="CreatedOnUtc" Width="150" Caption="Created" ReadOnly="true" DisplayFormat="g" />
|
||||
</Columns>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
@* <GroupSummary>
|
||||
<DxGridDataColumn FieldName="CreatedOnUtc" Width="150" Caption="Created" ReadOnly="true" DisplayFormat="g" />
|
||||
</Columns>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
@* <GroupSummary>
|
||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||
FieldName="MeasuredQuantity"
|
||||
FooterColumnName="Quantity" />
|
||||
|
|
@ -60,7 +62,9 @@
|
|||
FieldName="MeasuredNetWeight"
|
||||
FooterColumnName="NetWeight" />
|
||||
</GroupSummary> *@
|
||||
</GridStockQuantityHistoryDtoBase>
|
||||
</GridStockQuantityHistoryDtoBase>
|
||||
</GridContent>
|
||||
</MgGridWithInfoPanel>
|
||||
|
||||
@code {
|
||||
[Inject] public required DatabaseClient Database { get; set; }
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@
|
|||
@inject IJSRuntime JS
|
||||
|
||||
<MgGridInfoPanel OnDataItemChanged="OnDataItemChangedAsync">
|
||||
@* <HeaderTemplate Context="dataItem">
|
||||
@* <HeaderTemplate Context="ctx">
|
||||
<div class="dxbl-grid-header-panel px-3 py-2 border-bottom d-flex align-items-center">
|
||||
<span class="me-2">??</span>
|
||||
<span class="fw-semibold">Szállítólevél részletei</span>
|
||||
</div>
|
||||
</HeaderTemplate> *@
|
||||
|
||||
@* <BeforeColumnsTemplate Context="dataItem">
|
||||
@if (dataItem is ShippingDocument doc)
|
||||
@* <BeforeColumnsTemplate Context="ctx">
|
||||
@if (ctx.DataItem is ShippingDocument doc)
|
||||
{
|
||||
<div class="alert alert-info mb-2 py-1 px-2 small">
|
||||
<strong>Partner:</strong> @doc.Partner?.Name
|
||||
|
|
@ -21,8 +21,8 @@
|
|||
}
|
||||
</BeforeColumnsTemplate> *@
|
||||
|
||||
<AfterColumnsTemplate Context="dataItem">
|
||||
@if (dataItem is ShippingDocument doc)
|
||||
<AfterColumnsTemplate Context="ctx">
|
||||
@if (ctx is { IsEditMode: false, DataItem: ShippingDocument doc })
|
||||
{
|
||||
<table class="table table-sm table-bordered table-striped" style="margin-top: 35px;">
|
||||
<colgroup>
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
}
|
||||
</AfterColumnsTemplate>
|
||||
|
||||
@* <FooterTemplate Context="dataItem">
|
||||
@* <FooterTemplate Context="ctx">
|
||||
<div class="p-2 border-top d-flex gap-2">
|
||||
<DxButton Text="Nyomtatás" IconCssClass="dx-icon dx-icon-print" RenderStyle="ButtonRenderStyle.Light" />
|
||||
<DxButton Text="Export" IconCssClass="dx-icon dx-icon-export" RenderStyle="ButtonRenderStyle.Light" />
|
||||
|
|
|
|||
|
|
@ -15,50 +15,54 @@
|
|||
|
||||
@* <GridShippingBase @ref="Grid" Data="Shippings" AutoSaveLayoutName="GridShipping"> *@
|
||||
|
||||
<GridShippingBase @ref="Grid" DataSource="Shippings" AutoSaveLayoutName="GridShipping" SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false"
|
||||
OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
<MgGridWithInfoPanel ShowInfoPanel="@IsMasterGrid">
|
||||
<GridContent>
|
||||
<GridShippingBase @ref="Grid" DataSource="Shippings" AutoSaveLayoutName="GridShipping" SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false"
|
||||
OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="ShippingDate" />
|
||||
<DxGridDataColumn FieldName="LicencePlate" />
|
||||
<DxGridDataColumn FieldName="ShippingDate" />
|
||||
<DxGridDataColumn FieldName="LicencePlate" />
|
||||
|
||||
<DxGridDataColumn FieldName="IsAllMeasured" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="Created" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="Modified" ReadOnly="true" />
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
<DetailRowTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
var shipping = ((Shipping)context.DataItem);
|
||||
var shippingDocuments = shipping?.ShippingDocuments ?? [];
|
||||
<DxGridDataColumn FieldName="IsAllMeasured" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="Created" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="Modified" ReadOnly="true" />
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
<DetailRowTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
var shipping = ((Shipping)context.DataItem);
|
||||
var shippingDocuments = shipping?.ShippingDocuments ?? [];
|
||||
|
||||
<DxTabs ActiveTabIndexChanged="(i) => OnActiveTabChanged(i)">
|
||||
<DxTabPage Text="Szállítólevelek">
|
||||
@{
|
||||
var observableShippingDocuments = new AcObservableCollection<ShippingDocument>(shippingDocuments);
|
||||
<GridShippingDocument ShippingDocuments="@observableShippingDocuments" ParentDataItem="@shipping" Partners="@Partners"></GridShippingDocument>
|
||||
}
|
||||
</DxTabPage>
|
||||
<DxTabs ActiveTabIndexChanged="(i) => OnActiveTabChanged(i)">
|
||||
<DxTabPage Text="Szállítólevelek">
|
||||
@{
|
||||
var observableShippingDocuments = new AcObservableCollection<ShippingDocument>(shippingDocuments);
|
||||
<GridShippingDocument ShippingDocuments="@observableShippingDocuments" ParentDataItem="@shipping" Partners="@Partners"></GridShippingDocument>
|
||||
}
|
||||
</DxTabPage>
|
||||
|
||||
<DxTabPage Text="Szállítmány tételek">
|
||||
@{
|
||||
var observableShippingItems = new AcObservableCollection<ShippingItem>(shippingDocuments.SelectMany(sd => sd.ShippingItems ?? []));
|
||||
<GridShippingItemTemplate ShippingItems="@observableShippingItems" ParentDataItem="@shipping" />
|
||||
}
|
||||
</DxTabPage>
|
||||
</DxTabs>
|
||||
}
|
||||
</DetailRowTemplate>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridShippingBase>
|
||||
<DxTabPage Text="Szállítmány tételek">
|
||||
@{
|
||||
var observableShippingItems = new AcObservableCollection<ShippingItem>(shippingDocuments.SelectMany(sd => sd.ShippingItems ?? []));
|
||||
<GridShippingItemTemplate ShippingItems="@observableShippingItems" ParentDataItem="@shipping" />
|
||||
}
|
||||
</DxTabPage>
|
||||
</DxTabs>
|
||||
}
|
||||
</DetailRowTemplate>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridShippingBase>
|
||||
</GridContent>
|
||||
</MgGridWithInfoPanel>
|
||||
|
||||
@code {
|
||||
//[Inject] public required ObjectLock ObjectLock { get; set; }
|
||||
|
|
|
|||
|
|
@ -13,43 +13,47 @@
|
|||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||
@inject FruitBankSignalRClient FruitBankSignalRClient
|
||||
|
||||
<GridStockTakingItemBase @ref="Grid" AutoSaveLayoutName="GridStockTakingItem" SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false" OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
<MgGridWithInfoPanel ShowInfoPanel="@IsMasterGrid">
|
||||
<GridContent>
|
||||
<GridStockTakingItemBase @ref="Grid" AutoSaveLayoutName="GridStockTakingItem" SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false" OnGridFocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.StockTakingId)" TextAlignment="GridTextAlignment.Left" Caption="Leltár időpontja">
|
||||
<CellDisplayTemplate>
|
||||
<span>@(((StockTakingItem)context.DataItem)?.StockTaking?.StartDateTime.ToString("g") ?? "")</span>
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="Product.Name" />
|
||||
<DxGridDataColumn FieldName="OriginalStockQuantity" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.InProcessOrdersQuantity)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.TotalOriginalQuantity)" />
|
||||
<DxGridDataColumn FieldName="MeasuredStockQuantity" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.StockTakingId)" TextAlignment="GridTextAlignment.Left" Caption="Leltár időpontja">
|
||||
<CellDisplayTemplate>
|
||||
<span>@(((StockTakingItem)context.DataItem)?.StockTaking?.StartDateTime.ToString("g") ?? "")</span>
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="Product.Name" />
|
||||
<DxGridDataColumn FieldName="OriginalStockQuantity" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.InProcessOrdersQuantity)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.TotalOriginalQuantity)" />
|
||||
<DxGridDataColumn FieldName="MeasuredStockQuantity" />
|
||||
|
||||
<DxGridDataColumn FieldName="OriginalNetWeight" />
|
||||
<DxGridDataColumn FieldName="MeasuredNetWeight" />
|
||||
<DxGridDataColumn FieldName="OriginalNetWeight" />
|
||||
<DxGridDataColumn FieldName="MeasuredNetWeight" />
|
||||
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.QuantityDiff)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.NetWeightDiff)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.QuantityDiff)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.NetWeightDiff)" />
|
||||
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.IsMeasurable)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.IsMeasured)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.IsInvalid)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.IsMeasurable)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.IsMeasured)" />
|
||||
<DxGridDataColumn FieldName="@nameof(StockTakingItem.IsInvalid)" />
|
||||
|
||||
<DxGridDataColumn FieldName="Created" ReadOnly="true" Visible="false" DisplayFormat="g" />
|
||||
<DxGridDataColumn FieldName="Modified" ReadOnly="true" DisplayFormat="g" />
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridStockTakingItemBase>
|
||||
<DxGridDataColumn FieldName="Created" ReadOnly="true" Visible="false" DisplayFormat="g" />
|
||||
<DxGridDataColumn FieldName="Modified" ReadOnly="true" DisplayFormat="g" />
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridStockTakingItemBase>
|
||||
</GridContent>
|
||||
</MgGridWithInfoPanel>
|
||||
|
||||
@code {
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue