Extracted some pages to their own assembly and finished the artifact display page code

This commit is contained in:
Vincent Allen
2025-10-08 13:08:12 -04:00
parent fd0e6290fe
commit 02c2660b09
626 changed files with 39989 additions and 1553 deletions

View File

@@ -2,6 +2,7 @@
@using OpenArchival.Blazor.Components.Pages.Administration.Categories
@using OpenArchival.DataAccess;
@using System.ComponentModel.DataAnnotations
@using MudBlazor
@inject IDialogService DialogService
@inject NavigationManager NavigationManager;
@@ -193,6 +194,9 @@
{
// The data entry should only be shown if a category has been selected
_isFormDivVisible = true;
} else
{
_isFormDivVisible = false;
}
if (Model is not null)
@@ -223,11 +227,11 @@
if (IsValid && ClearOnPublish)
{
Model = new();
Model = new();
await _uploadComponent.ClearClicked.InvokeAsync();
StateHasChanged();
}
await GroupingPublished.InvokeAsync(oldModel);
}
@@ -343,10 +347,10 @@
return categories;
}
private async void OnDeleteEntryClicked(int index)
private async void OnDeleteEntryClicked((int index, string filename) data)
{
Model.ArtifactEntries.RemoveAt(index);
_uploadComponent.Files.RemoveAt(index);
Model.ArtifactEntries.RemoveAt(data.index);
_uploadComponent.RemoveFile(data.filename);
StateHasChanged();
}
}