refactor: use getRecipientSigningOrder for signingOrder in envelope and recipient functions

This commit is contained in:
Catalin Pit
2026-06-04 14:51:57 +03:00
parent 48a107685a
commit 8b87ed4afd
8 changed files with 22 additions and 13 deletions
@@ -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,
};
}),