Allow info panel collapse, improve grids, update SignalR

- Enable collapsing of info panel in MgGridWithInfoPanel for better UX
- Refactor GridStockTakingItem columns to use nameof(), clarify bindings, and improve maintainability
- Enhance MeasuringOut order selector with advanced search and clear button
- Update SignalR.Core reference to 9.0.14 in project file
- Minor cleanup of commented group display logic in grid
This commit is contained in:
Loretta 2026-03-22 16:04:17 +01:00
parent a73b72f831
commit ff1a5b63c1
3 changed files with 26 additions and 29 deletions

View File

@ -41,7 +41,7 @@
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath> <HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.AspNetCore.SignalR.Core"> <Reference Include="Microsoft.AspNetCore.SignalR.Core">
<HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.13\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath> <HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.14\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Mango.Nop.Core"> <Reference Include="Mango.Nop.Core">
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath> <HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>

View File

@ -16,23 +16,21 @@
<MgGridWithInfoPanel ShowInfoPanel="@IsMasterGrid"> <MgGridWithInfoPanel ShowInfoPanel="@IsMasterGrid">
<GridContent> <GridContent>
<GridStockTakingItemBase @ref="Grid" AutoSaveLayoutName="GridStockTakingItem" SignalRClient="FruitBankSignalRClient" Logger="_logger" <GridStockTakingItemBase @ref="Grid" AutoSaveLayoutName="GridStockTakingItem" SignalRClient="FruitBankSignalRClient" Logger="_logger"
CssClass="@GridCss" ValidationEnabled="false" OnGridFocusedRowChanged="Grid_FocusedRowChanged"> CssClass="@GridCss" ValidationEnabled="false" OnGridFocusedRowChanged="Grid_FocusedRowChanged">
@* CustomizeGroupValueDisplayText="Grid_CustomizeGroupValueDisplayText"> *@
<Columns> <Columns>
<DxGridDataColumn FieldName="Id" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.Id)" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
<DxGridDataColumn FieldName="@nameof(StockTakingItem.StockTakingId)" TextAlignment="GridTextAlignment.Left" Caption="Leltár időpontja"> <DxGridDataColumn FieldName="@nameof(StockTakingItem.StockTakingId)" TextAlignment="GridTextAlignment.Left" Caption="Leltár Id"/>
<CellDisplayTemplate> <DxGridDataColumn FieldName="@($"{nameof(StockTakingItem.StockTaking)}.{nameof(StockTaking.StartDateTime)}")" Visible="true" DisplayFormat="g" Caption="Leltár időpontja" />
<span>@(((StockTakingItem)context.DataItem)?.StockTaking?.StartDateTime.ToString("g") ?? "")</span> <DxGridDataColumn FieldName="@($"{nameof(StockTakingItem.Product)}.{nameof(ProductDto.Name)}")" Caption="ProductName" />
</CellDisplayTemplate> <DxGridDataColumn FieldName="@nameof(StockTakingItem.OriginalStockQuantity)" />
</DxGridDataColumn>
<DxGridDataColumn FieldName="Product.Name" />
<DxGridDataColumn FieldName="OriginalStockQuantity" />
<DxGridDataColumn FieldName="@nameof(StockTakingItem.InProcessOrdersQuantity)" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.InProcessOrdersQuantity)" />
<DxGridDataColumn FieldName="@nameof(StockTakingItem.TotalOriginalQuantity)" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.TotalOriginalQuantity)" />
<DxGridDataColumn FieldName="MeasuredStockQuantity" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.MeasuredStockQuantity)" />
<DxGridDataColumn FieldName="OriginalNetWeight" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.OriginalNetWeight)" />
<DxGridDataColumn FieldName="MeasuredNetWeight" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.MeasuredNetWeight)" />
<DxGridDataColumn FieldName="@nameof(StockTakingItem.QuantityDiff)" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.QuantityDiff)" />
<DxGridDataColumn FieldName="@nameof(StockTakingItem.NetWeightDiff)" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.NetWeightDiff)" />
@ -41,8 +39,8 @@
<DxGridDataColumn FieldName="@nameof(StockTakingItem.IsMeasured)" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.IsMeasured)" />
<DxGridDataColumn FieldName="@nameof(StockTakingItem.IsInvalid)" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.IsInvalid)" />
<DxGridDataColumn FieldName="Created" ReadOnly="true" Visible="false" DisplayFormat="g" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.Created)" ReadOnly="true" Visible="false" DisplayFormat="g" />
<DxGridDataColumn FieldName="Modified" ReadOnly="true" DisplayFormat="g" /> <DxGridDataColumn FieldName="@nameof(StockTakingItem.Modified)" ReadOnly="true" DisplayFormat="g" />
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn> <DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
</Columns> </Columns>
<ToolbarTemplate> <ToolbarTemplate>
@ -103,22 +101,14 @@
EditItemsEnabled = true; EditItemsEnabled = true;
} }
// void Grid_CustomGroup(GridCustomGroupEventArgs e) // static void Grid_CustomizeGroupValueDisplayText(GridCustomizeGroupValueDisplayTextEventArgs e)
// { // {
// if (e.FieldName != "StockTaking.StartDateTime") return; // if (e.FieldName != nameof(StockTakingItem.StockTakingId)) return;
// e.SameGroup = ((StockTakingItem)e.DataItem1).StockTakingId == ((StockTakingItem)e.DataItem2).StockTakingId; // if (e.GetRowValue("StockTaking.StartDateTime") is DateTime startDateTime)
// e.Handled = true; // {
// } // e.DisplayText = startDateTime.ToString("g");
// }
// void Grid_CustomizeGroupValueDisplayText(GridCustomizeGroupValueDisplayTextEventArgs e)
// {
// return;
// if (e.FieldName != "StockTaking.StartDateTime") return;
// var startDate = (DateTime)e.Value;
// e.DisplayText = startDate.ToString("g");
// } // }
} }

View File

@ -67,6 +67,13 @@
CssClass="cw-480" CssClass="cw-480"
Context="ctxOrder" Context="ctxOrder"
DropDownBodyCssClass="dd-body-class" DropDownBodyCssClass="dd-body-class"
SearchMode="ListSearchMode.AutoSearch"
SearchFilterCondition="ListSearchFilterCondition.Contains"
SearchTextParseMode="ListSearchTextParseMode.GroupWordsByAnd"
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
DropDownTriggerMode="DropDownTriggerMode.Click"
ListRenderMode="ListRenderMode.Entire"
ShowDropDownButton="false"
SelectedDataItemChanged="@((SelectedDataItemChangedEventArgs<OrderDto> args) => OnSelectedOrderChanged(args))" SelectedDataItemChanged="@((SelectedDataItemChangedEventArgs<OrderDto> args) => OnSelectedOrderChanged(args))"
InputId="cbOrders"> InputId="cbOrders">
<ItemDisplayTemplate> <ItemDisplayTemplate>