From 9fc12e2fcce25cd635ee33a23db0775b2458050d Mon Sep 17 00:00:00 2001 From: Loretta Date: Sat, 7 Feb 2026 08:55:00 +0100 Subject: [PATCH] Improve toolbar controls and async UX in stock taking - Added EnableNew and EnableEdit parameters to MgGridToolbarTemplate for finer control of toolbar button states. - Disabled "New", "Edit", and "Delete" actions in history and item grids by passing explicit parameters. - Introduced DxLoadingPanel in StockTakingTemplate for better async feedback. - Disabled "New" and "Close" buttons during async operations to prevent duplicates. - Enhanced combo boxes with search/filter and usability features. - Updated new/close stock taking logic to show loading, handle errors, and prevent duplicate actions. - Set focus to item combo box after saving a StockTakingItemPallet. - Removed global loading panel from StockTaking.razor; loading is now handled locally. - Performed minor code cleanups and removed obsolete code. --- .../Components/Grids/MgGridToolbarTemplate.razor | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AyCode.Blazor.Components/Components/Grids/MgGridToolbarTemplate.razor b/AyCode.Blazor.Components/Components/Grids/MgGridToolbarTemplate.razor index 03f933d..75885d3 100644 --- a/AyCode.Blazor.Components/Components/Grids/MgGridToolbarTemplate.razor +++ b/AyCode.Blazor.Components/Components/Grids/MgGridToolbarTemplate.razor @@ -1,8 +1,8 @@ @using AyCode.Blazor.Components.Components.Grids - - + + @@ -40,7 +40,10 @@ [Parameter] public IMgGridBase Grid { get; set; } = null!; [Parameter] public RenderFragment? ToolbarItemsExtended { get; set; } [Parameter] public EventCallback OnReloadDataClick { get; set; } + [Parameter] public bool ShowOnlyIcon { get; set; } = false; + [Parameter] public bool EnableNew { get; set; } = true; + [Parameter] public bool EnableEdit { get; set; } = true; [Parameter] public bool EnableDelete { get; set; } = false; public MgGridToolbarBase GridToolbar { get; set; } = null!;