🚸 allow send only with recipients with set mails

This commit is contained in:
Timur Ercan
2023-03-03 20:48:44 +01:00
parent 937ac79243
commit e2f86f1a36

View File

@ -94,7 +94,9 @@ const RecipientsPage: NextPageWithLayout = (props: any) => {
}} }}
disabled={ disabled={
(signers.length || 0) === 0 || (signers.length || 0) === 0 ||
!signers.some((r: any) => r.sendStatus === "NOT_SENT") || !signers.some(
(r: any) => r.email && r.sendStatus === "NOT_SENT"
) ||
loading loading
} }
> >
@ -355,8 +357,9 @@ const RecipientsPage: NextPageWithLayout = (props: any) => {
<div className="mt-2"> <div className="mt-2">
<p className="text-sm text-gray-500"> <p className="text-sm text-gray-500">
{`"${props.document.title}" will be sent to ${ {`"${props.document.title}" will be sent to ${
signers.filter((s: any) => s.sendStatus != "SENT") signers.filter(
.length (s: any) => s.email && s.sendStatus != "SENT"
).length
} recipients.`} } recipients.`}
</p> </p>
</div> </div>