mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
block editing completed documents
This commit is contained in:
@ -16,7 +16,7 @@ import {
|
|||||||
} from "@heroicons/react/24/outline";
|
} from "@heroicons/react/24/outline";
|
||||||
import { getUserFromToken } from "@documenso/lib/server";
|
import { getUserFromToken } from "@documenso/lib/server";
|
||||||
import { getDocument } from "@documenso/lib/query";
|
import { getDocument } from "@documenso/lib/query";
|
||||||
import { Document as PrismaDocument } from "@prisma/client";
|
import { Document as PrismaDocument, DocumentStatus } from "@prisma/client";
|
||||||
import { Breadcrumb, Button, IconButton } from "@documenso/ui";
|
import { Breadcrumb, Button, IconButton } from "@documenso/ui";
|
||||||
import { Dialog, Transition } from "@headlessui/react";
|
import { Dialog, Transition } from "@headlessui/react";
|
||||||
import {
|
import {
|
||||||
@ -96,14 +96,6 @@ const RecipientsPage: NextPageWithLayout = (props: any) => {
|
|||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 flex flex-shrink-0 md:mt-0 md:ml-4">
|
<div className="mt-4 flex flex-shrink-0 md:mt-0 md:ml-4">
|
||||||
<Button
|
|
||||||
icon={PencilSquareIcon}
|
|
||||||
color="secondary"
|
|
||||||
className="mr-2"
|
|
||||||
href={breadcrumbItems[1].href}
|
|
||||||
>
|
|
||||||
Edit Document
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
icon={ArrowDownTrayIcon}
|
icon={ArrowDownTrayIcon}
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@ -112,6 +104,19 @@ const RecipientsPage: NextPageWithLayout = (props: any) => {
|
|||||||
>
|
>
|
||||||
Download
|
Download
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button
|
||||||
|
icon={PencilSquareIcon}
|
||||||
|
disabled={props.document.status === DocumentStatus.COMPLETED}
|
||||||
|
color={
|
||||||
|
props.document.status === DocumentStatus.COMPLETED
|
||||||
|
? "primary"
|
||||||
|
: "secondary"
|
||||||
|
}
|
||||||
|
className="mr-2"
|
||||||
|
href={breadcrumbItems[1].href}
|
||||||
|
>
|
||||||
|
Edit Document
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
className="min-w-[125px]"
|
className="min-w-[125px]"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
Reference in New Issue
Block a user