32 lines
631 B
Plaintext
32 lines
631 B
Plaintext
<div>
|
|
@foreach(var a in Attachments)
|
|
{
|
|
<p>@a.Name</p>
|
|
}
|
|
</div>
|
|
|
|
<AttachmentSend Register=@Register ItemId=@ItemId/>
|
|
|
|
@code {
|
|
[Parameter]
|
|
public InspectionRegister Register { get; set; }
|
|
|
|
[Parameter]
|
|
public string ItemId { get; set; }
|
|
|
|
List<Attachment> Attachments { get; set; } = new();
|
|
|
|
public async Task Refresh()
|
|
{
|
|
Attachments.Clear();
|
|
Attachments = Register.GetAttachments(ItemId).ToList();
|
|
StateHasChanged();
|
|
}
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await base.OnInitializedAsync();
|
|
await Refresh();
|
|
}
|
|
}
|