@using Rms.Risk.Mango.Pivot.Core.Models @* * dbMango * * Copyright 2025 Deutsche Bank AG * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@
@code { [Parameter] public string Class { get; set; } = "form-row"; [Parameter] public Navigation Navigation { get; set; } = null!; [Parameter] public bool IsRefreshEnabled { get; set; } [Parameter] public bool IsExportEnabled { get; set; } [Parameter] public EventCallback RefreshPivotTriggered { get; set; } [Parameter] public EventCallback CopyCsvTriggered { get; set; } [Parameter] public EventCallback ExportCsvTriggered { get; set; } [Parameter] public bool UseCache { get; set { if (field == value) return; field = value; UseCacheChanged.InvokeAsync(field); } } = true; [Parameter] public EventCallback UseCacheChanged { get; set; } private bool IsBackwardDisabled => !Navigation?.CanGoBackward ?? true; private async Task OnBackward() { if (Navigation.Back()) await InvokeAsync(StateHasChanged); return false; } private bool IsForwardDisabled => !Navigation?.CanGoForward ?? true; private async Task OnForward() { if (Navigation.Forward()) await InvokeAsync(StateHasChanged); return false; } private bool IsRefreshDisabled => !IsRefreshEnabled; private bool IsExportDisabled => !IsExportEnabled; private Task OnRefreshPivot() => RefreshPivotTriggered.InvokeAsync(); private Task OnCopyCsv() => CopyCsvTriggered.InvokeAsync(); private Task OnExportCsv() => ExportCsvTriggered.InvokeAsync(); }