mirror of
https://github.com/documenso/documenso.git
synced 2026-07-22 16:03:39 +10:00
fix: make ai features more discoverable (#2305)
Previously you had to have explicit knowledge of the feature and enable it in order to use AI assisted field detection. This surfaces it by having a secondary dialog prompting for enablement. Also includes a fix for CC recipients not getting marked as signed in weird edge cases.
This commit is contained in:
@@ -92,9 +92,23 @@ export const run = async ({
|
||||
teamId: envelope.teamId,
|
||||
});
|
||||
|
||||
// Ensure all CC recipients are marked as signed
|
||||
await prisma.recipient.updateMany({
|
||||
where: {
|
||||
envelopeId: envelope.id,
|
||||
role: RecipientRole.CC,
|
||||
},
|
||||
data: {
|
||||
signingStatus: SigningStatus.SIGNED,
|
||||
},
|
||||
});
|
||||
|
||||
const isComplete =
|
||||
envelope.recipients.some((recipient) => recipient.signingStatus === SigningStatus.REJECTED) ||
|
||||
envelope.recipients.every((recipient) => recipient.signingStatus === SigningStatus.SIGNED);
|
||||
envelope.recipients.every(
|
||||
(recipient) =>
|
||||
recipient.signingStatus === SigningStatus.SIGNED || recipient.role === RecipientRole.CC,
|
||||
);
|
||||
|
||||
if (!isComplete) {
|
||||
throw new AppError(AppErrorCode.UNKNOWN_ERROR, {
|
||||
|
||||
Reference in New Issue
Block a user