feat: signature rejection (#1472)

## Description

Adds support for rejecting a given document informing the document
owner.

Flows for resolving a rejection don't currently exist so it's up to the
document owner to reach out to the recipient and work out a way to move
forward via a new document or offline agreement.

## Related Issue


## Changes Made

- Added new rejection properties to the recipient schema
- Added API endpoints to support rejection
- Added email templates for notifying the document owner and recipient
- Added a dialog on the signing page to start the rejection flow.

## Testing Performed

- Manually tested the flow end to end
- Automated tests are planned
This commit is contained in:
Lucas Smith
2024-11-14 21:37:42 +11:00
committed by GitHub
parent f2439abbc9
commit 5398026b80
44 changed files with 1595 additions and 226 deletions

View File

@ -45,15 +45,15 @@ msgstr "\"{placeholderEmail}\" on behalf of \"{0}\" has invited you to sign \"ex
msgid "\"{teamUrl}\" has invited you to sign \"example document\"."
msgstr "\"{teamUrl}\" has invited you to sign \"example document\"."
#: apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx:78
#: apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx:79
msgid "({0}) has invited you to approve this document"
msgstr "({0}) has invited you to approve this document"
#: apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx:75
#: apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx:76
msgid "({0}) has invited you to sign this document"
msgstr "({0}) has invited you to sign this document"
#: apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx:72
#: apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx:73
msgid "({0}) has invited you to view this document"
msgstr "({0}) has invited you to view this document"
@ -653,7 +653,7 @@ msgstr "Approve"
msgid "Approve Document"
msgstr "Approve Document"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:85
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:94
msgid "Approved"
msgstr "Approved"
@ -661,6 +661,10 @@ msgstr "Approved"
msgid "Are you sure you want to delete this token?"
msgstr "Are you sure you want to delete this token?"
#: apps/web/src/app/(signing)/sign/[token]/reject-document-dialog.tsx:120
msgid "Are you sure you want to reject this document? This action cannot be undone."
msgstr "Are you sure you want to reject this document? This action cannot be undone."
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:188
msgid "Are you sure you want to remove the <0>{passkeyName}</0> passkey."
msgstr "Are you sure you want to remove the <0>{passkeyName}</0> passkey."
@ -809,6 +813,7 @@ msgstr "By using the electronic signature feature, you are consenting to conduct
#: apps/web/src/app/(signing)/sign/[token]/form.tsx:220
#: apps/web/src/app/(signing)/sign/[token]/name-field.tsx:215
#: apps/web/src/app/(signing)/sign/[token]/number-field.tsx:327
#: apps/web/src/app/(signing)/sign/[token]/reject-document-dialog.tsx:153
#: apps/web/src/app/(signing)/sign/[token]/sign-dialog.tsx:113
#: apps/web/src/app/(signing)/sign/[token]/signature-field.tsx:248
#: apps/web/src/app/(signing)/sign/[token]/text-field.tsx:333
@ -941,7 +946,7 @@ msgid "Complete Viewing"
msgstr "Complete Viewing"
#: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-documents-table.tsx:208
#: apps/web/src/components/(dashboard)/avatar/stack-avatars-with-tooltip.tsx:62
#: apps/web/src/components/(dashboard)/avatar/stack-avatars-with-tooltip.tsx:77
#: apps/web/src/components/formatter/document-status.tsx:28
msgid "Completed"
msgstr "Completed"
@ -1038,7 +1043,7 @@ msgstr "Controls the formatting of the message that will be sent when inviting a
msgid "Copied"
msgstr "Copied"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:133
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:162
#: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:77
#: apps/web/src/app/(dashboard)/templates/template-direct-link-badge.tsx:31
#: apps/web/src/app/(dashboard)/templates/template-direct-link-dialog.tsx:163
@ -1512,6 +1517,10 @@ msgstr "Document preferences updated"
msgid "Document re-sent"
msgstr "Document re-sent"
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:83
msgid "Document Rejected"
msgstr "Document Rejected"
#: apps/web/src/app/(dashboard)/admin/documents/[id]/admin-actions.tsx:36
msgid "Document resealed"
msgstr "Document resealed"
@ -2295,7 +2304,7 @@ msgstr "Member Since"
msgid "Members"
msgstr "Members"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:46
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:55
#: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-recipients.tsx:35
msgid "Modify recipients"
msgstr "Modify recipients"
@ -2389,6 +2398,10 @@ msgstr "Next field"
msgid "No active drafts"
msgstr "No active drafts"
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99
msgid "No further action is required from you at this time."
msgstr "No further action is required from you at this time."
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/billing/page.tsx:42
msgid "No payment required"
msgstr "No payment required"
@ -2405,7 +2418,7 @@ msgstr "No recent activity"
msgid "No recent documents"
msgstr "No recent documents"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:61
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:70
#: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-recipients.tsx:49
#: apps/web/src/components/document/document-recipient-link-copy-dialog.tsx:96
msgid "No recipients"
@ -2495,7 +2508,7 @@ msgstr "Only managers and above can access and view the document"
msgid "Oops! Something went wrong."
msgstr "Oops! Something went wrong."
#: apps/web/src/components/(dashboard)/avatar/stack-avatars-with-tooltip.tsx:101
#: apps/web/src/components/(dashboard)/avatar/stack-avatars-with-tooltip.tsx:140
msgid "Opened"
msgstr "Opened"
@ -2594,7 +2607,7 @@ msgstr "Payment is required to finalise the creation of your team."
msgid "Payment overdue"
msgstr "Payment overdue"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:122
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:131
#: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-documents-table.tsx:211
#: apps/web/src/components/(teams)/tables/teams-member-page-data-table.tsx:82
#: apps/web/src/components/(teams)/tables/user-settings-teams-page-data-table.tsx:77
@ -2687,6 +2700,10 @@ msgstr "Please note that this action is irreversible. Once confirmed, your webho
msgid "Please note that you will lose access to all documents associated with this team & all the members will be removed and notified"
msgstr "Please note that you will lose access to all documents associated with this team & all the members will be removed and notified"
#: apps/web/src/app/(signing)/sign/[token]/reject-document-dialog.tsx:37
msgid "Please provide a reason"
msgstr "Please provide a reason"
#: apps/web/src/components/forms/2fa/disable-authenticator-app-dialog.tsx:127
msgid "Please provide a token from the authenticator, or a backup code. If you do not have a backup code available, please contact support."
msgstr "Please provide a token from the authenticator, or a backup code. If you do not have a backup code available, please contact support."
@ -2795,7 +2812,7 @@ msgstr "Read only field"
msgid "Read the full <0>signature disclosure</0>."
msgstr "Read the full <0>signature disclosure</0>."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:97
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:106
msgid "Ready"
msgstr "Ready"
@ -2803,6 +2820,14 @@ msgstr "Ready"
msgid "Reason"
msgstr "Reason"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:146
msgid "Reason for rejection:"
msgstr "Reason for rejection:"
#: apps/web/src/app/(signing)/sign/[token]/reject-document-dialog.tsx:38
msgid "Reason must be less than 500 characters"
msgstr "Reason must be less than 500 characters"
#: apps/web/src/app/(signing)/sign/[token]/document-action-auth-dialog.tsx:62
msgid "Reauthentication is required to sign this field"
msgstr "Reauthentication is required to sign this field"
@ -2827,7 +2852,7 @@ msgid "Recipient updated"
msgstr "Recipient updated"
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:66
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:40
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:49
#: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-recipients.tsx:30
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/page.tsx:139
msgid "Recipients"
@ -2855,6 +2880,17 @@ msgstr "Recovery codes"
msgid "Registration Successful"
msgstr "Registration Successful"
#: apps/web/src/app/(signing)/sign/[token]/reject-document-dialog.tsx:109
#: apps/web/src/app/(signing)/sign/[token]/reject-document-dialog.tsx:116
#: apps/web/src/app/(signing)/sign/[token]/reject-document-dialog.tsx:162
msgid "Reject Document"
msgstr "Reject Document"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:141
#: apps/web/src/components/(dashboard)/avatar/stack-avatars-with-tooltip.tsx:101
msgid "Rejected"
msgstr "Rejected"
#: apps/web/src/app/(unauthenticated)/forgot-password/page.tsx:34
msgid "Remembered your password? <0>Sign In</0>"
msgstr "Remembered your password? <0>Sign In</0>"
@ -3084,7 +3120,7 @@ msgstr "Sending Reset Email..."
msgid "Sending..."
msgstr "Sending..."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:92
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:101
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx:248
msgid "Sent"
msgstr "Sent"
@ -3231,7 +3267,7 @@ msgstr "Signatures Collected"
msgid "Signatures will appear once the document has been completed"
msgstr "Signatures will appear once the document has been completed"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:105
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:114
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx:270
#: apps/web/src/components/document/document-read-only-fields.tsx:84
msgid "Signed"
@ -3640,6 +3676,10 @@ msgstr "The document has been successfully moved to the selected team."
msgid "The document is now completed, please follow any instructions provided within the parent application."
msgstr "The document is now completed, please follow any instructions provided within the parent application."
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:92
msgid "The document owner has been notified of your decision. They may contact you with further instructions if necessary."
msgstr "The document owner has been notified of your decision. They may contact you with further instructions if necessary."
#: apps/web/src/app/(dashboard)/templates/use-template-dialog.tsx:182
msgid "The document was created but could not be sent to recipients."
msgstr "The document was created but could not be sent to recipients."
@ -3694,7 +3734,7 @@ msgstr "The recipient has been updated successfully"
msgid "The selected team member will receive an email which they must accept before the team is transferred"
msgstr "The selected team member will receive an email which they must accept before the team is transferred"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:134
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:163
#: apps/web/src/components/(dashboard)/avatar/avatar-with-recipient.tsx:41
#: apps/web/src/components/document/document-recipient-link-copy-dialog.tsx:118
msgid "The signing link has been copied to your clipboard."
@ -4136,7 +4176,7 @@ msgstr "Unable to sign in"
msgid "Unauthorized"
msgstr "Unauthorized"
#: apps/web/src/components/(dashboard)/avatar/stack-avatars-with-tooltip.tsx:116
#: apps/web/src/components/(dashboard)/avatar/stack-avatars-with-tooltip.tsx:155
msgid "Uncompleted"
msgstr "Uncompleted"
@ -4381,12 +4421,12 @@ msgstr "View Recovery Codes"
msgid "View teams"
msgstr "View teams"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:111
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:120
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/certificate/page.tsx:259
msgid "Viewed"
msgstr "Viewed"
#: apps/web/src/components/(dashboard)/avatar/stack-avatars-with-tooltip.tsx:86
#: apps/web/src/components/(dashboard)/avatar/stack-avatars-with-tooltip.tsx:125
msgid "Waiting"
msgstr "Waiting"
@ -4841,6 +4881,10 @@ msgstr "You have reached your document limit."
msgid "You have reached your document limit. <0>Upgrade your account to continue!</0>"
msgstr "You have reached your document limit. <0>Upgrade your account to continue!</0>"
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:88
msgid "You have rejected this document"
msgstr "You have rejected this document"
#: apps/web/src/components/(teams)/dialogs/leave-team-dialog.tsx:50
msgid "You have successfully left this team."
msgstr "You have successfully left this team."