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

@ -39,26 +39,26 @@ msgstr "\"{email}\" au nom de \"{teamName}\" vous a invité à signer \"example
#~ "\"{placeholderEmail}\" on behalf of \"{0}\" has invited you to sign \"example\n"
#~ "document\"."
#~ msgstr ""
#~ "\"{placeholderEmail}\" on behalf of \"{0}\" has invited you to sign \"example\n"
#~ "\"{placeholderEmail}\" au nom de \"{0}\" vous a invité à signer \"example\n"
#~ "document\"."
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/document-preferences.tsx:209
msgid "\"{placeholderEmail}\" on behalf of \"{0}\" has invited you to sign \"example document\"."
msgstr "\"{placeholderEmail}\" au nom de \"{0}\" vous a invité à signer \"exemple de document\"."
msgstr ""
#: apps/web/src/components/(teams)/forms/update-team-form.tsx:241
msgid "\"{teamUrl}\" has invited you to sign \"example document\"."
msgstr "\"{teamUrl}\" vous a invité à signer \"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}) vous a invité à approuver ce 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}) vous a invité à signer ce 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}) vous a invité à consulter ce document"
@ -658,7 +658,7 @@ msgstr "Approuver"
msgid "Approve Document"
msgstr "Approuver le 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 "Approuvé"
@ -666,6 +666,10 @@ msgstr "Approuvé"
msgid "Are you sure you want to delete this token?"
msgstr "Êtes-vous sûr de vouloir supprimer ce jeton ?"
#: 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 ""
#: 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 "Êtes-vous sûr de vouloir supprimer la clé de passe <0>{passkeyName}</0>."
@ -814,6 +818,7 @@ msgstr "En utilisant la fonctionnalité de signature électronique, vous consent
#: 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
@ -946,7 +951,7 @@ msgid "Complete Viewing"
msgstr "Compléter la visualisation"
#: 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 "Complété"
@ -1043,7 +1048,7 @@ msgstr "Contrôle le formatage du message qui sera envoyé lors de l'invitation
msgid "Copied"
msgstr "Copié"
#: 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
@ -1517,6 +1522,10 @@ msgstr "Préférences de document mises à jour"
msgid "Document re-sent"
msgstr "Document renvoyé"
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:83
msgid "Document Rejected"
msgstr ""
#: apps/web/src/app/(dashboard)/admin/documents/[id]/admin-actions.tsx:36
msgid "Document resealed"
msgstr "Document resealé"
@ -2300,7 +2309,7 @@ msgstr "Membre depuis"
msgid "Members"
msgstr "Membres"
#: 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 "Modifier les destinataires"
@ -2394,6 +2403,10 @@ msgstr "Champ suivant"
msgid "No active drafts"
msgstr "Pas de brouillons actifs"
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99
msgid "No further action is required from you at this time."
msgstr ""
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/billing/page.tsx:42
msgid "No payment required"
msgstr "Aucun paiement requis"
@ -2410,7 +2423,7 @@ msgstr "Aucune activité récente"
msgid "No recent documents"
msgstr "Aucun document récent"
#: 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"
@ -2500,7 +2513,7 @@ msgstr "Seuls les responsables et au-dessus peuvent accéder et voir le document
msgid "Oops! Something went wrong."
msgstr "Oups ! Quelque chose a mal tourné."
#: 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 "Ouvert"
@ -2599,7 +2612,7 @@ msgstr "Un paiement est requis pour finaliser la création de votre équipe."
msgid "Payment overdue"
msgstr "Paiement en retard"
#: 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
@ -2692,6 +2705,10 @@ msgstr "Veuillez noter que cette action est irréversible. Une fois confirmée,
msgid "Please note that you will lose access to all documents associated with this team & all the members will be removed and notified"
msgstr "Veuillez noter que vous perdrez l'accès à tous les documents associés à cette équipe et que tous les membres seront supprimés et notifiés"
#: apps/web/src/app/(signing)/sign/[token]/reject-document-dialog.tsx:37
msgid "Please provide a reason"
msgstr ""
#: 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 "Veuillez fournir un jeton de l'authentificateur, ou un code de secours. Si vous n'avez pas de code de secours disponible, veuillez contacter le support."
@ -2800,7 +2817,7 @@ msgstr "Champ en lecture seule"
msgid "Read the full <0>signature disclosure</0>."
msgstr "Lisez l'intégralité de la <0>divulgation de signature</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 "Prêt"
@ -2808,6 +2825,14 @@ msgstr "Prêt"
msgid "Reason"
msgstr "Raison"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:146
msgid "Reason for rejection:"
msgstr ""
#: apps/web/src/app/(signing)/sign/[token]/reject-document-dialog.tsx:38
msgid "Reason must be less than 500 characters"
msgstr ""
#: apps/web/src/app/(signing)/sign/[token]/document-action-auth-dialog.tsx:62
msgid "Reauthentication is required to sign this field"
msgstr "Une nouvelle authentification est requise pour signer ce champ"
@ -2832,7 +2857,7 @@ msgid "Recipient updated"
msgstr "Destinataire mis à jour"
#: 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"
@ -2860,6 +2885,17 @@ msgstr "Codes de récupération"
msgid "Registration Successful"
msgstr "Inscription réussie"
#: 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 ""
#: 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 ""
#: apps/web/src/app/(unauthenticated)/forgot-password/page.tsx:34
msgid "Remembered your password? <0>Sign In</0>"
msgstr "Vous vous souvenez de votre mot de passe ? <0>Connectez-vous</0>"
@ -3089,7 +3125,7 @@ msgstr "Envoi de l'e-mail de réinitialisation..."
msgid "Sending..."
msgstr "Envoi..."
#: 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 "Envoyé"
@ -3236,7 +3272,7 @@ msgstr "Signatures collectées"
msgid "Signatures will appear once the document has been completed"
msgstr "Les signatures apparaîtront une fois le document complété"
#: 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"
@ -3645,6 +3681,10 @@ msgstr "Le document a été déplacé avec succès vers l'équipe sélectionnée
msgid "The document is now completed, please follow any instructions provided within the parent application."
msgstr "Le document est maintenant complet, veuillez suivre toutes les instructions fournies dans l'application parente."
#: 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 ""
#: apps/web/src/app/(dashboard)/templates/use-template-dialog.tsx:182
msgid "The document was created but could not be sent to recipients."
msgstr "Le document a été créé mais n'a pas pu être envoyé aux destinataires."
@ -3699,7 +3739,7 @@ msgstr "Le destinataire a été mis à jour avec succès"
msgid "The selected team member will receive an email which they must accept before the team is transferred"
msgstr "Le membre d'équipe sélectionné recevra un e-mail qu'il devra accepter avant que l'équipe soit transférée"
#: 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."
@ -4141,7 +4181,7 @@ msgstr "Impossible de se connecter"
msgid "Unauthorized"
msgstr "Non autorisé"
#: 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 "Non complet"
@ -4386,12 +4426,12 @@ msgstr "Voir les codes de récupération"
msgid "View teams"
msgstr "Voir les équipes"
#: 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 "Vu"
#: 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 "En attente"
@ -4846,6 +4886,10 @@ msgstr "Vous avez atteint votre limite de documents."
msgid "You have reached your document limit. <0>Upgrade your account to continue!</0>"
msgstr "Vous avez atteint votre limite de documents. <0>Mettez à niveau votre compte pour continuer !</0>"
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:88
msgid "You have rejected this document"
msgstr ""
#: apps/web/src/components/(teams)/dialogs/leave-team-dialog.tsx:50
msgid "You have successfully left this team."
msgstr "Vous avez quitté cette équipe avec succès."
@ -5073,4 +5117,3 @@ msgstr "Votre jeton a été créé avec succès ! Assurez-vous de le copier car
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:86
msgid "Your tokens will be shown here once you create them."
msgstr "Vos jetons seront affichés ici une fois que vous les aurez créés."