Skip to content

Send notification for joining an engagement #2578

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

Closed
jobara opened this issue Mar 6, 2025 · 2 comments · Fixed by #2614 · May be fixed by #2419
Closed

Send notification for joining an engagement #2578

jobara opened this issue Mar 6, 2025 · 2 comments · Fixed by #2614 · May be fixed by #2419
Labels
enhancement New feature or request
Milestone

Comments

@jobara
Copy link
Collaborator

jobara commented Mar 6, 2025

Is your feature request related to a problem? Please describe.

Currently there's only a flash notice when a consultation participant joins an engagement. Some users were confused about if they had successfully signed up.

Describe the solution you'd like

In addition to the flash message, send a notification (e-mail and dashboard) the they have joined the engagement. Should probably also send a notification if they leave the engagement.

Describe alternatives you've considered

No response

Additional context

No response

@jobara jobara added the enhancement New feature or request label Mar 6, 2025
@jobara
Copy link
Collaborator Author

jobara commented Mar 6, 2025

A notification for joining would need to be added here

public function join(Request $request, Engagement $engagement): RedirectResponse
{
$engagement->participants()->save(Auth::user()->individual, ['status' => 'confirmed']);
$engagement->project->notify(new ParticipantJoined($engagement));
flash(__('You have successfully signed up for this engagement.'), 'success|'.__('You have successfully signed up for this engagement.', [], 'en'));
return redirect(localized_route('engagements.confirm-access-needs', $engagement));
}

@jobara
Copy link
Collaborator Author

jobara commented Mar 6, 2025

A notification for leaving an engagement could be added here:

public function leave(Request $request, Engagement $engagement): RedirectResponse
{
Auth::user()->individual->engagements()->detach($engagement->id);
$engagement->project->notify(new ParticipantLeft($engagement));
flash(__('You have successfully left this engagement.'), 'success|'.__('You have successfully left this engagement.', [], 'en'));
return redirect(localized_route('engagements.show', $engagement));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
2 participants