task-h
This commit is contained in:
@@ -345,15 +345,19 @@ export async function getQuotationDocumentPreviewData(
|
||||
|
||||
export async function prepareApprovedQuotationSnapshot(
|
||||
quotationId: string,
|
||||
organizationId: string
|
||||
organizationId: string,
|
||||
userId: string
|
||||
): Promise<ApprovedQuotationSnapshot> {
|
||||
const preview = await getQuotationDocumentPreviewData(quotationId, organizationId);
|
||||
const generatedAt = new Date().toISOString();
|
||||
|
||||
return {
|
||||
quotationId,
|
||||
approvedAt: preview.documentData.approval.approvedAt,
|
||||
documentData: preview.documentData,
|
||||
templateVersionId: preview.template.version.id,
|
||||
templateInput: preview.templateInput
|
||||
templateInput: preview.templateInput,
|
||||
generatedAt,
|
||||
generatedBy: userId
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user