Commit:
d9c21a8Parent:
8395650Give feedback when updating participants
MatDenDagen/Components/Pages/Admin/Participants.razor
+8
-0
diff --git a/MatDenDagen/Components/Pages/Admin/Participants.razor b/MatDenDagen/Components/Pages/Admin/Participants.razor
index f7e72aa..81f6083 100644
@@ -37,6 +37,11 @@
</p>
<p>
<input type="submit" value="Uppdatera" />
@if (showUpdateSuccess.Contains(participant.Id))
{
@(" ")
<span>Deltagaren uppdaterades!</span>
}
</p>
</EditForm>
<EditForm FormName="@removeFormName" Model="@removeParticipantModel" OnSubmit="@RemoveParticipant" Enhance>
@@ -83,6 +88,8 @@
[SupplyParameterFromForm]
private UpdateParticipantModel? updateParticipantModel { get; set; }
private readonly HashSet<Guid> showUpdateSuccess = [];
protected override void OnInitialized()
{
addParticipantModel ??= new();
@@ -128,6 +135,7 @@
}
participant.NotificationMinutesOffset = updateParticipantModel.NotificationMinutesOffset;
await questionnaireContext.SaveChangesAsync();
showUpdateSuccess.Add(id);
}
private async Task RemoveParticipant()