Commit Graph

64 Commits

Author SHA1 Message Date
Lucas Smith
0062359977 feat: add visible completed fields (#1109)
## Description

Added the ability for recipients to see fields from other recipients who
have completed the document when they are signing the document

Added the ability for the document owner to see fields from recipients
who have completed the field on the document page view (only visible
when the document is pending)


## 🚨🚨 Migrations🚨🚨

- Drop all `Fields` that do not have a `Recipient` set (not sure how it
was possible in the first place)
- Remove optional `Recipient` field on `Field` which doesn't make sense 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Enhanced document viewing by adding read-only fields based on document
status.
- Improved signing page by fetching and displaying completed fields for
tokens.
- Updated avatar component to show recipient status with tooltips for
better user interaction.

- **Bug Fixes**
- Made `recipientId` a required field in the database to ensure data
consistency.

- **Refactor**
- Optimized popover functionality in UI components for better
performance and user experience.

- **Documentation**
- Added detailed component and function descriptions for new features in
the system.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-25 20:53:13 +10:00
David Nguyen
41ed6c9ad7 fix: disable cert download when document not complete 2024-04-24 19:49:10 +07:00
David Nguyen
a97ffa97a4 Merge branch 'main' into feat/visible-fields 2024-04-19 17:54:32 +07:00
David Nguyen
bd40e63392 fix: update document deletion logic (#1100) 2024-04-19 17:37:38 +07:00
David Nguyen
6e09a4700b fix: prevent signing draft documents (#1111)
## Description

Currently users can sign and complete draft documents, which will result
in a completed document in an invalid state.

## Changes Made

- Prevent recipients from inserting or uninserting fields for draft
documents
- Prevent recipients from completing draft documents 
- Remove ability to copy signing tokens unless document is pending

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced document status visibility and control across various
components in the application. Users can now see and interact with
document statuses more dynamically in views like `DocumentPageView`,
`DocumentEditPageView`, and `DocumentsDataTable`.
- Improved document signing process with updated status checks, ensuring
actions like signing, completing, and removing fields are only available
under appropriate document statuses.

- **Bug Fixes**
- Adjusted document status validation logic in server-side operations to
prevent actions on incorrectly stated documents, enhancing the overall
security and functionality of document processing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 16:17:32 +07:00
David Nguyen
6526377f1b feat: add visible completed fields 2024-04-18 21:56:31 +07:00
Timur Ercan
80c758fb62 chore: audit log menu item label (#1102) 2024-04-12 20:37:08 +07:00
David Nguyen
7705dbae0c feat: add document log page link (#1099)
## Description

Adds a link from the document page view to the document page log view

<img width="289" alt="image"
src="https://github.com/documenso/documenso/assets/20962767/335af85a-26c3-4849-a54e-25eb62373574">
2024-04-11 15:04:36 +07:00
Mythie
4d4dfd3c5f fix: implement review feedback, resolve build errors 2024-04-10 17:39:16 +07:00
Mythie
110f9bae12 feat: add certificate and audit log pdfs 2024-04-10 15:13:18 +07:00
David Nguyen
1400c335a5 fix: improve document loading ui consistency (#1082)
## Description

General UI updates

## Changes Made

- Add consistent spacing between document edit/view/log pages
- Add document status to document audit log page
- Update document loading page to reserve space for the document status
below the title
- Update the document audit log page to show full dates in the correct
locale
2024-04-09 11:31:53 +07:00
David Nguyen
a54eb54ef7 feat: add document auth (#1029) 2024-03-28 13:13:29 +08:00
David Nguyen
038370012f fix: render fields on document load (#1054)
## Description

Currently if you try to load the document edit page when fields need to
be rendered, you will not be able to see the fields until you proceed to
the next step.

This is because the fields require the document PDF to be loaded prior
to rendering them.

This PR resolves that issue by only rendering the fields after the PDF
is loaded.

## Changes Made

- Add a state to track whether the PDF is loaded
- Render the fields only after the PDF is loaded

## Testing Performed

Tested document flow manually and the fields are rendered correctly on
load.

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have updated the documentation to reflect these changes, if
applicable.
2024-03-27 14:10:29 +08:00
David Nguyen
006b732edb fix: update document flow fetch logic (#1039)
## Description

**Fixes issues with mismatching state between document steps.**

For example, editing a recipient and proceeding to the next step may not
display the updated recipient. And going back will display the old
recipient instead of the updated values.

**This PR also improves mutation and query speeds by adding logic to
bypass query invalidation.**

```ts
export const trpc = createTRPCReact<AppRouter>({
  unstable_overrides: {
    useMutation: {
      async onSuccess(opts) {
        await opts.originalFn();

        // This forces mutations to wait for all the queries on the page to reload, and in
        // this case one of the queries is `searchDocument` for the command overlay, which
        // on average takes ~500ms. This means that every single mutation must wait for this.
        await opts.queryClient.invalidateQueries(); 
      },
    },
  },
});
```

I've added workarounds to allow us to bypass things such as batching and
invalidating queries. But I think we should instead remove this and
update all the mutations where a query is required for a more optimised
system.

## Example benchmarks

Using stg-app vs this preview there's an average 50% speed increase
across mutations.

**Set signer step:**
Average old speed: ~1100ms
Average new speed: ~550ms

**Set recipient step:**
Average old speed: ~1200ms
Average new speed: ~600ms

**Set fields step:**
Average old speed: ~1200ms
Average new speed: ~600ms

## Related Issue

This will resolve #470

## Changes Made

- Added ability to skip batch queries
- Added a state to store the required document data.
- Refetch the data between steps if/when required
- Optimise mutations and queries

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have followed the project's coding style guidelines.

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2024-03-26 21:12:41 +08:00
Lucas Smith
3c51a1bc3d Merge branch 'main' into feat/public-api 2024-02-26 12:15:33 +11:00
Mythie
a54159a9ec fix: add missing teamId references 2024-02-26 11:59:32 +11:00
David Nguyen
5bd0dde4a5 fix: e2e tests 2024-02-26 10:50:46 +11:00
David Nguyen
34825aaf3a feat: add separate document audit page 2024-02-22 19:14:01 +11:00
David Nguyen
ac6da9ab45 feat: add feature flag 2024-02-19 14:31:26 +11:00
David Nguyen
7fbe9b519c fix: styling 2024-02-15 20:42:17 +11:00
David Nguyen
bd3c64658a feat: add document version history UI 2024-02-15 20:39:26 +11:00
David Nguyen
071475769c feat: add document page view 2024-02-12 17:30:23 +11:00
Adithya Krishna
09b5621542 Merge branch 'main' into feat/sign-redirect 2024-02-08 12:56:42 +05:30
David Nguyen
e97b9b4f1c feat: add team templates (#912) 2024-02-08 12:33:20 +11:00
Adithya Krishna
1dd543247e chore: update branch
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-02-06 18:07:24 +05:30
David Nguyen
0c339b78b6 feat: add teams (#848)
## Description

Add support for teams which will allow users to collaborate on
documents.

Teams features allows users to:

- Create, manage and transfer teams
- Manage team members
- Manage team emails
- Manage a shared team inbox and documents

These changes do NOT include the following, which are planned for a
future release:

- Team templates
- Team API
- Search menu integration

## Testing Performed

- Added E2E tests for general team management
- Added E2E tests to validate document counts

## 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.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [X] I have followed the project's coding style guidelines.
2024-02-06 16:16:10 +11:00
Adithya Krishna
9ed16c64d8 Merge branch 'main' of https://github.com/documenso/documenso into feat/sign-redirect 2024-02-05 13:13:16 +05:30
Lucas Smith
7fbf124b89 fix: use div instead of rnd for preview fields 2024-02-01 01:10:50 +00:00
Adithya Krishna
f4c24fd944 feat: add a feature for redirecting users on signing
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-01-31 18:17:43 +05:30
Mythie
91dd10ec9b fix: add symmetric encryption to document passwords 2024-01-17 17:28:28 +11:00
Mythie
a94b829ee0 fix: tidy code 2024-01-17 17:17:08 +11:00
harkiratsm
68953d1253 feat add documentPassword to documenet meta and improve the ux
Signed-off-by: harkiratsm <multaniharry714@gmail.com>
2024-01-12 20:54:59 +05:30
hallidayo
32633f96d2 feat: dateformat and timezone customization (#506) 2023-12-27 14:05:49 +11:00
Mythie
1a34f9fa7a fix: import updates and api route body sizes 2023-12-07 15:08:00 +11:00
mikezzb
340c929806 refactor: edit doc 2023-12-03 11:36:18 -05:00
mikezzb
40a4ec4436 refactor: useContext & remove enum 2023-12-03 01:15:59 -05:00
mikezzb
a98b429052 feat: stepper refactor example 2023-12-02 22:42:59 -05:00
Lucas Smith
39c01f4e8d fix: remove server actions (#684) 2023-12-02 09:38:24 +11:00
Lucas Smith
335684d0b7 fix: edit document sizing (#706) 2023-12-01 23:09:24 +11:00
Szymon Sus
7e4c44e820 perf(web, lib): do not await inside promise statements (#692) 2023-11-29 09:10:15 +11:00
Tanay
adc97802ea feat: add/update title of the document (#663) 2023-11-28 14:56:50 +11:00
Nafees Nazik
f7d8ebb9de feat: enable resend email menu (#496) 2023-11-16 13:08:31 +11:00
Mythie
457e73342b fix: unbreak pdf viewer 2023-11-06 13:02:20 +11:00
Mythie
284a2870c2 fix: move getFile to client side 2023-11-06 13:02:20 +11:00
Mythie
5cba913c55 fix: resolve issues with signing document stickiness 2023-11-06 13:01:46 +11:00
David Nguyen
48f4289c09 fix: resolve document title inconsistency (#452) 2023-11-06 13:01:45 +11:00
David Nguyen
34232c79e5 feat: add single player mode 2023-11-06 13:01:43 +11:00
Mythie
60ae674984 feat: darker dark theme 2023-11-06 13:01:15 +11:00
Mythie
0835da45ef fix: implement feedback 2023-11-06 13:01:13 +11:00
Mythie
3afc35c40c feat: universal upload
Implementation of a universal upload allowing for multiple storage backends
starting with `database` and `s3`.

Allows clients to put and retrieve files from either client or server using
a blend of client and server actions.
2023-11-06 13:01:13 +11:00