mirror of
https://github.com/documenso/documenso.git
synced 2025-11-21 12:11:29 +10:00
Merge branch 'main' into feat/allow-same-signer-email-multiple-times
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@documenso/web",
|
"name": "@documenso/web",
|
||||||
"version": "1.9.1-rc.0",
|
"version": "1.9.1-rc.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -189,6 +189,7 @@ export const SignDirectTemplateForm = ({
|
|||||||
field={field}
|
field={field}
|
||||||
onSignField={onSignField}
|
onSignField={onSignField}
|
||||||
onUnsignField={onUnsignField}
|
onUnsignField={onUnsignField}
|
||||||
|
typedSignatureEnabled={template.templateMeta?.typedSignatureEnabled}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
.with(FieldType.INITIALS, () => (
|
.with(FieldType.INITIALS, () => (
|
||||||
@ -342,6 +343,7 @@ export const SignDirectTemplateForm = ({
|
|||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
setSignature(value);
|
setSignature(value);
|
||||||
}}
|
}}
|
||||||
|
allowTypedSignature={template.templateMeta?.typedSignatureEnabled}
|
||||||
/>
|
/>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@ -179,7 +179,13 @@ export const SigningPageView = ({
|
|||||||
)
|
)
|
||||||
.map((field) =>
|
.map((field) =>
|
||||||
match(field.type)
|
match(field.type)
|
||||||
.with(FieldType.SIGNATURE, () => <SignatureField key={field.id} field={field} />)
|
.with(FieldType.SIGNATURE, () => (
|
||||||
|
<SignatureField
|
||||||
|
key={field.id}
|
||||||
|
field={field}
|
||||||
|
typedSignatureEnabled={documentMeta?.typedSignatureEnabled}
|
||||||
|
/>
|
||||||
|
))
|
||||||
.with(FieldType.INITIALS, () => <InitialsField key={field.id} field={field} />)
|
.with(FieldType.INITIALS, () => <InitialsField key={field.id} field={field} />)
|
||||||
.with(FieldType.NAME, () => <NameField key={field.id} field={field} />)
|
.with(FieldType.NAME, () => <NameField key={field.id} field={field} />)
|
||||||
.with(FieldType.DATE, () => (
|
.with(FieldType.DATE, () => (
|
||||||
|
|||||||
21
package-lock.json
generated
21
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@documenso/root",
|
"name": "@documenso/root",
|
||||||
"version": "1.9.1-rc.0",
|
"version": "1.9.1-rc.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@documenso/root",
|
"name": "@documenso/root",
|
||||||
"version": "1.9.1-rc.0",
|
"version": "1.9.1-rc.1",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"apps/*",
|
"apps/*",
|
||||||
"packages/*"
|
"packages/*"
|
||||||
@ -106,7 +106,7 @@
|
|||||||
},
|
},
|
||||||
"apps/web": {
|
"apps/web": {
|
||||||
"name": "@documenso/web",
|
"name": "@documenso/web",
|
||||||
"version": "1.9.1-rc.0",
|
"version": "1.9.1-rc.1",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@documenso/api": "*",
|
"@documenso/api": "*",
|
||||||
@ -35722,6 +35722,21 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.9.1-rc.0",
|
"version": "1.9.1-rc.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "turbo run build",
|
"build": "turbo run build",
|
||||||
"build:web": "turbo run build --filter=@documenso/web",
|
"build:web": "turbo run build --filter=@documenso/web",
|
||||||
|
|||||||
@ -5,6 +5,18 @@ import { hashSync } from '@documenso/lib/server-only/auth/hash';
|
|||||||
|
|
||||||
import { prisma } from '..';
|
import { prisma } from '..';
|
||||||
import { DocumentDataType, DocumentSource, Role, TeamMemberRole } from '../client';
|
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 () => {
|
export const seedDatabase = async () => {
|
||||||
const examplePdf = fs
|
const examplePdf = fs
|
||||||
@ -39,24 +51,14 @@ export const seedDatabase = async () => {
|
|||||||
update: {},
|
update: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
const examplePdfData = await prisma.documentData.upsert({
|
for (let i = 1; i <= 4; i++) {
|
||||||
where: {
|
const documentData = await createDocumentData({ documentData: examplePdf });
|
||||||
id: 'clmn0kv5k0000pe04vcqg5zla',
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
id: 'clmn0kv5k0000pe04vcqg5zla',
|
|
||||||
type: DocumentDataType.BYTES_64,
|
|
||||||
data: examplePdf,
|
|
||||||
initialData: examplePdf,
|
|
||||||
},
|
|
||||||
update: {},
|
|
||||||
});
|
|
||||||
|
|
||||||
await prisma.document.create({
|
await prisma.document.create({
|
||||||
data: {
|
data: {
|
||||||
source: DocumentSource.DOCUMENT,
|
source: DocumentSource.DOCUMENT,
|
||||||
title: 'Example Document',
|
title: `Example Document ${i}`,
|
||||||
documentDataId: examplePdfData.id,
|
documentDataId: documentData.id,
|
||||||
userId: exampleUser.id,
|
userId: exampleUser.id,
|
||||||
recipients: {
|
recipients: {
|
||||||
create: {
|
create: {
|
||||||
@ -67,6 +69,61 @@ export const seedDatabase = async () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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 = [
|
const testUsers = [
|
||||||
'test@documenso.com',
|
'test@documenso.com',
|
||||||
|
|||||||
Reference in New Issue
Block a user