[PR #1023] [MERGED] feat: document super delete #1324

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1023
Author: @rohit-saluja
Created: 3/13/2024
Status: Merged
Merged: 3/28/2024
Merged by: @Mythie

Base: mainHead: document-super-delete#1020


📝 Commits (10+)

  • d0b9cee feat: created the dialog file for delete of document
  • 884eab3 feat: adding the schema for the admin delete document mutation
  • c10cfbf feat: adding the router for the delete document in the admin router
  • d8911ee feat: added the dialog delete file
  • 3b65447 feat: updating the dialog and page of document
  • a8413fa feat: disabled reason condition is updated on the dialog form
  • 4dc9e12 feat: added the templates for the delete of the documents from the admin
  • 3fb57c8 feat: send delete email is added
  • 487bc02 feat: reason is added to the component props
  • 35c1b0b feat: corrected the document redirection after delete

📊 Changes

8 files changed (+415 additions, -0 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx (+5 -0)
apps/web/src/app/(dashboard)/admin/documents/[id]/super-delete-document-dialog.tsx (+130 -0)
packages/email/template-components/template-document-super-delete.tsx (+45 -0)
packages/email/templates/document-super-delete.tsx (+66 -0)
packages/lib/server-only/document/send-delete-email.ts (+52 -0)
packages/lib/server-only/document/super-delete-document.ts (+85 -0)
📝 packages/trpc/server/admin-router/router.ts (+25 -0)
📝 packages/trpc/server/admin-router/schema.ts (+7 -0)

📄 Description

Added a dialog button at the bottom of the admin/documents/[id] page with confirmation popup.

Confirmation popup have validation for reason to input.

On confirmation document is deleted, and an email is triggred to the owner of document with the reason stated.

Let me know if there is any more requirement or correction is needed in this pr. :) #1020


🔄 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/1023 **Author:** [@rohit-saluja](https://github.com/rohit-saluja) **Created:** 3/13/2024 **Status:** ✅ Merged **Merged:** 3/28/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `document-super-delete#1020` --- ### 📝 Commits (10+) - [`d0b9cee`](https://github.com/documenso/documenso/commit/d0b9cee500b8262d1991a522440f482b498b09d5) feat: created the dialog file for delete of document - [`884eab3`](https://github.com/documenso/documenso/commit/884eab36eb6df985b59a9cff2225028f91f74e53) feat: adding the schema for the admin delete document mutation - [`c10cfbf`](https://github.com/documenso/documenso/commit/c10cfbf6e15714bba98d30840ce76d64b6c98bde) feat: adding the router for the delete document in the admin router - [`d8911ee`](https://github.com/documenso/documenso/commit/d8911ee97b30c412b84d11a079adedb0f7cb5f55) feat: added the dialog delete file - [`3b65447`](https://github.com/documenso/documenso/commit/3b65447b0ff21623ae848e32cc243ad9208df79b) feat: updating the dialog and page of document - [`a8413fa`](https://github.com/documenso/documenso/commit/a8413fa031d34676163ecf300e6614ca503015ea) feat: disabled reason condition is updated on the dialog form - [`4dc9e12`](https://github.com/documenso/documenso/commit/4dc9e1295b9fbbc2c14e6142add8a7f2a7b8def6) feat: added the templates for the delete of the documents from the admin - [`3fb57c8`](https://github.com/documenso/documenso/commit/3fb57c877ef0f71910f9b86e22641c1334f778f0) feat: send delete email is added - [`487bc02`](https://github.com/documenso/documenso/commit/487bc026f90812a3aaf1b0c22e30bbcca23327ac) feat: reason is added to the component props - [`35c1b0b`](https://github.com/documenso/documenso/commit/35c1b0bceef5cf32b9b43b50ed803e4f8662a098) feat: corrected the document redirection after delete ### 📊 Changes **8 files changed** (+415 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx` (+5 -0) ➕ `apps/web/src/app/(dashboard)/admin/documents/[id]/super-delete-document-dialog.tsx` (+130 -0) ➕ `packages/email/template-components/template-document-super-delete.tsx` (+45 -0) ➕ `packages/email/templates/document-super-delete.tsx` (+66 -0) ➕ `packages/lib/server-only/document/send-delete-email.ts` (+52 -0) ➕ `packages/lib/server-only/document/super-delete-document.ts` (+85 -0) 📝 `packages/trpc/server/admin-router/router.ts` (+25 -0) 📝 `packages/trpc/server/admin-router/schema.ts` (+7 -0) </details> ### 📄 Description Added a dialog button at the bottom of the admin/documents/[id] page with confirmation popup. Confirmation popup have validation for reason to input. On confirmation document is deleted, and an email is triggred to the owner of document with the reason stated. Let me know if there is any more requirement or correction is needed in this pr. :) #1020 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:32:46 +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#1324
No description provided.