Skip to content

277/Add Send Email Button#281

Merged
LOTaher merged 3 commits into
mainfrom
277/add-send-email-button
Apr 10, 2026
Merged

277/Add Send Email Button#281
LOTaher merged 3 commits into
mainfrom
277/add-send-email-button

Conversation

@jolinhuang224
Copy link
Copy Markdown
Contributor

[Area] - Short Description

Changes

  • updated the endpoint/service to send assessment emails to all candidates of a position based on assessment status
  • added placeholder lo-fi and connected endpoint to button

Notes

N/A


Screenshots

Screenshot 2026-04-08 at 5 27 56 AM

Checklist

Please go through all items before requesting reviewers:

  • All commits are tagged with the ticket number
  • No linting errors / newline warnings
  • All code follows repository-configured formatting
  • No merge conflicts
  • All checks passing
  • Screenshots included for UI changes
  • Remove non-applicable sections of this template
  • PR assigned to yourself
  • Reviewers requested & Slack ping sent
  • PR linked to the issue (fill in 'Closes #')
  • If design-related, notify the designer in Slack

Closes

Closes #277

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sarge Ready Ready Preview, Comment Apr 8, 2026 9:28pm

Request Review

@jolinhuang224 jolinhuang224 marked this pull request as ready for review April 8, 2026 09:30
if (s === 'NOT_STARTED') return 'Not started';
if (s === 'NOT_ASSIGNED') return 'Not assigned';
if (s === 'EXPIRED') return 'Expired';
if (s === 'NOT_SENT') return 'Not sent';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a duplicate. Line 21 has he same check.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oops sorry i added that before i pulled

Comment thread src/lib/api/assessments.ts Outdated
positionTitle: string;
assessmentId: string;
export async function sendAssessmentInvitation(positionId: string): Promise<{
totalSent: number;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you define this to be its own type like we've done in other functions?

candidateId,
session.activeOrganizationId
);
const position = await prisma.position.findUnique({
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you make all this logic in a service function please!


<TabsContent value="assessment">{/* No content yet */}</TabsContent>
<TabsContent value="assessment">
<div className="border-sarge-gray-200 flex items-center justify-between self-stretch rounded-lg border bg-white p-4">
Copy link
Copy Markdown
Collaborator

@LOTaher LOTaher Apr 8, 2026

Choose a reason for hiding this comment

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

We shouldn't hardcode an assessment here. We only need the button on the top right for now. Because we are already within a specific position page, we don't need to list it here. You should already have that data!

)
: candidates;

const handleSendAssessments = async () => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you move this function and the rest of the values (the isSendingAssessments state variable, etc) you need to the useCandidates hook.

Copy link
Copy Markdown
Collaborator

@LOTaher LOTaher left a comment

Choose a reason for hiding this comment

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

lgtm!

@LOTaher LOTaher merged commit 23c76a0 into main Apr 10, 2026
4 checks passed
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.

[CRM/OA][Fullstack] - Add Send Email Button

2 participants