diff --git a/apps/web/components/editor/editable-field.tsx b/apps/web/components/editor/editable-field.tsx
index b6ef8ad71..b78e442da 100644
--- a/apps/web/components/editor/editable-field.tsx
+++ b/apps/web/components/editor/editable-field.tsx
@@ -1,10 +1,7 @@
-import { ResizableBox, ResizeCallbackData } from "react-resizable";
-import React, { SyntheticEvent, useEffect, useState } from "react";
+import React, { useState } from "react";
import Draggable from "react-draggable";
-import { CircleStackIcon, TrashIcon } from "@heroicons/react/24/solid";
import Logo from "../logo";
import { IconButton } from "@documenso/ui";
-import toast from "react-hot-toast";
import { XCircleIcon } from "@heroicons/react/20/solid";
const stc = require("string-to-color");
@@ -20,6 +17,7 @@ type FieldPropsType = {
};
onPositionChanged: any;
onDelete: any;
+ hidden: boolean;
};
export default function EditableField(props: FieldPropsType) {
@@ -52,6 +50,7 @@ export default function EditableField(props: FieldPropsType) {
cancel="strong"
>
e.id == id);
const fieldIndex = fields.map((item) => item.id).indexOf(id);
- console.log(fieldIndex);
if (fieldIndex > -1) {
const fieldWithoutRemoved = [...fields];
const removedField = fieldWithoutRemoved.splice(fieldIndex, 1);
diff --git a/apps/web/components/editor/pdf-viewer.jsx b/apps/web/components/editor/pdf-viewer.jsx
index c68bd161f..39bbf6de4 100644
--- a/apps/web/components/editor/pdf-viewer.jsx
+++ b/apps/web/components/editor/pdf-viewer.jsx
@@ -71,6 +71,7 @@ export default function PDFViewer(props) {
>
) : (
{
const router = useRouter();
@@ -44,7 +42,7 @@ const DocumentsPage: NextPageWithLayout = (props: any) => {
}, []);
function showDocument(documentId: number) {
- router.push(`/documents/${documentId}`);
+ router.push(`/documents/${documentId}/recipients`);
}
return (
@@ -227,11 +225,33 @@ const DocumentsPage: NextPageWithLayout = (props: any) => {
-
- {
+
+ {
+ event.preventDefault();
+ event.stopPropagation();
+ router.push("/documents/" + document.id);
+ }}
+ >
+ Edit
+
+ {
+ event.preventDefault();
+ event.stopPropagation();
+ router.push("/api/documents/" + document.id);
+ }}
+ download
+ >
+ Download
+
+ {
event.preventDefault();
event.stopPropagation();
if (
@@ -259,9 +279,9 @@ const DocumentsPage: NextPageWithLayout = (props: any) => {
});
}
}}
- />
+ >
, {document.name}
-
+
|
))}
diff --git a/apps/web/pages/documents/[id]/index.tsx b/apps/web/pages/documents/[id]/index.tsx
index d28fed69d..c0c6ca213 100644
--- a/apps/web/pages/documents/[id]/index.tsx
+++ b/apps/web/pages/documents/[id]/index.tsx
@@ -9,7 +9,6 @@ import { DocumentStatus } from "@prisma/client";
import {
InformationCircleIcon,
PaperAirplaneIcon,
- UserPlusIcon,
UsersIcon,
} from "@heroicons/react/24/outline";
import { getDocument } from "@documenso/lib/query";
@@ -126,7 +125,7 @@ export async function getServerSideProps(context: any) {
return {
props: {
- document: document,
+ document: JSON.parse(JSON.stringify(document)),
},
};
} catch (error) {
diff --git a/apps/web/pages/documents/[id]/recipients.tsx b/apps/web/pages/documents/[id]/recipients.tsx
index 72eda2377..18e6666e5 100644
--- a/apps/web/pages/documents/[id]/recipients.tsx
+++ b/apps/web/pages/documents/[id]/recipients.tsx
@@ -4,6 +4,7 @@ import Layout from "../../../components/layout";
import { NextPageWithLayout } from "../../_app";
import { classNames, NEXT_PUBLIC_WEBAPP_URL } from "@documenso/lib";
import {
+ ArrowDownTrayIcon,
CheckBadgeIcon,
CheckIcon,
EnvelopeIcon,
@@ -63,13 +64,21 @@ const RecipientsPage: NextPageWithLayout = (props: any) => {
+