diff --git a/FruitBankHybrid.Shared/Components/Grids/ShippingDocuments/GridShippingDocumentBase.cs b/FruitBankHybrid.Shared/Components/Grids/ShippingDocuments/GridShippingDocumentBase.cs index e84e019..15ea6e8 100644 --- a/FruitBankHybrid.Shared/Components/Grids/ShippingDocuments/GridShippingDocumentBase.cs +++ b/FruitBankHybrid.Shared/Components/Grids/ShippingDocuments/GridShippingDocumentBase.cs @@ -19,6 +19,9 @@ public class GridShippingDocumentBase : FruitBankGridBase, IGr AddMessageTag = SignalRTags.AddShippingDocument; UpdateMessageTag = SignalRTags.UpdateShippingDocument; + // Set custom InfoPanel type + InfoPanelType = typeof(GridShippingDocumentInfoPanel); + //RemoveMessageTag = SignalRTags.; } diff --git a/FruitBankHybrid.Shared/Components/Grids/ShippingDocuments/GridShippingDocumentInfoPanel.cs b/FruitBankHybrid.Shared/Components/Grids/ShippingDocuments/GridShippingDocumentInfoPanel.cs new file mode 100644 index 0000000..310af9b --- /dev/null +++ b/FruitBankHybrid.Shared/Components/Grids/ShippingDocuments/GridShippingDocumentInfoPanel.cs @@ -0,0 +1,41 @@ +using AyCode.Blazor.Components.Components.Grids; +using Microsoft.AspNetCore.Components; + +namespace FruitBankHybrid.Shared.Components.Grids.ShippingDocuments; + +/// +/// Custom InfoPanel for ShippingDocument grid with customized header and footer +/// +public class GridShippingDocumentInfoPanel : MgInfoPanelTemplateBase +{ + protected override RenderFragment? GetHeaderTemplate() => builder => + { + builder.OpenElement(0, "div"); + builder.AddAttribute(1, "class", "p-2 border-bottom"); + builder.OpenElement(2, "h5"); + builder.AddAttribute(3, "class", "mb-0"); + builder.AddContent(4, "?? Szállítólevél részletei"); + builder.CloseElement(); + builder.CloseElement(); + }; + + protected override RenderFragment? GetFooterTemplate() => builder => + { + builder.OpenElement(0, "div"); + builder.AddAttribute(1, "class", "p-2 border-top d-flex gap-2"); + + builder.OpenElement(2, "button"); + builder.AddAttribute(3, "class", "btn btn-sm btn-outline-primary"); + builder.AddContent(4, "??? Nyomtatás"); + builder.CloseElement(); + + builder.OpenElement(5, "button"); + builder.AddAttribute(6, "class", "btn btn-sm btn-outline-secondary"); + builder.AddContent(7, "?? Export"); + builder.CloseElement(); + + builder.CloseElement(); + }; + + // GetColumnsTemplate() returns null by default ? uses auto-generated columns +}