Skip to content

Commit

Permalink
Allow the user to volunteer again and request a bed again.
Browse files Browse the repository at this point in the history
  • Loading branch information
GregFinzer committed Aug 28, 2024
1 parent 4bf7554 commit 2cdc452
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions BedBrigade.Client/Components/Pages/BedRequest.razor
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@
</div>
</div>

@if (SuccessDisplay != DisplayNone)
{
<SfButton CssClass="btn btn-primary ms-3 mt-3" OnClick="@RefreshPage">Request a Bed for Another Person</SfButton>
}

<style>
input[type=number]::-webkit-inner-spin-button,
Expand Down
8 changes: 7 additions & 1 deletion BedBrigade.Client/Components/Pages/BedRequest.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ private void OnExpired()
#endregion
#region SaveRequest

private Task RefreshPage()
{
_nav.NavigateTo(_nav.Uri, true);
return Task.CompletedTask;
}

private async Task SaveRequest()
{
var FormStatusMessage = "The Request Form is completed.";
Expand Down Expand Up @@ -287,7 +293,7 @@ private async Task UpdateDatabase()
DisplaySearch = DisplayNone;
DisplayForm = DisplayNone;
// ResultMessage = "New Bed Request #" + newRequest.BedRequestId.ToString() + " created Successfully!<br />";
SuccessMessage += "We have received your request (registration #" + newRequest.BedRequestId.ToString() + ") and would like to thank you for writing to us.<br />";
SuccessMessage += "We have received your request and would like to thank you for writing to us.<br />";
SuccessMessage += "We will look over your request and reply by email as soon as possible.<br />";
SuccessMessage += "Talk to you soon, Bed Brigade.";
SuccessDisplay = "";
Expand Down
5 changes: 4 additions & 1 deletion BedBrigade.Client/Components/Pages/VolunteerSignUp.razor
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@

<div class="container-fluid" style="display: @ResultDisplay">@FinalMessage</div>


@if (ResultDisplay != DisplayNone)
{
<SfButton CssClass="btn btn-primary ms-4 mt-3" OnClick="@RefreshPage">Volunteer for Another Event</SfButton>
}


<style>
Expand Down
5 changes: 5 additions & 0 deletions BedBrigade.Client/Components/Pages/VolunteerSignUp.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ private void OnExpired()
#endregion
#region SaveVolunteer

private Task RefreshPage()
{
_nav.NavigateTo(_nav.Uri, true);
return Task.CompletedTask;
}

private async Task SaveVolunteer()
{
Expand Down

0 comments on commit 2cdc452

Please sign in to comment.