mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 01:32:06 +10:00
chore: review
This commit is contained in:
@ -201,6 +201,7 @@ export const resendDocument = async ({
|
||||
});
|
||||
|
||||
if (document.documentMeta?.expiryAmount && document.documentMeta?.expiryUnit) {
|
||||
const previousExpiryDate = recipient.expired;
|
||||
const newExpiryDate = calculateRecipientExpiry(
|
||||
document.documentMeta.expiryAmount,
|
||||
document.documentMeta.expiryUnit,
|
||||
@ -215,6 +216,21 @@ export const resendDocument = async ({
|
||||
expired: newExpiryDate,
|
||||
},
|
||||
});
|
||||
|
||||
await tx.documentAuditLog.create({
|
||||
data: createDocumentAuditLogData({
|
||||
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RECIPIENT_EXPIRY_EXTENDED,
|
||||
documentId: document.id,
|
||||
metadata: requestMetadata,
|
||||
data: {
|
||||
recipientId: recipient.id,
|
||||
recipientName: recipient.name,
|
||||
recipientEmail: recipient.email,
|
||||
previousExpiryDate,
|
||||
newExpiryDate,
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
await tx.documentAuditLog.create({
|
||||
|
||||
Reference in New Issue
Block a user