mirror of
https://github.com/documenso/documenso.git
synced 2026-07-25 17:35:05 +10:00
feat: initial tags
This commit is contained in:
@@ -8,6 +8,7 @@ import { DEFAULT_DOCUMENT_EMAIL_SETTINGS } from '../types/document-email';
|
||||
import { SignatureLevel } from '../types/signature-level';
|
||||
import { mapSecondaryIdToDocumentId } from './envelope';
|
||||
import { mapRecipientToLegacyRecipient } from './recipients';
|
||||
import { type EnvelopeTagWithTag, mapEnvelopeTagsToTags } from './tags';
|
||||
|
||||
export const isDocumentCompleted = (document: Pick<Envelope, 'status'> | DocumentStatus) => {
|
||||
const status = typeof document === 'string' ? document : document.status;
|
||||
@@ -109,6 +110,7 @@ type MapEnvelopeToDocumentManyOptions = Envelope & {
|
||||
user: Pick<User, 'id' | 'name' | 'email'>;
|
||||
team: Pick<Team, 'id' | 'url'>;
|
||||
recipients: Recipient[];
|
||||
tags?: EnvelopeTagWithTag<TDocumentMany['tags'][number]>[];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -150,5 +152,6 @@ export const mapEnvelopesToDocumentMany = (envelope: MapEnvelopeToDocumentManyOp
|
||||
url: envelope.team.url,
|
||||
},
|
||||
recipients: envelope.recipients.map((recipient) => mapRecipientToLegacyRecipient(recipient, envelope)),
|
||||
tags: mapEnvelopeTagsToTags(envelope.tags),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user