[PR #1571] [MERGED] feat: allow switching document when using templates #1724

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1571
Author: @Mythie
Created: 1/7/2025
Status: Merged
Merged: 1/7/2025
Merged by: @Mythie

Base: mainHead: feat/template-document-switching


📝 Commits (2)

  • 61ab1ac feat: allow switching document when using templates
  • db7364e fix: updates and tests

📊 Changes

5 files changed (+527 additions, -86 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/templates/use-template-dialog.tsx (+254 -81)
📝 packages/app-tests/e2e/templates/create-document-from-template.spec.ts (+246 -0)
📝 packages/lib/server-only/template/create-document-from-template.ts (+23 -3)
📝 packages/trpc/server/template-router/router.ts (+3 -2)
📝 packages/trpc/server/template-router/schema.ts (+1 -0)

📄 Description

Description

Adds the ability to upload a custom document when using a template.

This is useful when you have a given fixed template with placeholder values that you want to decorate with Documenso fields but will then create a final specialised document when sending it out to a given recipient.

image image

Raised via user interviews.

Changes Made

  • Added the ability to upload a custom document when using a template
  • Updated the createDocumentFromTemplate endpoint to accept an optional custom documentDataId argument

Testing Performed

  • Created a document from a template the same way as usual
  • Created a document while providing a custom document
  • Verified behaviour is as expected

🔄 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/1571 **Author:** [@Mythie](https://github.com/Mythie) **Created:** 1/7/2025 **Status:** ✅ Merged **Merged:** 1/7/2025 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/template-document-switching` --- ### 📝 Commits (2) - [`61ab1ac`](https://github.com/documenso/documenso/commit/61ab1acb018669d91bf7636788054fb93911c986) feat: allow switching document when using templates - [`db7364e`](https://github.com/documenso/documenso/commit/db7364e22b65ddfdb26559424979391f0aaf818c) fix: updates and tests ### 📊 Changes **5 files changed** (+527 additions, -86 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/templates/use-template-dialog.tsx` (+254 -81) 📝 `packages/app-tests/e2e/templates/create-document-from-template.spec.ts` (+246 -0) 📝 `packages/lib/server-only/template/create-document-from-template.ts` (+23 -3) 📝 `packages/trpc/server/template-router/router.ts` (+3 -2) 📝 `packages/trpc/server/template-router/schema.ts` (+1 -0) </details> ### 📄 Description ## Description Adds the ability to upload a custom document when using a template. This is useful when you have a given fixed template with placeholder values that you want to decorate with Documenso fields but will then create a final specialised document when sending it out to a given recipient. <img width="623" alt="image" src="https://github.com/user-attachments/assets/fbcfd8fb-b91a-4e3d-9db8-34d105c38335" /> <img width="665" alt="image" src="https://github.com/user-attachments/assets/c9438a39-85e3-408a-b6b9-d7747f63e6ff" /> ## Related Issue Raised via user interviews. ## Changes Made - Added the ability to upload a custom document when using a template - Updated the createDocumentFromTemplate endpoint to accept an optional custom documentDataId argument ## Testing Performed - Created a document from a template the same way as usual - Created a document while providing a custom document - Verified behaviour is as expected --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:30:47 +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#1724
No description provided.