diff --git a/apps/portal/src/app/portal/applications/components/shared/application-detail.tsx b/apps/portal/src/app/portal/applications/components/shared/application-detail.tsx index cacce6d62..35b44faba 100644 --- a/apps/portal/src/app/portal/applications/components/shared/application-detail.tsx +++ b/apps/portal/src/app/portal/applications/components/shared/application-detail.tsx @@ -29,7 +29,7 @@ export function DetailLoader({ const client = createAuthenticatedClient(token); const response = await client.get( `/applications/${id}/view/detail`, - { params: { include: 'timeline' } }, + { params: { include: 'timeline,recruiter' } }, ); if (!signal?.cancelled) setApplication(response.data || null); } catch (error) { diff --git a/apps/portal/src/app/portal/applications/components/shared/application-overview-tab.tsx b/apps/portal/src/app/portal/applications/components/shared/application-overview-tab.tsx index 820e91fef..a9d647bda 100644 --- a/apps/portal/src/app/portal/applications/components/shared/application-overview-tab.tsx +++ b/apps/portal/src/app/portal/applications/components/shared/application-overview-tab.tsx @@ -27,7 +27,7 @@ export function ApplicationOverviewTab({ application }: OverviewTabProps) { ? recruiterName.split(" ").map((n: string) => n[0]).join("").toUpperCase() : "?"; - const companyRecruiter = (job as any)?.company_recruiter; + const companyRecruiter = (application as any)?.company_recruiter; const companyRecruiterName = companyRecruiter?.user?.name || null; const companyRecruiterEmail = companyRecruiter?.user?.email || null; const companyRecruiterInitials = companyRecruiterName diff --git a/services/ats-service/src/v3/applications/views/detail.repository.ts b/services/ats-service/src/v3/applications/views/detail.repository.ts index 3bcdf490f..b611cb22a 100644 --- a/services/ats-service/src/v3/applications/views/detail.repository.ts +++ b/services/ats-service/src/v3/applications/views/detail.repository.ts @@ -26,6 +26,7 @@ export class ApplicationDetailRepository { if (include?.includes('recruiter')) { selectClause += `,recruiter:recruiters!candidate_recruiter_id(id, bio, phone, tagline, specialties, status, user_id, user:users!recruiters_user_id_fkey(name, email))`; + selectClause += `,company_recruiter:recruiters!applications_company_recruiter_id_fkey(id, bio, phone, tagline, specialties, status, user_id, user:users!recruiters_user_id_fkey(name, email))`; } if (include?.includes('audit') || include?.includes('timeline')) { selectClause += `,audit_log:application_audit_log!application_audit_log_application_id_fkey(id, action, performed_by_user_id, performed_by_role, company_id, old_value, new_value, metadata, ip_address, user_agent, created_at)`; diff --git a/services/notification-service/src/services/chat/service.ts b/services/notification-service/src/services/chat/service.ts index a91c29e1d..92bc17831 100644 --- a/services/notification-service/src/services/chat/service.ts +++ b/services/notification-service/src/services/chat/service.ts @@ -1,7 +1,7 @@ import { Resend } from 'resend'; import { Logger } from '@splits-network/shared-logging'; import { NotificationRepository } from '../../repository.js'; -import type { EmailSource } from '../../templates/base.js'; +import { chatMessageEmail } from '../../templates/chat/index.js'; export interface ChatMessageEmailData { recipient: string; @@ -21,24 +21,6 @@ export class ChatEmailService { private logger: Logger ) {} - private renderChatEmail(data: ChatMessageEmailData): string { - const preview = data.preview ? data.preview : 'New message'; - return ` - -
-${data.senderName} sent you a message:
-${preview}
- - - - `.trim(); - } - async sendNewMessageEmail(data: ChatMessageEmailData): Promise