[PR #1185] [CLOSED] feat: add bin tab to show soft deleted documents #1455

Closed
opened 2026-02-26 19:33:20 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1185
Author: @ephraimduncan
Created: 6/13/2024
Status: Closed

Base: mainHead: feat/delete-archive


📝 Commits (10+)

  • c6393b7 feat: add bin tab to show soft deleted documents
  • 73e3759 fix: show deleted counts on tab
  • a9adc36 fix: date filter for deleted documents
  • 8311e0c fix: show correct tab count
  • 1a55f42 fix: tab count for teams
  • feef4b1 feat: restore deleted document
  • ea63b45 fix: add recipients filter for bin
  • 26ccdc1 fix: filter on recipients
  • 2837b17 fix: soft delete a document when the owner deletes it
  • 754e9e6 chore: refactor find documents

📊 Changes

34 files changed (+1498 additions, -660 deletions)

View changed files

📝 apps/marketing/process-env.d.ts (+2 -2)
📝 apps/web/process-env.d.ts (+1 -1)
📝 apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx (+15 -3)
📝 apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx (+1 -1)
📝 apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx (+32 -8)
📝 apps/web/src/app/(dashboard)/documents/documents-page-view.tsx (+6 -16)
📝 apps/web/src/app/(dashboard)/documents/empty-state.tsx (+6 -2)
apps/web/src/app/(dashboard)/documents/restore-document-dialog.tsx (+90 -0)
📝 apps/web/src/components/document/document-history-sheet.tsx (+1 -0)
📝 apps/web/src/components/formatter/document-status.tsx (+7 -1)
📝 packages/lib/jobs/definitions/internal/seal-document.ts (+1 -1)
📝 packages/lib/server-only/admin/get-documents-stats.ts (+1 -0)
📝 packages/lib/server-only/document/delete-document.ts (+10 -0)
📝 packages/lib/server-only/document/find-document-audit-logs.ts (+1 -0)
📝 packages/lib/server-only/document/find-documents.ts (+101 -23)
packages/lib/server-only/document/get-stats-new.tsx (+118 -0)
📝 packages/lib/server-only/document/get-stats.ts (+286 -130)
packages/lib/server-only/document/restore-document.ts (+149 -0)
📝 packages/lib/server-only/document/seal-document.ts (+1 -1)
📝 packages/lib/server-only/feature-flags/all.ts (+5 -1)

...and 14 more files

📄 Description

Description

Introduces a "Bin" with the functionality to handle soft-deleted documents, allowing users to restore deleted documents within 30 days.

Changes Made

  • Add a new tab for "Bin"
  • Add "Restore" to the dropdown options for deleted documents and functionality to restore soft deleted documents

Testing Performed

  • Tested the restoration feature by deleting and restoring documents in various scenarios.
  • Validated the audit logs to ensure accurate recording of delete and restore actions.

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/1185 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 6/13/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/delete-archive` --- ### 📝 Commits (10+) - [`c6393b7`](https://github.com/documenso/documenso/commit/c6393b7a9ecf83ffc487a909f6dae52fde84b1d0) feat: add bin tab to show soft deleted documents - [`73e3759`](https://github.com/documenso/documenso/commit/73e375938cd305f374102a437f2edd990dbfe0b3) fix: show deleted counts on tab - [`a9adc36`](https://github.com/documenso/documenso/commit/a9adc367323674c57e08e0969ddca0335e29e2f8) fix: date filter for deleted documents - [`8311e0c`](https://github.com/documenso/documenso/commit/8311e0cc2911a93e4e54e43bfbc40bf2de0b191b) fix: show correct tab count - [`1a55f42`](https://github.com/documenso/documenso/commit/1a55f4253b98194142c2a4b154d5569a3010a206) fix: tab count for teams - [`feef4b1`](https://github.com/documenso/documenso/commit/feef4b1a12392c29d9cc86989710d8518ba1b5ad) feat: restore deleted document - [`ea63b45`](https://github.com/documenso/documenso/commit/ea63b45a13005fe077994af991eb823a3d6a6a13) fix: add recipients filter for bin - [`26ccdc1`](https://github.com/documenso/documenso/commit/26ccdc1b23db6909017876897a636e7c3d814870) fix: filter on recipients - [`2837b17`](https://github.com/documenso/documenso/commit/2837b178fb01ce9b1fdbb3b96baca327eac4d7e0) fix: soft delete a document when the owner deletes it - [`754e9e6`](https://github.com/documenso/documenso/commit/754e9e6428365095b99923ae035c9fe680f0bcca) chore: refactor find documents ### 📊 Changes **34 files changed** (+1498 additions, -660 deletions) <details> <summary>View changed files</summary> 📝 `apps/marketing/process-env.d.ts` (+2 -2) 📝 `apps/web/process-env.d.ts` (+1 -1) 📝 `apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx` (+15 -3) 📝 `apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx` (+1 -1) 📝 `apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx` (+32 -8) 📝 `apps/web/src/app/(dashboard)/documents/documents-page-view.tsx` (+6 -16) 📝 `apps/web/src/app/(dashboard)/documents/empty-state.tsx` (+6 -2) ➕ `apps/web/src/app/(dashboard)/documents/restore-document-dialog.tsx` (+90 -0) 📝 `apps/web/src/components/document/document-history-sheet.tsx` (+1 -0) 📝 `apps/web/src/components/formatter/document-status.tsx` (+7 -1) 📝 `packages/lib/jobs/definitions/internal/seal-document.ts` (+1 -1) 📝 `packages/lib/server-only/admin/get-documents-stats.ts` (+1 -0) 📝 `packages/lib/server-only/document/delete-document.ts` (+10 -0) 📝 `packages/lib/server-only/document/find-document-audit-logs.ts` (+1 -0) 📝 `packages/lib/server-only/document/find-documents.ts` (+101 -23) ➕ `packages/lib/server-only/document/get-stats-new.tsx` (+118 -0) 📝 `packages/lib/server-only/document/get-stats.ts` (+286 -130) ➕ `packages/lib/server-only/document/restore-document.ts` (+149 -0) 📝 `packages/lib/server-only/document/seal-document.ts` (+1 -1) 📝 `packages/lib/server-only/feature-flags/all.ts` (+5 -1) _...and 14 more files_ </details> ### 📄 Description ## Description Introduces a "Bin" with the functionality to handle soft-deleted documents, allowing users to restore deleted documents within 30 days. ## Changes Made - Add a new tab for "Bin" - Add "Restore" to the dropdown options for deleted documents and functionality to restore soft deleted documents ## Testing Performed - Tested the restoration feature by deleting and restoring documents in various scenarios. - Validated the audit logs to ensure accurate recording of delete and restore actions. ## Checklist - [x] I have tested these changes locally and they work as expected. - [ ] I have added/updated tests that prove the effectiveness of these changes. - [ ] I have updated the documentation to reflect these changes, if applicable. - [x] I have followed the project's coding style guidelines. - [ ] I have addressed the code review feedback from the previous submission, if applicable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:33:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1455
No description provided.