[PR #1154] [MERGED] feat: add template enhancements #1431

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1154
Author: @dguyen
Created: 5/9/2024
Status: Merged
Merged: 5/10/2024
Merged by: @dguyen

Base: mainHead: feat/more-template-enhancements


📝 Commits (6)

📊 Changes

38 files changed (+2104 additions, -511 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/documents/[id]/edit-document.tsx (+1 -0)
📝 apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx (+5 -5)
📝 apps/web/src/app/(dashboard)/templates/[id]/edit-template.tsx (+138 -22)
📝 apps/web/src/app/(dashboard)/templates/[id]/template-page-view.tsx (+9 -21)
📝 apps/web/src/app/(dashboard)/templates/new-template-dialog.tsx (+28 -146)
📝 packages/api/v1/contract.ts (+20 -0)
📝 packages/api/v1/implementation.ts (+82 -0)
📝 packages/api/v1/schema.ts (+54 -0)
📝 packages/app-tests/e2e/document-flow/settings-step.spec.ts (+7 -14)
📝 packages/app-tests/e2e/document-flow/signers-step.spec.ts (+1 -23)
packages/app-tests/e2e/templates-flow/template-settings-step.spec.ts (+167 -0)
packages/app-tests/e2e/templates-flow/template-signers-step.spec.ts (+106 -0)
packages/app-tests/e2e/templates/create-document-from-template.spec.ts (+285 -0)
packages/lib/schemas/common.ts (+12 -0)
📝 packages/lib/server-only/field/set-fields-for-template.ts (+20 -19)
📝 packages/lib/server-only/recipient/set-recipients-for-template.ts (+94 -26)
📝 packages/lib/server-only/template/create-document-from-template.ts (+72 -17)
packages/lib/server-only/template/get-template-with-details-by-id.ts (+38 -0)
packages/lib/server-only/template/update-template-settings.ts (+139 -0)
packages/prisma/migrations/20240508150017_add_template_settings/migration.sql (+22 -0)

...and 18 more files

📄 Description

Description

General enhancements for templates.

Changes Made

Added the following changes to the template flow:

  • Allow adding document meta settings
  • Allow adding email settings
  • Allow adding document access & action authentication
  • Allow adding recipient action authentication
  • Save the state between template steps similar to how it works for documents

Other changes:

  • Extract common fields between document and template flows
  • Remove the title field from "Use template" since we now have it as part of the template flow

Testing Performed

Added E2E tests for templates and creating documents from templates


🔄 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/1154 **Author:** [@dguyen](https://github.com/dguyen) **Created:** 5/9/2024 **Status:** ✅ Merged **Merged:** 5/10/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `feat/more-template-enhancements` --- ### 📝 Commits (6) - [`7e5c4af`](https://github.com/documenso/documenso/commit/7e5c4afa635deea1356457ebc20f3ed65896223e) feat: add template enhancements - [`2de41c8`](https://github.com/documenso/documenso/commit/2de41c899ed95893aaf961e062ecb84a19b441b1) fix: tests - [`dacb3ba`](https://github.com/documenso/documenso/commit/dacb3bad102350a1ab748701f625be884015697c) fix: tests - [`42284ac`](https://github.com/documenso/documenso/commit/42284acb1496fbc18a20f638a0dd296ed16312d2) fix: bump test - [`d4e20a4`](https://github.com/documenso/documenso/commit/d4e20a4948eb30ef196d8562eb5f11de39759ee6) fix: update api - [`e03842d`](https://github.com/documenso/documenso/commit/e03842d31822841c90edbc4c8fe4e8bba4f6c6c3) fix: refactor docs ### 📊 Changes **38 files changed** (+2104 additions, -511 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/documents/[id]/edit-document.tsx` (+1 -0) 📝 `apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx` (+5 -5) 📝 `apps/web/src/app/(dashboard)/templates/[id]/edit-template.tsx` (+138 -22) 📝 `apps/web/src/app/(dashboard)/templates/[id]/template-page-view.tsx` (+9 -21) 📝 `apps/web/src/app/(dashboard)/templates/new-template-dialog.tsx` (+28 -146) 📝 `packages/api/v1/contract.ts` (+20 -0) 📝 `packages/api/v1/implementation.ts` (+82 -0) 📝 `packages/api/v1/schema.ts` (+54 -0) 📝 `packages/app-tests/e2e/document-flow/settings-step.spec.ts` (+7 -14) 📝 `packages/app-tests/e2e/document-flow/signers-step.spec.ts` (+1 -23) ➕ `packages/app-tests/e2e/templates-flow/template-settings-step.spec.ts` (+167 -0) ➕ `packages/app-tests/e2e/templates-flow/template-signers-step.spec.ts` (+106 -0) ➕ `packages/app-tests/e2e/templates/create-document-from-template.spec.ts` (+285 -0) ➕ `packages/lib/schemas/common.ts` (+12 -0) 📝 `packages/lib/server-only/field/set-fields-for-template.ts` (+20 -19) 📝 `packages/lib/server-only/recipient/set-recipients-for-template.ts` (+94 -26) 📝 `packages/lib/server-only/template/create-document-from-template.ts` (+72 -17) ➕ `packages/lib/server-only/template/get-template-with-details-by-id.ts` (+38 -0) ➕ `packages/lib/server-only/template/update-template-settings.ts` (+139 -0) ➕ `packages/prisma/migrations/20240508150017_add_template_settings/migration.sql` (+22 -0) _...and 18 more files_ </details> ### 📄 Description ## Description General enhancements for templates. ## Changes Made Added the following changes to the template flow: - Allow adding document meta settings - Allow adding email settings - Allow adding document access & action authentication - Allow adding recipient action authentication - Save the state between template steps similar to how it works for documents Other changes: - Extract common fields between document and template flows - Remove the title field from "Use template" since we now have it as part of the template flow ## Testing Performed Added E2E tests for templates and creating documents from templates --- <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:13 +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#1431
No description provided.