Fix /doctor/analysis/[id] expects id to be analysisResponse.id, not analysisOrder.id

This commit is contained in:
2025-11-12 09:51:46 +02:00
parent a77e2a7f70
commit f7fbbd2352
4 changed files with 27 additions and 10 deletions

View File

@@ -19,10 +19,10 @@ import { initializeEmailI18n } from '../lib/i18n';
export async function renderAllResultsReceivedEmail({
language,
analysisOrderId,
analysisResponseId,
}: {
language: string;
analysisOrderId: number;
analysisResponseId: number;
}) {
const namespace = 'all-results-received-email';
@@ -57,13 +57,13 @@ export async function renderAllResultsReceivedEmail({
{t(`${namespace}:openOrdersHeading`)}
</Text>
<EmailButton
href={`${process.env.NEXT_PUBLIC_SITE_URL}/doctor/analysis/${analysisOrderId}`}
href={`${process.env.NEXT_PUBLIC_SITE_URL}/doctor/analysis/${analysisResponseId}`}
>
{t(`${namespace}:linkText`)}
</EmailButton>
<Text>
{t(`${namespace}:ifLinksDisabled`)}{' '}
{`${process.env.NEXT_PUBLIC_SITE_URL}/doctor/analysis/${analysisOrderId}`}
{`${process.env.NEXT_PUBLIC_SITE_URL}/doctor/analysis/${analysisResponseId}`}
</Text>
<CommonFooter t={t} />
</EmailContent>

View File

@@ -19,10 +19,10 @@ import { initializeEmailI18n } from '../lib/i18n';
export async function renderFirstResultsReceivedEmail({
language,
analysisOrderId,
analysisResponseId,
}: {
language: string;
analysisOrderId: number;
analysisResponseId: number;
}) {
const namespace = 'first-results-received-email';
@@ -61,14 +61,14 @@ export async function renderFirstResultsReceivedEmail({
</Text>
<EmailButton
href={`${process.env.NEXT_PUBLIC_SITE_URL}/doctor/analysis/${analysisOrderId}`}
href={`${process.env.NEXT_PUBLIC_SITE_URL}/doctor/analysis/${analysisResponseId}`}
>
{t(`${namespace}:linkText`)}
</EmailButton>
<Text>
{t(`${namespace}:ifLinksDisabled`)}{' '}
{`${process.env.NEXT_PUBLIC_SITE_URL}/doctor/analysis/${analysisOrderId}`}
{`${process.env.NEXT_PUBLIC_SITE_URL}/doctor/analysis/${analysisResponseId}`}
</Text>
<CommonFooter t={t} />
</EmailContent>