[PR #1158] [MERGED] fix: show field on pending document #1433

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/1158
Author: @ephraimduncan
Created: 5/14/2024
Status: Merged
Merged: 6/24/2024
Merged by: @dguyen

Base: mainHead: feat/show-fields


📝 Commits (9)

  • b4717a0 fix: show field on pending document
  • 96ce61a fix: refactor get fields
  • a8415bc fix: replace deleted component
  • 16fd988 Merge branch 'main' into feat/show-fields
  • ad7b022 fix: remove completed fields
  • 0f6b83c Merge branch 'main' into feat/show-fields
  • 3f81603 Merge branch 'main' into feat/show-fields
  • efbe60b fix: refactor
  • f45d42c fix: add meta

📊 Changes

4 files changed (+78 additions, -51 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx (+5 -7)
📝 apps/web/src/components/document/document-read-only-fields.tsx (+60 -44)
📝 packages/lib/server-only/field/get-completed-fields-for-token.ts (+1 -0)
📝 packages/lib/server-only/field/get-fields-for-document.ts (+12 -0)

📄 Description

Description

This pull request introduces the functionality to display pending fields on the document page view. This enhancement allows users to see which fields are pending and need to be completed.

CleanShot 2024-05-14 at 23 31 29@2x

Changes Made

  • Added getPendingFieldsForDocument function in packages/lib/server-only/field/get-pending-fields-for-document.ts to fetch pending fields for a document.
  • Created a new component DocumentPendingFields in document-pending-fields.tsx to display the pending fields with options to hide individual fields.

Testing Performed

  • Tested the new feature by creating documents with pending fields and verifying their display on the document page view.
  • Verified that the pending fields are correctly hidden when the "Hide field" button is clicked.
  • Ran unit tests for the new functionality and existing components to ensure no regressions.

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.

Additional Notes

No additional notes.

Summary by CodeRabbit

  • New Features

    • Introduced logic for handling pending and completed document fields based on signing status.
  • Refactor

    • Replaced getCompletedFieldsForDocument with getFieldsForDocument.
    • Updated DocumentReadOnlyFields component to DocumentPendingFields.
  • Bug Fixes

    • Improved field retrieval accuracy and display based on recipient signing status.
  • Style

    • Enhanced UI elements with new icons and button adjustments for better user interaction.

🔄 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/1158 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 5/14/2024 **Status:** ✅ Merged **Merged:** 6/24/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `feat/show-fields` --- ### 📝 Commits (9) - [`b4717a0`](https://github.com/documenso/documenso/commit/b4717a01924858978ac4eb889dfd8246c1be9cc9) fix: show field on pending document - [`96ce61a`](https://github.com/documenso/documenso/commit/96ce61a83b7ee4e2213e7838dbc2b133379c569d) fix: refactor get fields - [`a8415bc`](https://github.com/documenso/documenso/commit/a8415bc7c2cd4eb616205242cdbc3f87674638ac) fix: replace deleted component - [`16fd988`](https://github.com/documenso/documenso/commit/16fd9883061ef632a120a7e16e083c9bcefc776a) Merge branch 'main' into feat/show-fields - [`ad7b022`](https://github.com/documenso/documenso/commit/ad7b022a2c2875faa4a506ba5aa4ab6e8a62d6f6) fix: remove completed fields - [`0f6b83c`](https://github.com/documenso/documenso/commit/0f6b83c269876db2b1687cc35657d7f731c2b018) Merge branch 'main' into feat/show-fields - [`3f81603`](https://github.com/documenso/documenso/commit/3f8160330b380043fc557c71da644cdb2136fc6e) Merge branch 'main' into feat/show-fields - [`efbe60b`](https://github.com/documenso/documenso/commit/efbe60b3bf73f8dcda8a71a9efc4e4e2fcbf920c) fix: refactor - [`f45d42c`](https://github.com/documenso/documenso/commit/f45d42ca22bbb5871137f12e61d5594597589e65) fix: add meta ### 📊 Changes **4 files changed** (+78 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx` (+5 -7) 📝 `apps/web/src/components/document/document-read-only-fields.tsx` (+60 -44) 📝 `packages/lib/server-only/field/get-completed-fields-for-token.ts` (+1 -0) 📝 `packages/lib/server-only/field/get-fields-for-document.ts` (+12 -0) </details> ### 📄 Description ## Description This pull request introduces the functionality to display pending fields on the document page view. This enhancement allows users to see which fields are pending and need to be completed. ![CleanShot 2024-05-14 at 23 31 29@2x](https://github.com/documenso/documenso/assets/55143799/ffea0b29-d251-4dd5-9742-5416ac8262ad) ## Changes Made - Added `getPendingFieldsForDocument` function in `packages/lib/server-only/field/get-pending-fields-for-document.ts` to fetch pending fields for a document. - Created a new component `DocumentPendingFields` in `document-pending-fields.tsx` to display the pending fields with options to hide individual fields. ## Testing Performed - Tested the new feature by creating documents with pending fields and verifying their display on the document page view. - Verified that the pending fields are correctly hidden when the "Hide field" button is clicked. - Ran unit tests for the new functionality and existing components to ensure no regressions. ## Checklist - [x] I have tested these changes locally and they work as expected. - [x] I have added/updated tests that prove the effectiveness of these changes. - [x] 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. ## Additional Notes No additional notes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced logic for handling pending and completed document fields based on signing status. - **Refactor** - Replaced `getCompletedFieldsForDocument` with `getFieldsForDocument`. - Updated `DocumentReadOnlyFields` component to `DocumentPendingFields`. - **Bug Fixes** - Improved field retrieval accuracy and display based on recipient signing status. - **Style** - Enhanced UI elements with new icons and button adjustments for better user interaction. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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#1433
No description provided.