fix: additional backwards compat

This commit is contained in:
David Nguyen
2025-10-14 15:47:02 +11:00
parent 0eef4cd7e6
commit 304c519c30
13 changed files with 9 additions and 24 deletions

View File

@ -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({

View File

@ -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,
() => (
.with(DocumentSource.DOCUMENT, DocumentSource.TEMPLATE, () => (
<Trans>
Document created by{' '}
<span className="font-bold">{document.user.name}</span>
Document created by <span className="font-bold">{document.user.name}</span>
</Trans>
),
)
))
.with(DocumentSource.TEMPLATE_DIRECT_LINK, () => (
<Trans>
Document created using a <span className="font-bold">direct link</span>

View File

@ -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.

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,2 +0,0 @@
-- AlterEnum
ALTER TYPE "DocumentSource" ADD VALUE 'NONE';

View File

@ -287,7 +287,7 @@ SELECT
NULL,
t."title",
'DRAFT',
'NONE'::"DocumentSource",
'TEMPLATE'::"DocumentSource",
NULL,
1,
t."useLegacyFieldInsertion",

View File

@ -330,7 +330,6 @@ enum DocumentSource {
DOCUMENT
TEMPLATE
TEMPLATE_DIRECT_LINK
NONE
}
enum DocumentVisibility {