mirror of
https://github.com/documenso/documenso.git
synced 2026-07-27 18:35:05 +10:00
Merge branch 'main' into harkirat/Protect
This commit is contained in:
@@ -13,9 +13,9 @@
|
|||||||
·
|
·
|
||||||
<a href="https://github.com/documenso/documenso/issues">Issues</a>
|
<a href="https://github.com/documenso/documenso/issues">Issues</a>
|
||||||
·
|
·
|
||||||
<a href="https://github.com/documenso/documenso/milestones">Roadmap</a>
|
<a href="https://documen.so/live">Upcoming Releases</a>
|
||||||
·
|
·
|
||||||
<a href="https://documen.so/launches">Upcoming Launches</a>
|
<a href="https://documen.so/roadmap">Roadmap</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -284,12 +284,16 @@ WantedBy=multi-user.target
|
|||||||
|
|
||||||
### Railway
|
### Railway
|
||||||
|
|
||||||
[](https://railway.app/template/DjrRRX)
|
[](https://railway.app/template/bG6D4p)
|
||||||
|
|
||||||
### Render
|
### Render
|
||||||
|
|
||||||
[](https://render.com/deploy?repo=https://github.com/documenso/documenso)
|
[](https://render.com/deploy?repo=https://github.com/documenso/documenso)
|
||||||
|
|
||||||
|
### Koyeb
|
||||||
|
|
||||||
|
[](https://app.koyeb.com/deploy?type=git&repository=github.com/documenso/documenso&branch=main&name=documenso-app&builder=dockerfile&dockerfile=/docker/Dockerfile)
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### I'm not receiving any emails when using the developer quickstart.
|
### I'm not receiving any emails when using the developer quickstart.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
"react-hook-form": "^7.43.9",
|
"react-hook-form": "^7.43.9",
|
||||||
"react-icons": "^4.11.0",
|
"react-icons": "^4.11.0",
|
||||||
"recharts": "^2.7.2",
|
"recharts": "^2.7.2",
|
||||||
"sharp": "0.32.5",
|
"sharp": "0.33.1",
|
||||||
"typescript": "5.2.2",
|
"typescript": "5.2.2",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { HTMLAttributes, KeyboardEvent, useMemo, useState } from 'react';
|
import type { HTMLAttributes, KeyboardEvent } from 'react';
|
||||||
|
import { useMemo, useState } from 'react';
|
||||||
|
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { AnimatePresence, motion } from 'framer-motion';
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
@@ -90,10 +91,10 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (step === STEP.EMAIL) {
|
if (step === STEP.EMAIL) {
|
||||||
return 1;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 3;
|
return 1;
|
||||||
}, [step]);
|
}, [step]);
|
||||||
|
|
||||||
const onNextStepClick = () => {
|
const onNextStepClick = () => {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
"react-hotkeys-hook": "^4.4.1",
|
"react-hotkeys-hook": "^4.4.1",
|
||||||
"react-icons": "^4.11.0",
|
"react-icons": "^4.11.0",
|
||||||
"react-rnd": "^10.4.1",
|
"react-rnd": "^10.4.1",
|
||||||
"sharp": "0.32.5",
|
"sharp": "0.33.1",
|
||||||
"ts-pattern": "^5.0.5",
|
"ts-pattern": "^5.0.5",
|
||||||
"typescript": "5.2.2",
|
"typescript": "5.2.2",
|
||||||
"uqr": "^0.1.2",
|
"uqr": "^0.1.2",
|
||||||
|
|||||||
@@ -49,6 +49,11 @@ export const SigningForm = ({ document, recipient, fields }: SigningFormProps) =
|
|||||||
return sortFieldsByPosition(fields.filter((field) => !field.inserted));
|
return sortFieldsByPosition(fields.filter((field) => !field.inserted));
|
||||||
}, [fields]);
|
}, [fields]);
|
||||||
|
|
||||||
|
const fieldsValidated = () => {
|
||||||
|
setValidateUninsertedFields(true);
|
||||||
|
validateFieldsInserted(fields);
|
||||||
|
};
|
||||||
|
|
||||||
const onFormSubmit = async () => {
|
const onFormSubmit = async () => {
|
||||||
setValidateUninsertedFields(true);
|
setValidateUninsertedFields(true);
|
||||||
|
|
||||||
@@ -154,6 +159,7 @@ export const SigningForm = ({ document, recipient, fields }: SigningFormProps) =
|
|||||||
onSignatureComplete={handleSubmit(onFormSubmit)}
|
onSignatureComplete={handleSubmit(onFormSubmit)}
|
||||||
document={document}
|
document={document}
|
||||||
fields={fields}
|
fields={fields}
|
||||||
|
fieldsValidated={fieldsValidated}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export type SignDialogProps = {
|
|||||||
isSubmitting: boolean;
|
isSubmitting: boolean;
|
||||||
document: Document;
|
document: Document;
|
||||||
fields: Field[];
|
fields: Field[];
|
||||||
|
fieldsValidated: () => void | Promise<void>;
|
||||||
onSignatureComplete: () => void | Promise<void>;
|
onSignatureComplete: () => void | Promise<void>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@ export const SignDialog = ({
|
|||||||
isSubmitting,
|
isSubmitting,
|
||||||
document,
|
document,
|
||||||
fields,
|
fields,
|
||||||
|
fieldsValidated,
|
||||||
onSignatureComplete,
|
onSignatureComplete,
|
||||||
}: SignDialogProps) => {
|
}: SignDialogProps) => {
|
||||||
const [showDialog, setShowDialog] = useState(false);
|
const [showDialog, setShowDialog] = useState(false);
|
||||||
@@ -29,16 +31,16 @@ export const SignDialog = ({
|
|||||||
const isComplete = fields.every((field) => field.inserted);
|
const isComplete = fields.every((field) => field.inserted);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={showDialog} onOpenChange={setShowDialog}>
|
<Dialog open={showDialog && isComplete} onOpenChange={setShowDialog}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
className="w-full"
|
className="w-full"
|
||||||
type="button"
|
type="button"
|
||||||
size="lg"
|
size="lg"
|
||||||
disabled={!isComplete}
|
onClick={fieldsValidated}
|
||||||
loading={isSubmitting}
|
loading={isSubmitting}
|
||||||
>
|
>
|
||||||
Complete
|
{isComplete ? 'Complete' : 'Next field'}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
|
|||||||
Generated
+653
-326
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@
|
|||||||
"eslint-config-next": "13.4.19",
|
"eslint-config-next": "13.4.19",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"eslint-config-turbo": "^1.9.3",
|
"eslint-config-turbo": "^1.9.3",
|
||||||
"eslint-plugin-package-json": "^0.1.4",
|
"eslint-plugin-package-json": "^0.2.0",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"eslint-plugin-react": "^7.32.2",
|
"eslint-plugin-react": "^7.32.2",
|
||||||
"eslint-plugin-unused-imports": "^3.0.0",
|
"eslint-plugin-unused-imports": "^3.0.0",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export type CreateDocumentMetaOptions = {
|
|||||||
message: string;
|
message: string;
|
||||||
timezone: string;
|
timezone: string;
|
||||||
dateFormat: string;
|
dateFormat: string;
|
||||||
|
userId: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const upsertDocumentMeta = async ({
|
export const upsertDocumentMeta = async ({
|
||||||
@@ -16,7 +17,15 @@ export const upsertDocumentMeta = async ({
|
|||||||
timezone,
|
timezone,
|
||||||
dateFormat,
|
dateFormat,
|
||||||
documentId,
|
documentId,
|
||||||
|
userId,
|
||||||
}: CreateDocumentMetaOptions) => {
|
}: CreateDocumentMetaOptions) => {
|
||||||
|
await prisma.document.findFirstOrThrow({
|
||||||
|
where: {
|
||||||
|
id: documentId,
|
||||||
|
userId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
return await prisma.documentMeta.upsert({
|
return await prisma.documentMeta.upsert({
|
||||||
where: {
|
where: {
|
||||||
documentId,
|
documentId,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"autoprefixer": "^10.4.13",
|
"autoprefixer": "^10.4.13",
|
||||||
"postcss": "^8.4.21",
|
"postcss": "^8.4.32",
|
||||||
"tailwindcss": "3.3.2",
|
"tailwindcss": "3.3.2",
|
||||||
"tailwindcss-animate": "^1.0.5"
|
"tailwindcss-animate": "^1.0.5"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ export const documentRouter = router({
|
|||||||
message: meta.message,
|
message: meta.message,
|
||||||
dateFormat: meta.dateFormat,
|
dateFormat: meta.dateFormat,
|
||||||
timezone: meta.timezone,
|
timezone: meta.timezone,
|
||||||
|
userId: ctx.user.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
[build]
|
||||||
|
|
||||||
|
builder = "DOCKERFILE"
|
||||||
|
dockerfilePath = "/docker/Dockerfile"
|
||||||
Reference in New Issue
Block a user