Commit Graph

32 Commits

Author SHA1 Message Date
Lucas Smith
c3035dbd15 feat: add external id to documents and templates (#1227)
## Description

Adds the external ID column to documents and templates with an option to
configure it in the API or UI.

External ID's can be used to link a document or template to an external
system and identify them via webhooks, etc.
2024-07-13 16:45:09 +10:00
Ephraim Duncan
92c09c5850 feat: move document to team (#1210)
Introduces a new dialog component allowing users to move documents
between teams with included audit logging.
2024-07-02 12:47:24 +10:00
Mythie
110f9bae12 feat: add certificate and audit log pdfs 2024-04-10 15:13:18 +07:00
David Nguyen
a54eb54ef7 feat: add document auth (#1029) 2024-03-28 13:13: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
Mythie
a54159a9ec fix: add missing teamId references 2024-02-26 11:59:32 +11:00
Mythie
c7dac2f4de fix: update delete endpoint and add limits 2024-02-26 10:01:13 +11:00
Lucas Smith
2a74ce06ef Merge branch 'main' into feat/public-api 2024-02-26 00:21:25 +11:00
Mythie
2abcdd7533 feat: team api tokens 2024-02-22 13:39:34 +11:00
David Nguyen
bd3c64658a feat: add document version history UI 2024-02-15 20:39:26 +11:00
David Nguyen
b1bb345929 fix: redirect URL preventing document flow (#925)
## Description

Currently the document redirect URL feature is preventing documents from
being created unless a redirect URL is provided.

During the document edit flow, the redirect URL is hidden in an advanced
tab with the value of an empty string, which will always fail the
current Zod validation since `optional` requires undefined to pass.

There are multiple ways to fix this, but I think this is the easiest
method where we can assume an empty string is valid.
2024-02-12 15:23:15 +11:00
Adithya Krishna
1dd543247e chore: update branch
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-02-06 18:07:24 +05:30
Adithya Krishna
2636d5fd16 chore: finish and clean-up redirect post signing
Signed-off-by: Adithya Krishna <adi@documenso.com>
2024-02-06 18:04:56 +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
Hani
7ece6ef239 feat: add recipient roles (#716)
Fixes #705

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
Co-authored-by: David Nguyen <davidngu28@gmail.com>
2024-02-02 10:45:02 +11: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
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
Sushant
bfc630aa6a feat: add document search to the command menu (#713) 2023-12-06 12:48:05 +11:00
Sushant
2068d980ff feat: allow for the deletion of any document (#711)
Allow for the deletion of any document with notifications of document cancellation for pending documents.
2023-12-06 11:11:51 +11:00
Lucas Smith
39c01f4e8d fix: remove server actions (#684) 2023-12-02 09:38:24 +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
Nafees Nazik
c9a71beb81 feat: delete draft document (#491) 2023-11-06 13:02:18 +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
Mythie
72bec7bc34 feat: separate document data from document 2023-11-06 13:01:13 +11:00
Mythie
98c980a5c4 fix: remove further unused code 2023-11-06 13:01:11 +11:00
David Nguyen
a99efdc916 feat: add inbox 2023-11-06 13:01:11 +11:00
Mythie
12d8cebd4c feat: use server-actions for authoring flow
This change actually makes the authoring flow work for
the most part by tying in emailing and more.

We have also done a number of quality of life updates to
simplify the codebase overall making it easier to continue
work on the refresh.
2023-11-06 13:01:07 +11:00
Mythie
3c73f030ac feat: persist fields and recipients for document editing 2023-11-06 13:01:07 +11:00