Extracted some pages to their own assembly and finished the artifact display page code
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user