Fix and harden prospect creation against Blazor runtime crashes
All checks were successful
Build And Push Dev Docker Image / docker (push) Successful in 3m3s
All checks were successful
Build And Push Dev Docker Image / docker (push) Successful in 3m3s
- Handle empty numeric input safely with nullable integer binding. - Add semaphore locks to prevent double-click invocation errors on mobile. - Implement global exception handling and user notifications for prospect operations.
This commit is contained in:
@@ -100,15 +100,22 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
/// </summary>
|
||||
private async Task LoadProspects()
|
||||
{
|
||||
var parameter = new GetProspectsParameter
|
||||
try
|
||||
{
|
||||
CannotHaveInteractions = [InteractionType.Complete, InteractionType.Verify, InteractionType.ReleasedForVerification]
|
||||
};
|
||||
var parameter = new GetProspectsParameter
|
||||
{
|
||||
CannotHaveInteractions = [InteractionType.Complete, InteractionType.Verify, InteractionType.ReleasedForVerification]
|
||||
};
|
||||
|
||||
var prospectsR = await ProspectService.GetProspectsAsync(parameter);
|
||||
if (prospectsR.Success) ProspectList = prospectsR.Data;
|
||||
var prospectsR = await ProspectService.GetProspectsAsync(parameter);
|
||||
if (prospectsR.Success) ProspectList = prospectsR.Data;
|
||||
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await Notification.Error(ex.Message, "Fehler beim Laden");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user