Commit Graph

63 Commits

Author SHA1 Message Date
Catalin Pit
17370749b4 feat: add folders (#1711) 2025-05-02 02:46:59 +10:00
David Nguyen
435b3ca4f8 chore: remove legacy document update route (#1751)
Remove deprecated route
2025-04-17 16:36:10 +10:00
David Nguyen
063fd32f18 feat: add signature configurations (#1710)
Add ability to enable or disable allowed signature types:
- Drawn
- Typed
- Uploaded

**Tabbed style signature dialog**

![image](https://github.com/user-attachments/assets/a816fab6-b071-42a5-bb5c-6d4a2572431e)

**Document settings**

![image](https://github.com/user-attachments/assets/f0c1bff1-6be1-4c87-b384-1666fa25d7a6)

**Team preferences**

![image](https://github.com/user-attachments/assets/8767b05e-1463-4087-8672-f3f43d8b0f2c)

- Add multiselect to select allowed signatures in document and templates
settings tab
- Add multiselect to select allowed signatures in teams preferences
- Removed "Enable typed signatures" from document/template edit page
- Refactored signature pad to use tabs instead of an all in one
signature pad

Added E2E tests to check settings are applied correctly for documents
and templates
2025-03-24 17:13:11 +11:00
Lucas Smith
f1525991dc feat: dictate next signer (#1719)
Adds next recipient dictation functionality to document signing flow,
allowing assistants and signers to update the next recipient's
information during the signing process.

## Related Issue

N/A

## Changes Made

- Added form handling for next recipient dictation in signing dialogs
- Implemented UI for updating next recipient information
- Added e2e tests covering dictation scenarios:
  - Regular signing with dictation enabled
  - Assistant role with dictation
  - Parallel signing flow
  - Disabled dictation state

## Testing Performed

- Added comprehensive e2e tests covering:
  - Sequential signing with dictation
  - Assistant role dictation
  - Parallel signing without dictation
  - Form validation and state management
- Tested on Chrome and Firefox
- Verified recipient state updates in database
2025-03-21 13:27:04 +11:00
Lucas Smith
63a4bab0fe feat: better document rejection (#1702)
Improves the existing document rejection process by actually marking a
document as completed cancelling further actions.

## Related Issue

N/A

## Changes Made

- Added a new rejection status for documents
- Updated a million areas that check for document completion
- Updated email sending, so rejection is confirmed for the rejecting
recipient while other recipients are notified that the document is now
cancelled.

## Testing Performed

- Ran the testing suite to ensure there are no regressions.
- Performed manual testing of current core flows.
2025-03-13 15:08:57 +11:00
David Nguyen
596d30e2e5 fix: remove lazy pdf loader 2025-02-26 21:48:06 +11:00
David Nguyen
383b5f78f0 feat: migrate nextjs to rr7 2025-02-13 14:10:38 +11:00
David Nguyen
74bb230247 fix: add empty success responses (#1600) 2025-01-20 19:47:39 +11:00
David Nguyen
0d3864548c fix: bump trpc and openapi packages (#1591) 2025-01-19 22:07:02 +11:00
David Nguyen
9e03747e43 feat: add create document beta endpoint (#1584) 2025-01-16 13:36:00 +11:00
David Nguyen
901be70f97 feat: add consistent response schemas (#1582) 2025-01-14 00:43:35 +11:00
David Nguyen
ebbe922982 feat: add template and field endpoints (#1572) 2025-01-11 15:33:20 +11:00
Catalin Pit
22fd1b5be1 fix: default to user timezone (#1559)
Passes the timezone of the user uploading the document/template via the
UI to the server.

If the user uploads a document/template via the API and doesn't set a
timezone, it defaults to `Etc/UTC`.
2024-12-31 10:27:24 +11:00
Mythie
390a317bd3 fix: normalize pdf on the server 2024-12-18 08:14:14 +11:00
David Nguyen
b4a7f1887d feat: add trpc openapi (#1535) 2024-12-14 01:23:35 +09:00
David Nguyen
5df1a6602e fix: refactor search routes (#1529)
Refactor find endpoints to be consistent in terms of input and output.
2024-12-11 19:39:50 +09:00
David Nguyen
fae9c0ca24 fix: refactor routers (#1523) 2024-12-10 16:11:20 +09:00
David Nguyen
904948e2bc fix: refactor trpc errors (#1511) 2024-12-06 16:01:24 +09:00
David Nguyen
f6bcf921d5 feat: add document distribution setting (#1437)
Add a document distribution setting which will allow us to further
configure how recipients currently receive documents.
2024-11-08 13:32:13 +09:00
David Nguyen
4fa6dc1e21 feat: add template page (#1395)
Add a template page view to allow users to see more details about a
template at a glance.
2024-11-05 17:36:30 +09:00
Lucas Smith
4dd95016b1 feat: i18n for emails (#1442)
## Description

Support setting a document language that will control the language used
for sending emails to recipients. Additional work has been done to
convert all emails to using our i18n implementation so we can later add
controls for sending other kinds of emails in a users target language.

## Related Issue

N/A

## Changes Made

- Added `<Trans>` and `msg` macros to emails
- Introduced a new `renderEmailWithI18N` utility in the lib package
- Updated all emails to use the `<Tailwind>` component at the top level
due to rendering constraints
- Updated the `i18n.server.tsx` file to not use a top level await

## Testing Performed

- Configured document language and verified emails were sent in the
expected language
- Created a document from a template and verified that the templates
language was transferred to the document
2024-11-05 11:52:54 +11:00
Catalin Pit
1a9dcadba5 feat: add typed signature (#1357)
Add the ability to insert typed signatures.

Once the signature field is placed on the document, a checkbox appears
in the document editor where the document owner can allow signers to add
typed signatures. Typed signatures are disabled by default.

![CleanShot 2024-09-30 at 14 57
54](https://github.com/user-attachments/assets/c388abb5-bcb1-49d0-aad8-9148c3020420)
2024-10-18 14:25:19 +11:00
Ephraim Duncan
3d644db286 feat: signing order (#1290)
Adds the ability to specify an optional signing order for documents.
When specified a document will be considered sequential with recipients
only being allowed to sign in the order that they were specified in.
2024-09-16 22:36:45 +10:00
Catalin Pit
29910ab2a7 feat: add initials field type (#1279)
Adds a new field type that enables document recipients to add
their `initials` on the document.
2024-08-12 23:29:32 +10:00
Catalin Pit
0244f021ab fix: download audit log certificate (#1268)
Previously, it wasn't possible to download an audit log of a document
uploaded by another user because the function used the ID of the user
making the request to retrieve the document. However, the document
uploaded by another user has that user's ID, not the ID of the user
making the request.
2024-08-09 12:19:48 +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
David Nguyen
e4cf9c8251 fix: add server logic 2024-04-24 19:51:18 +07:00
Catalin Pit
c8a09099a3 fix: mask recipient token (#1051)
The searchDocuments function is used for the shortcuts commands, afaik.
The function returns the documents that match the user query (if any),
alongside all their recipients.

The reason for that is so it can build the path for the document. E.g.
if you're the document owner, the document path will be
`..../documents/{id}`. But if you're a signer for example, the document
path (link) will be `..../sign/{token}`.

So instead of doing that on the frontend, I moved it to the backend.

At least that's what I understood. If I'm wrong, please correct me.

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

## Summary by CodeRabbit

- **New Features**
- Enhanced the `CommandMenu` component to simplify search result
generation and improve document link management based on user roles.
- **Refactor**
- Updated document search logic to include recipient token masking and
refined document mapping.
- **Style**
	- Minor formatting improvement in document routing code.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-15 14:29:56 +07:00
Mythie
110f9bae12 feat: add certificate and audit log pdfs 2024-04-10 15:13:18 +07:00
David Nguyen
b436331d7d fix: improve error log coverage 2024-03-30 14:00:34 +08: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
David Nguyen
34825aaf3a feat: add separate document audit page 2024-02-22 19:14:01 +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
3a32bc62c5 feat: initial document audit logs implementation (#922)
Added initial implementation of document audit logs.
2024-02-12 12:04:53 +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
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
David Nguyen
6be119ac95 fix: improve document meta logic 2024-01-03 20:10:50 +11:00
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