diff --git a/apps/web/package.json b/apps/web/package.json
index c0caf4c66..2bc55c63b 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -1,6 +1,6 @@
{
"name": "@documenso/web",
- "version": "1.9.1-rc.0",
+ "version": "1.9.1-rc.1",
"private": true,
"license": "AGPL-3.0",
"scripts": {
diff --git a/apps/web/src/app/(recipient)/d/[token]/sign-direct-template.tsx b/apps/web/src/app/(recipient)/d/[token]/sign-direct-template.tsx
index 73e4aa178..a0d92e595 100644
--- a/apps/web/src/app/(recipient)/d/[token]/sign-direct-template.tsx
+++ b/apps/web/src/app/(recipient)/d/[token]/sign-direct-template.tsx
@@ -189,6 +189,7 @@ export const SignDirectTemplateForm = ({
field={field}
onSignField={onSignField}
onUnsignField={onUnsignField}
+ typedSignatureEnabled={template.templateMeta?.typedSignatureEnabled}
/>
))
.with(FieldType.INITIALS, () => (
@@ -342,6 +343,7 @@ export const SignDirectTemplateForm = ({
onChange={(value) => {
setSignature(value);
}}
+ allowTypedSignature={template.templateMeta?.typedSignatureEnabled}
/>
diff --git a/apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx b/apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx
index 9c129edb6..e38ff2b85 100644
--- a/apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx
+++ b/apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx
@@ -179,7 +179,13 @@ export const SigningPageView = ({
)
.map((field) =>
match(field.type)
- .with(FieldType.SIGNATURE, () => )
+ .with(FieldType.SIGNATURE, () => (
+
+ ))
.with(FieldType.INITIALS, () => )
.with(FieldType.NAME, () => )
.with(FieldType.DATE, () => (
diff --git a/package-lock.json b/package-lock.json
index 9c49e7fa6..36153b31a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@documenso/root",
- "version": "1.9.1-rc.0",
+ "version": "1.9.1-rc.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@documenso/root",
- "version": "1.9.1-rc.0",
+ "version": "1.9.1-rc.1",
"workspaces": [
"apps/*",
"packages/*"
@@ -106,7 +106,7 @@
},
"apps/web": {
"name": "@documenso/web",
- "version": "1.9.1-rc.0",
+ "version": "1.9.1-rc.1",
"license": "AGPL-3.0",
"dependencies": {
"@documenso/api": "*",
@@ -35722,6 +35722,21 @@
"engines": {
"node": ">=6"
}
+ },
+ "packages/trpc/node_modules/@next/swc-win32-ia32-msvc": {
+ "version": "14.2.6",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.6.tgz",
+ "integrity": "sha512-hNukAxq7hu4o5/UjPp5jqoBEtrpCbOmnUqZSKNJG8GrUVzfq0ucdhQFVrHcLRMvQcwqqDh1a5AJN9ORnNDpgBQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
}
}
}
diff --git a/package.json b/package.json
index 1fbace766..bc442208b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"private": true,
- "version": "1.9.1-rc.0",
+ "version": "1.9.1-rc.1",
"scripts": {
"build": "turbo run build",
"build:web": "turbo run build --filter=@documenso/web",
diff --git a/packages/prisma/seed/initial-seed.ts b/packages/prisma/seed/initial-seed.ts
index d270b31fa..158b68475 100644
--- a/packages/prisma/seed/initial-seed.ts
+++ b/packages/prisma/seed/initial-seed.ts
@@ -5,6 +5,18 @@ import { hashSync } from '@documenso/lib/server-only/auth/hash';
import { prisma } from '..';
import { DocumentDataType, DocumentSource, Role, TeamMemberRole } from '../client';
+import { seedPendingDocument } from './documents';
+import { seedDirectTemplate, seedTemplate } from './templates';
+
+const createDocumentData = async ({ documentData }: { documentData: string }) => {
+ return prisma.documentData.create({
+ data: {
+ type: DocumentDataType.BYTES_64,
+ data: documentData,
+ initialData: documentData,
+ },
+ });
+};
export const seedDatabase = async () => {
const examplePdf = fs
@@ -39,35 +51,80 @@ export const seedDatabase = async () => {
update: {},
});
- const examplePdfData = await prisma.documentData.upsert({
- where: {
- id: 'clmn0kv5k0000pe04vcqg5zla',
- },
- create: {
- id: 'clmn0kv5k0000pe04vcqg5zla',
- type: DocumentDataType.BYTES_64,
- data: examplePdf,
- initialData: examplePdf,
- },
- update: {},
- });
+ for (let i = 1; i <= 4; i++) {
+ const documentData = await createDocumentData({ documentData: examplePdf });
- await prisma.document.create({
- data: {
- source: DocumentSource.DOCUMENT,
- title: 'Example Document',
- documentDataId: examplePdfData.id,
- userId: exampleUser.id,
- recipients: {
- create: {
- name: String(adminUser.name),
- email: adminUser.email,
- token: Math.random().toString(36).slice(2, 9),
+ await prisma.document.create({
+ data: {
+ source: DocumentSource.DOCUMENT,
+ title: `Example Document ${i}`,
+ documentDataId: documentData.id,
+ userId: exampleUser.id,
+ recipients: {
+ create: {
+ name: String(adminUser.name),
+ email: adminUser.email,
+ token: Math.random().toString(36).slice(2, 9),
+ },
},
},
+ });
+ }
+
+ for (let i = 1; i <= 4; i++) {
+ const documentData = await createDocumentData({ documentData: examplePdf });
+
+ await prisma.document.create({
+ data: {
+ source: DocumentSource.DOCUMENT,
+ title: `Document ${i}`,
+ documentDataId: documentData.id,
+ userId: adminUser.id,
+ recipients: {
+ create: {
+ name: String(exampleUser.name),
+ email: exampleUser.email,
+ token: Math.random().toString(36).slice(2, 9),
+ },
+ },
+ },
+ });
+ }
+
+ await seedPendingDocument(exampleUser, [adminUser], {
+ key: 'example-pending',
+ createDocumentOptions: {
+ title: 'Pending Document',
},
});
+ await seedPendingDocument(adminUser, [exampleUser], {
+ key: 'admin-pending',
+ createDocumentOptions: {
+ title: 'Pending Document',
+ },
+ });
+
+ await Promise.all([
+ seedTemplate({
+ title: 'Template 1',
+ userId: exampleUser.id,
+ }),
+ seedDirectTemplate({
+ title: 'Direct Template 1',
+ userId: exampleUser.id,
+ }),
+
+ seedTemplate({
+ title: 'Template 1',
+ userId: adminUser.id,
+ }),
+ seedDirectTemplate({
+ title: 'Direct Template 1',
+ userId: adminUser.id,
+ }),
+ ]);
+
const testUsers = [
'test@documenso.com',
'test2@documenso.com',