mirror of
https://github.com/documenso/documenso.git
synced 2025-11-18 02:32:00 +10:00
send signing request
This commit is contained in:
@ -60,8 +60,7 @@ const RecipientsPage: NextPageWithLayout = (props: any) => {
|
||||
color="primary"
|
||||
icon={PaperAirplaneIcon}
|
||||
onClick={() => {
|
||||
alert();
|
||||
// todo do stuff
|
||||
send(props.document);
|
||||
}}
|
||||
disabled={(props?.document?.Recipient?.length || 0) === 0}
|
||||
>
|
||||
@ -266,4 +265,17 @@ export async function getServerSideProps(context: any) {
|
||||
};
|
||||
}
|
||||
|
||||
async function send(document: any) {
|
||||
// todo toast
|
||||
// loading
|
||||
if (!document || !document.id) return;
|
||||
await fetch(`/api/documents/${document.id}/send`, {
|
||||
body: "",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
export default RecipientsPage;
|
||||
|
||||
Reference in New Issue
Block a user