From a03812f6eeecad367cd07f8115ec1eb38c3c3030 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 8 Apr 2024 18:08:29 +0200 Subject: [PATCH] added archive column hiding could do with some styling on the checkboxes to seperate them better but idk how to do that --- .../Components/ArchiveListComponent.razor | 72 ++++++++++++++++--- 1 file changed, 63 insertions(+), 9 deletions(-) diff --git a/PizzaBot/Components/ArchiveListComponent.razor b/PizzaBot/Components/ArchiveListComponent.razor index 3f6a05c..bf61b5b 100644 --- a/PizzaBot/Components/ArchiveListComponent.razor +++ b/PizzaBot/Components/ArchiveListComponent.razor @@ -2,22 +2,58 @@ @using Microsoft.AspNetCore.Components.QuickGrid + +

+ Show: + + + + + + + + +

+ - - @if (ShowOnlyTotalPizza) + @if (ShowDate) + { + + } + @if (ShowPizzaTotal) { - } else{ + } + @if (ShowPizzaDetailed) + { - + } + @if (ShowOrderCount) + { + + } + @if (ShowBottles) + { + } - - - - - + @if (ShowPrice) + { + + } + @if (ShowNotes) + { + + } + @if (ShowEdit) + { + + + + } + + @@ -37,6 +73,16 @@ PaginationState Pagination; + bool ShowDate = true; + bool ShowPizzaTotal = true; + bool ShowPizzaDetailed = true; + bool ShowOrderCount = true; + bool ShowBottles = true; + bool ShowPrice = true; + bool ShowEdit = true; + bool ShowNotes = false; + + protected override void OnInitialized() { base.OnInitialized(); @@ -47,5 +93,13 @@ await InvokeAsync(StateHasChanged); }; ArchiveService.OnArchiveChange += Reload; + + if (ShowOnlyTotalPizza) + { + ShowPizzaDetailed = false; + ShowBottles = false; + ShowOrderCount = false; + //ShowEdit = false; + } } }