Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the user to volunteer again and request a bed again. #334

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading