mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 08:42:12 +10:00
ux ideas
This commit is contained in:
@ -114,11 +114,15 @@ const DocumentsDetailPage: NextPageWithLayout = (props: any) => {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={(props?.document?.Recipient?.length || 0) === 0}
|
disabled={(props?.document?.Recipient?.length || 0) === 0}
|
||||||
onClick={() =>
|
onClick={() => {
|
||||||
|
if (
|
||||||
confirm(
|
confirm(
|
||||||
`Send document out to ${props?.document?.Recipient?.length} recipients?`
|
`Send document out to ${props?.document?.Recipient?.length} recipients?`
|
||||||
)
|
)
|
||||||
|
) {
|
||||||
|
alert();
|
||||||
}
|
}
|
||||||
|
}}
|
||||||
className="ml-3 inline-flex items-center rounded-md border border-transparent bg-neon px-4 py-2 text-sm font-medium text-white shadow-sm bg-grey hover:bg-neon-dark focus:outline-none focus:ring-2 focus:neon-dark focus:ring-offset-2"
|
className="ml-3 inline-flex items-center rounded-md border border-transparent bg-neon px-4 py-2 text-sm font-medium text-white shadow-sm bg-grey hover:bg-neon-dark focus:outline-none focus:ring-2 focus:neon-dark focus:ring-offset-2"
|
||||||
>
|
>
|
||||||
<PaperAirplaneIcon className="inline text-white w-4 mr-1"></PaperAirplaneIcon>
|
<PaperAirplaneIcon className="inline text-white w-4 mr-1"></PaperAirplaneIcon>
|
||||||
|
|||||||
@ -25,8 +25,11 @@ import {
|
|||||||
} from "@heroicons/react/24/outline";
|
} from "@heroicons/react/24/outline";
|
||||||
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/20/solid";
|
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/20/solid";
|
||||||
import { getUserFromToken } from "@documenso/lib/server";
|
import { getUserFromToken } from "@documenso/lib/server";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { toast } from "react-hot-toast";
|
||||||
|
|
||||||
const RecipientsPage: NextPageWithLayout = (props: any) => {
|
const RecipientsPage: NextPageWithLayout = (props: any) => {
|
||||||
|
const router = useRouter();
|
||||||
const title: string =
|
const title: string =
|
||||||
`"` + props?.document?.title + `"` + "Recipients | Documenso";
|
`"` + props?.document?.title + `"` + "Recipients | Documenso";
|
||||||
return (
|
return (
|
||||||
@ -117,11 +120,16 @@ const RecipientsPage: NextPageWithLayout = (props: any) => {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={(props?.document?.Recipient?.length || 0) === 0}
|
disabled={(props?.document?.Recipient?.length || 0) === 0}
|
||||||
onClick={() =>
|
onClick={() => {
|
||||||
|
if (
|
||||||
confirm(
|
confirm(
|
||||||
`Send document out to ${props?.document?.Recipient?.length} recipients?`
|
`Send document out to ${props?.document?.Recipient?.length} recipients?`
|
||||||
)
|
)
|
||||||
|
) {
|
||||||
|
router.push("/documents/" + props.document.id);
|
||||||
|
toast.success("Document sent!");
|
||||||
}
|
}
|
||||||
|
}}
|
||||||
className="ml-3 inline-flex items-center rounded-md border border-transparent bg-neon px-4 py-2 text-sm font-medium text-white shadow-sm bg-grey hover:bg-neon-dark focus:outline-none focus:ring-2 focus:neon-dark focus:ring-offset-2"
|
className="ml-3 inline-flex items-center rounded-md border border-transparent bg-neon px-4 py-2 text-sm font-medium text-white shadow-sm bg-grey hover:bg-neon-dark focus:outline-none focus:ring-2 focus:neon-dark focus:ring-offset-2"
|
||||||
>
|
>
|
||||||
<PaperAirplaneIcon className="inline text-white w-4 mr-1"></PaperAirplaneIcon>
|
<PaperAirplaneIcon className="inline text-white w-4 mr-1"></PaperAirplaneIcon>
|
||||||
|
|||||||
Reference in New Issue
Block a user