mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
fix: recipients with CC role not being editable (#918)
## Description Fixed issue where setting a recipient role as CC will prevent any further changes as it is considered as "sent" and "signed". ## Other changes - Prevent editing document after completed - Removed CC and Viewers from the field recipient list since they will never be filled - Minor UI issues ## 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 followed the project's coding style guidelines.
This commit is contained in:
@ -46,6 +46,10 @@ export const setFieldsForDocument = async ({
|
||||
throw new Error('Document not found');
|
||||
}
|
||||
|
||||
if (document.completedAt) {
|
||||
throw new Error('Document already complete');
|
||||
}
|
||||
|
||||
const existingFields = await prisma.field.findMany({
|
||||
where: {
|
||||
documentId,
|
||||
|
||||
Reference in New Issue
Block a user