Skip to content

511 Volunteer Invites#513

Open
ReehalS wants to merge 2 commits intomainfrom
511-volunteer-invites
Open

511 Volunteer Invites#513
ReehalS wants to merge 2 commits intomainfrom
511-volunteer-invites

Conversation

@ReehalS
Copy link
Copy Markdown
Member

@ReehalS ReehalS commented Apr 30, 2026

Repurpose Mentor invite system for Volunteer invites, made new template for Volunteers
Closes #511

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Repurposes the existing mentor invite flow in the admin UI to support sending Volunteer invites as well, including a new 2026 Volunteer email template and role-aware server actions.

Changes:

  • Add a Volunteers tab to the Admin → Invites page and reuse a shared invites panel with a role prop.
  • Introduce role-aware server actions for sending single and bulk Tito invites for mentors/volunteers.
  • Add a new 2026 Volunteer email template (subject + HTML body).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/(pages)/admin/invites/page.tsx Adds “Volunteers” tab and routes mentors/volunteers through a shared panel with role.
app/(pages)/admin/_components/MentorVolunteerInvites/MentorVolunteerInvitesPanel.tsx Generalizes the invites panel copy/UI to work for both roles.
app/(pages)/admin/_components/MentorVolunteerInvites/MentorVolunteerSingleInviteForm.tsx Updates single-invite form to call the new role-aware action.
app/(pages)/admin/_components/MentorVolunteerInvites/MentorVolunteerBulkInviteForm.tsx Updates bulk-invite form to call the new role-aware action and adjusts filenames/copy.
app/(api)/_actions/emails/sendSingleMentorOrVolunteerInvite.ts Sends mentor vs volunteer email subject/template based on role.
app/(api)/_actions/emails/sendBulkMentorOrVolunteerInvites.ts Sends bulk mentor vs volunteer email subject/template based on role.
app/(api)/_actions/emails/emailTemplates/2026VolunteerInviteTemplate.ts Adds the 2026 Volunteer invite HTML email template + subject.
Comments suppressed due to low confidence (3)

app/(pages)/admin/_components/MentorVolunteerInvites/MentorVolunteerSingleInviteForm.tsx:17

  • The component’s default export function is still named MentorSingleInviteForm, but it now supports both mentors and volunteers and is imported as MentorVolunteerSingleInviteForm. Rename the function to match the file/component name to avoid confusing stack traces and React DevTools labels.
    app/(api)/_actions/emails/sendBulkMentorOrVolunteerInvites.ts:29
  • This function now supports role: 'mentor' | 'volunteer', but deeper in the implementation the processBulkInvites config still uses label: 'Mentor', which will produce misleading log prefixes/errors for volunteer runs. Consider deriving the label from role (e.g., Volunteer vs Mentor) to keep operational logs accurate.
    app/(api)/_actions/emails/sendSingleMentorOrVolunteerInvite.ts:25
  • Since this action can now send either mentor or volunteer invites, the error logging later in the function should include the role (and not hard-code “Mentor”) so operational logs can be accurately filtered when volunteer invites fail.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Volunteer invites

2 participants