Aggiunto caricamento file

This commit is contained in:
2025-11-05 15:20:27 +01:00
parent f4b2e70881
commit a26f1a57cc

View File

@@ -228,15 +228,22 @@
}
}
@if (ActivityFileList != null)
@if (!IsLoading)
{
foreach (var file in ActivityFileList)
if (ActivityFileList != null)
{
<MudChip T="string" OnClick="@(() => OpenAttached(file.Id, file.FileName))" OnClose="@(() => DeleteAttach(file))" Color="Color.Default">
@file.FileName
</MudChip>
foreach (var file in ActivityFileList)
{
<MudChip T="string" OnClick="@(() => OpenAttached(file.Id, file.FileName))" OnClose="@(() => DeleteAttach(file))" Color="Color.Default">
@file.FileName
</MudChip>
}
}
}
else
{
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="my-7" />
}
</div>
@if (!IsView)
@@ -318,6 +325,7 @@
private List<ActivityFileDto>? ActivityFileList { get; set; }
private bool IsNew { get; set; }
private bool IsLoading { get; set; }
private bool IsView => !NetworkService.ConnectionAvailable;
private string? LabelSave { get; set; }
@@ -443,6 +451,9 @@
{
return Task.Run(async () =>
{
IsLoading = true;
await InvokeAsync(StateHasChanged);
SelectedComessa = ActivityModel.Commessa;
Users = await ManageData.GetTable<StbUser>();
@@ -456,6 +467,7 @@
Clienti = await ManageData.GetClienti(new WhereCondContact { FlagStato = "A" });
Pros = await ManageData.GetProspect();
IsLoading = false;
await InvokeAsync(StateHasChanged);
});
}