-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow for the deletion of any document #711
Conversation
@ksushant6566 is attempting to deploy a commit to the Documenso Team Team on Vercel. A member of the Team first needs to authorize it. |
Important Auto Review SkippedAuto reviews are limited to the following labels: coderabbit. Please add one of these labels to enable auto reviews. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the TipsChat with CodeRabbit Bot (
|
Hey @Mythie , just pushed the requested changes please have a look |
apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx
Outdated
Show resolved
Hide resolved
apps/web/src/app/(dashboard)/documents/deleteWithConfirmation.tsx
Outdated
Show resolved
Hide resolved
I think this is mostly missing interactions with what happens when a signer visits the signing page for a deleted document etc. If a document was deleted do we redirect them? Show an error page? If we do either of those what do we do for completed documents with a valid token, should we just show the normal completion page? |
I think for completed documents we can just show the normal page & for pending documents we can disable actions and show a message that this document is no longer available to sign wdyt? |
That sounds about right, if a pending document was deleted we can show them a screen letting them know that the document was removed while a completed document should just send the user to the completed page if the landed on |
I'll do a round of UI review with this now as well, I've only been stinging you on code so far 👀 |
This will also need some guards for recipients adding signatures when a document has since been deleted 😄 |
UI review was fine, just make the delete button a destructive variant since it's a destructive action |
Done, added a check in |
Here is a loom video of the solution :) https://www.loom.com/share/8f28b9ad4bb64a70b33da9d59fd2a95b?sid=3da77147-be41-486a-af86-cc8fd09afce2 |
round 2 |
Yo, I believe everything works now, but still do confirm if the logic below makes sense: What documents users can see: own documents received documents Pending documents:
Completed documents:
Note: Only owners can delete documents, users can't delete received documents. That will involve lot more work. (Maybe open another issue?) PS: thanks a lot for your help throughout 🙌 |
This all sounds correct to me, going to run through a few rounds of testing before I hit the merge button :) |
@ksushant6566 , you've done a great job. |
Resolves #696