mirror of
https://github.com/documenso/documenso.git
synced 2026-07-25 09:25:08 +10:00
refactor: use getRecipientSigningOrder for signingOrder in envelope and recipient functions
This commit is contained in:
@@ -39,6 +39,7 @@ import {
|
||||
extractDocumentAuthMethods,
|
||||
} from '../../utils/document-auth';
|
||||
import { mapSecondaryIdToTemplateId } from '../../utils/envelope';
|
||||
import { getRecipientSigningOrder } from '../../utils/recipients';
|
||||
import { sendDocument } from '../document/send-document';
|
||||
import { validateFieldAuth } from '../document/validate-field-auth';
|
||||
import { incrementDocumentId } from '../envelope/increment-id';
|
||||
@@ -386,7 +387,7 @@ export const createDocumentFromDirectTemplate = async ({
|
||||
}),
|
||||
sendStatus: recipient.role === RecipientRole.CC ? SendStatus.SENT : SendStatus.NOT_SENT,
|
||||
signingStatus: recipient.role === RecipientRole.CC ? SigningStatus.SIGNED : SigningStatus.NOT_SIGNED,
|
||||
signingOrder: recipient.signingOrder,
|
||||
signingOrder: getRecipientSigningOrder(recipient),
|
||||
token: nanoid(),
|
||||
};
|
||||
}),
|
||||
|
||||
@@ -46,6 +46,7 @@ import {
|
||||
} from '../../utils/document-auth';
|
||||
import type { EnvelopeIdOptions } from '../../utils/envelope';
|
||||
import { mapSecondaryIdToTemplateId } from '../../utils/envelope';
|
||||
import { getRecipientSigningOrder } from '../../utils/recipients';
|
||||
import { buildTeamWhereQuery } from '../../utils/teams';
|
||||
import { getEnvelopeWhereInput } from '../envelope/get-envelope-by-id';
|
||||
import { incrementDocumentId } from '../envelope/increment-id';
|
||||
@@ -575,7 +576,7 @@ export const createDocumentFromTemplate = async ({
|
||||
}),
|
||||
sendStatus: recipient.role === RecipientRole.CC ? SendStatus.SENT : SendStatus.NOT_SENT,
|
||||
signingStatus: recipient.role === RecipientRole.CC ? SigningStatus.SIGNED : SigningStatus.NOT_SIGNED,
|
||||
signingOrder: recipient.signingOrder,
|
||||
signingOrder: getRecipientSigningOrder(recipient),
|
||||
token: recipient.token,
|
||||
};
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user