Compare commits

...

4 Commits

Author SHA1 Message Date
Catalin Pit aed55e9bcd fix: checkbox states not showing in signed PDF for legacy uploads
Flatten the pdf-lib form before saving to bake checkbox/radio appearances
  into the PDF content. This ensures checked states are preserved when the
  PDF is subsequently processed by libpdf for final signing.
2026-01-30 14:39:06 +02:00
Konrad 39ebc8184a fix(i18n): add pluralization to envelopes-bulk-delete-dialog.tsx (#2428) 2026-01-30 12:43:27 +11:00
Konrad 2df41b9f01 feat(ui): rename sign up button for better clarity (#2427) 2026-01-30 12:30:33 +11:00
Lucas Smith 8704c731c0 chore: upgrade libpdf (#2435) 2026-01-29 23:34:46 +11:00
6 changed files with 24 additions and 9 deletions
@@ -1,3 +1,4 @@
import { plural } from '@lingui/core/macro';
import { Plural, useLingui } from '@lingui/react/macro';
import { Trans } from '@lingui/react/macro';
import { EnvelopeType } from '@prisma/client';
@@ -51,13 +52,22 @@ export const EnvelopesBulkDeleteDialog = ({
if (result.failedIds.length > 0) {
toast({
title: isDocument ? t`Documents partially deleted` : t`Templates partially deleted`,
description: t`${result.deletedCount} item(s) deleted. ${result.failedIds.length} item(s) could not be deleted.`,
description: t`${plural(result.deletedCount, {
one: '# item deleted.',
other: '# items deleted.',
})} ${plural(result.failedIds.length, {
one: '# item could not be deleted.',
other: '# items could not be deleted.',
})}`,
variant: 'destructive',
});
} else {
toast({
title: isDocument ? t`Documents deleted` : t`Templates deleted`,
description: t`${result.deletedCount} item(s) have been deleted.`,
description: plural(result.deletedCount, {
one: '# item has been deleted.',
other: '# items have been deleted.',
}),
variant: 'default',
});
}
+1 -1
View File
@@ -402,7 +402,7 @@ export const SignUpForm = ({
size="lg"
className="mt-6 w-full"
>
<Trans>Complete</Trans>
<Trans>Create account</Trans>
</Button>
</form>
</Form>
+4 -4
View File
@@ -15,7 +15,7 @@
"dependencies": {
"@ai-sdk/google-vertex": "3.0.81",
"@documenso/prisma": "*",
"@libpdf/core": "^0.2.2",
"@libpdf/core": "^0.2.5",
"@lingui/conf": "^5.6.0",
"@lingui/core": "^5.6.0",
"ai": "^5.0.104",
@@ -4167,9 +4167,9 @@
"license": "MIT"
},
"node_modules/@libpdf/core": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@libpdf/core/-/core-0.2.2.tgz",
"integrity": "sha512-qxYHUirZc4YSxTYkUVtLHqM9ypC9iKPOpHYfpDIUYAZyDGgcHh4SOwhkInHY/Q51TBajXRv6ZZd9fjSPvoQZnw==",
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@libpdf/core/-/core-0.2.5.tgz",
"integrity": "sha512-+oTpNRkEdL1kVmeJr6qz2wf0yqJx5FmUVN2u0kDuX81wvxyzYOlMjmFD8qbbJqyYiNZp0J7IAcW6VsZr+MW1Uw==",
"license": "MIT",
"dependencies": {
"@noble/ciphers": "^2.1.1",
+1 -1
View File
@@ -86,7 +86,7 @@
"dependencies": {
"@ai-sdk/google-vertex": "3.0.81",
"@documenso/prisma": "*",
"@libpdf/core": "^0.2.2",
"@libpdf/core": "^0.2.5",
"@lingui/conf": "^5.6.0",
"@lingui/core": "^5.6.0",
"ai": "^5.0.104",
@@ -23,7 +23,7 @@ test('[USER] can sign up with email and password', async ({ page }: { page: Page
await signSignaturePad(page);
await page.getByRole('button', { name: 'Complete', exact: true }).click();
await page.getByRole('button', { name: 'Create account', exact: true }).click();
await page.waitForURL('/unverified-account');
@@ -388,6 +388,11 @@ const decorateAndSignPdf = async ({
}
}
// Flatten the form to bake checkbox/radio appearances into the PDF content
// This ensures proper rendering when the PDF is processed by libpdf
const form = legacy_pdfLibDoc.getForm();
form.flatten();
await pdfDoc.reload(await legacy_pdfLibDoc.save());
}