[PR #1147] [MERGED] feat: add general template enhancements #1425

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1147
Author: @dguyen
Created: 5/7/2024
Status: Merged
Merged: 5/7/2024
Merged by: @dguyen

Base: mainHead: feat/template-enhancements


📝 Commits (2)

  • 0603a23 feat: add general template enhancements
  • 85a041c Merge branch 'main' into feat/template-enhancements

📊 Changes

11 files changed (+516 additions, -240 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/templates/[id]/template-page-view.tsx (+1 -1)
📝 apps/web/src/app/(dashboard)/templates/use-template-dialog.tsx (+182 -151)
📝 packages/api/v1/implementation.ts (+2 -2)
📝 packages/app-tests/e2e/templates/manage-templates.spec.ts (+16 -2)
packages/lib/constants/template.ts (+1 -0)
📝 packages/lib/errors/app-error.ts (+21 -0)
packages/lib/server-only/template/create-document-from-template-legacy.ts (+144 -0)
📝 packages/lib/server-only/template/create-document-from-template.ts (+117 -74)
📝 packages/trpc/server/template-router/router.ts (+24 -5)
📝 packages/trpc/server/template-router/schema.ts (+7 -5)
📝 packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx (+1 -0)

📄 Description

Description

Refactor the "use template" flow

Changes Made

  • Add placeholders for recipients
  • Add audit log when document is created
  • Trigger DOCUMENT_CREATED webhook when document is created
  • Remove role field when using template
  • Remove flaky logic when associating template recipients with form recipients
  • Refactor to use Form

Using template when document has no recipients

image

Using template with recipients

image

Using template with the send option selected

image

🔄 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/1147 **Author:** [@dguyen](https://github.com/dguyen) **Created:** 5/7/2024 **Status:** ✅ Merged **Merged:** 5/7/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `feat/template-enhancements` --- ### 📝 Commits (2) - [`0603a23`](https://github.com/documenso/documenso/commit/0603a23489b16e52e15643e3858a1c2a5a6b694a) feat: add general template enhancements - [`85a041c`](https://github.com/documenso/documenso/commit/85a041cb29fd29ae292e9699a855580485845329) Merge branch 'main' into feat/template-enhancements ### 📊 Changes **11 files changed** (+516 additions, -240 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/templates/[id]/template-page-view.tsx` (+1 -1) 📝 `apps/web/src/app/(dashboard)/templates/use-template-dialog.tsx` (+182 -151) 📝 `packages/api/v1/implementation.ts` (+2 -2) 📝 `packages/app-tests/e2e/templates/manage-templates.spec.ts` (+16 -2) ➕ `packages/lib/constants/template.ts` (+1 -0) 📝 `packages/lib/errors/app-error.ts` (+21 -0) ➕ `packages/lib/server-only/template/create-document-from-template-legacy.ts` (+144 -0) 📝 `packages/lib/server-only/template/create-document-from-template.ts` (+117 -74) 📝 `packages/trpc/server/template-router/router.ts` (+24 -5) 📝 `packages/trpc/server/template-router/schema.ts` (+7 -5) 📝 `packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx` (+1 -0) </details> ### 📄 Description ## Description Refactor the "use template" flow ## Changes Made - Add placeholders for recipients - Add audit log when document is created - Trigger DOCUMENT_CREATED webhook when document is created - Remove role field when using template - Remove flaky logic when associating template recipients with form recipients - Refactor to use `Form` ### Using template when document has no recipients <img width="529" alt="image" src="https://github.com/documenso/documenso/assets/20962767/a8494ac9-0397-4e3b-a0cf-818c8454a55c"> ### Using template with recipients <img width="529" alt="image" src="https://github.com/documenso/documenso/assets/20962767/54d949fc-ed6a-4318-bfd6-6a3179896ba9"> ### Using template with the send option selected <img width="529" alt="image" src="https://github.com/documenso/documenso/assets/20962767/541b2664-0540-43e9-83dd-e040a45a44ea"> --- <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:11 +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#1425
No description provided.