From 88d5a636c31b3c4e5c79de25d8b53f63ff7f8fcc Mon Sep 17 00:00:00 2001 From: Lucas Smith Date: Sat, 8 Nov 2025 16:03:26 +1100 Subject: [PATCH] fix: show legacy ids on template and document view page (#2153) image --- .../general/document/document-page-view-information.tsx | 5 +++++ .../general/template/template-page-view-information.tsx | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/apps/remix/app/components/general/document/document-page-view-information.tsx b/apps/remix/app/components/general/document/document-page-view-information.tsx index d4607ca51..91dee53d1 100644 --- a/apps/remix/app/components/general/document/document-page-view-information.tsx +++ b/apps/remix/app/components/general/document/document-page-view-information.tsx @@ -7,6 +7,7 @@ import { DateTime } from 'luxon'; import { useIsMounted } from '@documenso/lib/client-only/hooks/use-is-mounted'; import type { TEnvelope } from '@documenso/lib/types/envelope'; +import { mapSecondaryIdToDocumentId } from '@documenso/lib/utils/envelope'; export type DocumentPageViewInformationProps = { userId: number; @@ -40,6 +41,10 @@ export const DocumentPageViewInformation = ({ .setLocale(i18n.locales?.[0] || i18n.locale) .toRelative(), }, + { + description: msg`Document ID (Legacy)`, + value: mapSecondaryIdToDocumentId(envelope.secondaryId), + }, ]; // eslint-disable-next-line react-hooks/exhaustive-deps }, [isMounted, envelope, userId]); diff --git a/apps/remix/app/components/general/template/template-page-view-information.tsx b/apps/remix/app/components/general/template/template-page-view-information.tsx index 0b320cd11..41fb13b30 100644 --- a/apps/remix/app/components/general/template/template-page-view-information.tsx +++ b/apps/remix/app/components/general/template/template-page-view-information.tsx @@ -7,11 +7,13 @@ import type { User } from '@prisma/client'; import { DateTime } from 'luxon'; import { useIsMounted } from '@documenso/lib/client-only/hooks/use-is-mounted'; +import { mapSecondaryIdToTemplateId } from '@documenso/lib/utils/envelope'; export type TemplatePageViewInformationProps = { userId: number; template: { userId: number; + secondaryId: string; createdAt: Date; updatedAt: Date; user: Pick; @@ -43,6 +45,10 @@ export const TemplatePageViewInformation = ({ .setLocale(i18n.locales?.[0] || i18n.locale) .toRelative(), }, + { + description: msg`Template ID (Legacy)`, + value: mapSecondaryIdToTemplateId(template.secondaryId), + }, ]; // eslint-disable-next-line react-hooks/exhaustive-deps }, [isMounted, template, userId]);