Skip to content
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
20 changes: 9 additions & 11 deletions apps/api/src/email/templates/access-granted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Props {
toName: string;
organizationName: string;
expiresAt: Date;
portalUrl?: string | null;
portalUrl: string;
}

export const AccessGrantedEmail = ({
Expand Down Expand Up @@ -76,16 +76,14 @@ export const AccessGrantedEmail = ({
</strong>
</Text>

{portalUrl && (
<Section className="mt-[32px] mb-[32px] text-center">
<Button
className="rounded-[3px] bg-[#121212] px-[20px] py-[12px] text-center text-[14px] font-semibold text-white no-underline"
href={portalUrl}
>
View Documents
</Button>
</Section>
)}
<Section className="mt-[32px] mb-[32px] text-center">
<Button
className="rounded-[3px] bg-[#121212] px-[20px] py-[12px] text-center text-[14px] font-semibold text-white no-underline"
href={portalUrl}
>
View Documents
</Button>
</Section>

<Text className="text-[14px] leading-[24px] text-[#121212]">
You can download your signed NDA for your records from the
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/trust-portal/email.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class TrustEmailService {
toName: string;
organizationName: string;
expiresAt: Date;
portalUrl?: string | null;
portalUrl: string;
}): Promise<void> {
const { toEmail, toName, organizationName, expiresAt, portalUrl } = params;

Expand Down
27 changes: 27 additions & 0 deletions apps/api/src/trust-portal/trust-access.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,33 @@ export class TrustAccessController {
);
}

@Post('admin/grants/:id/resend-access-email')
@UseGuards(HybridAuthGuard)
@ApiSecurity('apikey')
@ApiHeader({
name: 'X-Organization-Id',
description: 'Organization ID',
required: true,
})
@HttpCode(HttpStatus.OK)
@ApiOperation({
summary: 'Resend access granted email',
description: 'Resend the access granted email to user with active grant',
})
@ApiResponse({
status: HttpStatus.OK,
description: 'Access email resent',
})
async resendAccessEmail(
@OrganizationId() organizationId: string,
@Param('id') grantId: string,
) {
return this.trustAccessService.resendAccessGrantEmail(
organizationId,
grantId,
);
}

@Get('nda/:token')
@HttpCode(HttpStatus.OK)
@ApiOperation({
Expand Down
Loading
Loading