From 304c519c30cd48ea6cfaf8808f8b09270a50bfd7 Mon Sep 17 00:00:00 2001 From: David Nguyen Date: Tue, 14 Oct 2025 15:47:02 +1100 Subject: [PATCH] fix: additional backwards compat --- .../template-page-view-documents-table.tsx | 1 - .../template-page-view-recent-activity.tsx | 16 +++++----------- .../lib/server-only/envelope/create-envelope.ts | 2 +- .../server-only/envelope/duplicate-envelope.ts | 3 ++- packages/lib/translations/de/web.po | 1 - packages/lib/translations/en/web.po | 1 - packages/lib/translations/es/web.po | 1 - packages/lib/translations/fr/web.po | 1 - packages/lib/translations/it/web.po | 1 - packages/lib/translations/pl/web.po | 1 - .../20250918070644_add_none_source/migration.sql | 2 -- .../20250918070645_add_envelopes/migration.sql | 2 +- packages/prisma/schema.prisma | 1 - 13 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 packages/prisma/migrations/20250918070644_add_none_source/migration.sql diff --git a/apps/remix/app/components/general/template/template-page-view-documents-table.tsx b/apps/remix/app/components/general/template/template-page-view-documents-table.tsx index 851c9b920..6072a8846 100644 --- a/apps/remix/app/components/general/template/template-page-view-documents-table.tsx +++ b/apps/remix/app/components/general/template/template-page-view-documents-table.tsx @@ -36,7 +36,6 @@ const DOCUMENT_SOURCE_LABELS: { [key in DocumentSource]: MessageDescriptor } = { DOCUMENT: msg`Document`, TEMPLATE: msg`Template`, TEMPLATE_DIRECT_LINK: msg`Direct link`, - NONE: msg`None`, }; const ZDocumentSearchParamsSchema = ZUrlSearchParamsSchema.extend({ diff --git a/apps/remix/app/components/general/template/template-page-view-recent-activity.tsx b/apps/remix/app/components/general/template/template-page-view-recent-activity.tsx index 535c8f8a5..d0cb239de 100644 --- a/apps/remix/app/components/general/template/template-page-view-recent-activity.tsx +++ b/apps/remix/app/components/general/template/template-page-view-recent-activity.tsx @@ -117,17 +117,11 @@ export const TemplatePageViewRecentActivity = ({ className="text-muted-foreground dark:text-muted-foreground/70 flex-auto truncate py-0.5 text-xs leading-5" > {match(document.source) - .with( - DocumentSource.DOCUMENT, - DocumentSource.TEMPLATE, - DocumentSource.NONE, - () => ( - - Document created by{' '} - {document.user.name} - - ), - ) + .with(DocumentSource.DOCUMENT, DocumentSource.TEMPLATE, () => ( + + Document created by {document.user.name} + + )) .with(DocumentSource.TEMPLATE_DIRECT_LINK, () => ( Document created using a direct link diff --git a/packages/lib/server-only/envelope/create-envelope.ts b/packages/lib/server-only/envelope/create-envelope.ts index 606bb05b6..2a0bc9fee 100644 --- a/packages/lib/server-only/envelope/create-envelope.ts +++ b/packages/lib/server-only/envelope/create-envelope.ts @@ -252,7 +252,7 @@ export const createEnvelope = async ({ visibility, folderId, formValues, - source: type === EnvelopeType.DOCUMENT ? DocumentSource.DOCUMENT : DocumentSource.NONE, + source: type === EnvelopeType.DOCUMENT ? DocumentSource.DOCUMENT : DocumentSource.TEMPLATE, documentMetaId: documentMeta.id, // Template specific fields. diff --git a/packages/lib/server-only/envelope/duplicate-envelope.ts b/packages/lib/server-only/envelope/duplicate-envelope.ts index 59016d2d0..c83bc85a2 100644 --- a/packages/lib/server-only/envelope/duplicate-envelope.ts +++ b/packages/lib/server-only/envelope/duplicate-envelope.ts @@ -98,7 +98,8 @@ export const duplicateEnvelope = async ({ id, userId, teamId }: DuplicateEnvelop documentMetaId: createdDocumentMeta.id, authOptions: envelope.authOptions || undefined, visibility: envelope.visibility, - source: DocumentSource.NONE, + source: + envelope.type === EnvelopeType.DOCUMENT ? DocumentSource.DOCUMENT : DocumentSource.TEMPLATE, }, include: { recipients: true, diff --git a/packages/lib/translations/de/web.po b/packages/lib/translations/de/web.po index cad0eb179..c47b81dcc 100644 --- a/packages/lib/translations/de/web.po +++ b/packages/lib/translations/de/web.po @@ -5516,7 +5516,6 @@ msgid "No worries, it happens! Enter your email and we'll email you a special li msgstr "Keine Sorge, das passiert! Geben Sie Ihre E-Mail ein, und wir senden Ihnen einen speziellen Link zum Zurücksetzen Ihres Passworts." #: apps/remix/app/components/tables/admin-claims-table.tsx -#: apps/remix/app/components/general/template/template-page-view-documents-table.tsx #: apps/remix/app/components/forms/editor/editor-field-number-form.tsx #: apps/remix/app/components/embed/authoring/configure-document-advanced-settings.tsx #: packages/lib/constants/document.ts diff --git a/packages/lib/translations/en/web.po b/packages/lib/translations/en/web.po index 0fb6b1e3e..60620e757 100644 --- a/packages/lib/translations/en/web.po +++ b/packages/lib/translations/en/web.po @@ -5511,7 +5511,6 @@ msgid "No worries, it happens! Enter your email and we'll email you a special li msgstr "No worries, it happens! Enter your email and we'll email you a special link to reset your password." #: apps/remix/app/components/tables/admin-claims-table.tsx -#: apps/remix/app/components/general/template/template-page-view-documents-table.tsx #: apps/remix/app/components/forms/editor/editor-field-number-form.tsx #: apps/remix/app/components/embed/authoring/configure-document-advanced-settings.tsx #: packages/lib/constants/document.ts diff --git a/packages/lib/translations/es/web.po b/packages/lib/translations/es/web.po index f5c897963..e155f7747 100644 --- a/packages/lib/translations/es/web.po +++ b/packages/lib/translations/es/web.po @@ -5516,7 +5516,6 @@ msgid "No worries, it happens! Enter your email and we'll email you a special li msgstr "¡No te preocupes, sucede! Ingresa tu correo electrónico y te enviaremos un enlace especial para restablecer tu contraseña." #: apps/remix/app/components/tables/admin-claims-table.tsx -#: apps/remix/app/components/general/template/template-page-view-documents-table.tsx #: apps/remix/app/components/forms/editor/editor-field-number-form.tsx #: apps/remix/app/components/embed/authoring/configure-document-advanced-settings.tsx #: packages/lib/constants/document.ts diff --git a/packages/lib/translations/fr/web.po b/packages/lib/translations/fr/web.po index c49b46507..aeb1997f6 100644 --- a/packages/lib/translations/fr/web.po +++ b/packages/lib/translations/fr/web.po @@ -5516,7 +5516,6 @@ msgid "No worries, it happens! Enter your email and we'll email you a special li msgstr "Pas de soucis, ça arrive ! Entrez votre email et nous vous enverrons un lien spécial pour réinitialiser votre mot de passe." #: apps/remix/app/components/tables/admin-claims-table.tsx -#: apps/remix/app/components/general/template/template-page-view-documents-table.tsx #: apps/remix/app/components/forms/editor/editor-field-number-form.tsx #: apps/remix/app/components/embed/authoring/configure-document-advanced-settings.tsx #: packages/lib/constants/document.ts diff --git a/packages/lib/translations/it/web.po b/packages/lib/translations/it/web.po index 0982b6dd7..d2d96cc1b 100644 --- a/packages/lib/translations/it/web.po +++ b/packages/lib/translations/it/web.po @@ -5516,7 +5516,6 @@ msgid "No worries, it happens! Enter your email and we'll email you a special li msgstr "Non ti preoccupare, succede! Inserisci la tua email e ti invieremo un link speciale per reimpostare la tua password." #: apps/remix/app/components/tables/admin-claims-table.tsx -#: apps/remix/app/components/general/template/template-page-view-documents-table.tsx #: apps/remix/app/components/forms/editor/editor-field-number-form.tsx #: apps/remix/app/components/embed/authoring/configure-document-advanced-settings.tsx #: packages/lib/constants/document.ts diff --git a/packages/lib/translations/pl/web.po b/packages/lib/translations/pl/web.po index 014f7ee20..7880ee3fe 100644 --- a/packages/lib/translations/pl/web.po +++ b/packages/lib/translations/pl/web.po @@ -5516,7 +5516,6 @@ msgid "No worries, it happens! Enter your email and we'll email you a special li msgstr "Nie martw się, to się zdarza! Wprowadź swój e-mail, a my wyślemy Ci specjalny link do zresetowania hasła." #: apps/remix/app/components/tables/admin-claims-table.tsx -#: apps/remix/app/components/general/template/template-page-view-documents-table.tsx #: apps/remix/app/components/forms/editor/editor-field-number-form.tsx #: apps/remix/app/components/embed/authoring/configure-document-advanced-settings.tsx #: packages/lib/constants/document.ts diff --git a/packages/prisma/migrations/20250918070644_add_none_source/migration.sql b/packages/prisma/migrations/20250918070644_add_none_source/migration.sql deleted file mode 100644 index ca2f3ee9d..000000000 --- a/packages/prisma/migrations/20250918070644_add_none_source/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterEnum -ALTER TYPE "DocumentSource" ADD VALUE 'NONE'; diff --git a/packages/prisma/migrations/20250918070645_add_envelopes/migration.sql b/packages/prisma/migrations/20250918070645_add_envelopes/migration.sql index 340b9ffac..734049b37 100644 --- a/packages/prisma/migrations/20250918070645_add_envelopes/migration.sql +++ b/packages/prisma/migrations/20250918070645_add_envelopes/migration.sql @@ -287,7 +287,7 @@ SELECT NULL, t."title", 'DRAFT', - 'NONE'::"DocumentSource", + 'TEMPLATE'::"DocumentSource", NULL, 1, t."useLegacyFieldInsertion", diff --git a/packages/prisma/schema.prisma b/packages/prisma/schema.prisma index cf53b0a34..10e68cade 100644 --- a/packages/prisma/schema.prisma +++ b/packages/prisma/schema.prisma @@ -330,7 +330,6 @@ enum DocumentSource { DOCUMENT TEMPLATE TEMPLATE_DIRECT_LINK - NONE } enum DocumentVisibility {