mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
fix: pending document edit (#1580)
Fix issue where you cannot edit a pending document when there is a CCer recipient.
This commit is contained in:
@ -8,8 +8,17 @@ export const formatSigningLink = (token: string) => `${NEXT_PUBLIC_WEBAPP_URL()}
|
||||
* Whether a recipient can be modified by the document owner.
|
||||
*/
|
||||
export const canRecipientBeModified = (recipient: Recipient, fields: Field[]) => {
|
||||
if (!recipient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// CCers can always be modified (unless document is completed).
|
||||
if (recipient.role === RecipientRole.CC) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Deny if the recipient has already signed the document.
|
||||
if (!recipient || recipient.signingStatus === SigningStatus.SIGNED) {
|
||||
if (recipient.signingStatus === SigningStatus.SIGNED) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user