feat: Pdf templates customer/company addresses

This commit is contained in:
Ahmed Bouhuolia
2024-09-29 18:04:56 +02:00
parent d465ee15bd
commit 6b6027a588
16 changed files with 190 additions and 58 deletions

View File

@@ -1,5 +1,6 @@
import { Transformer } from '@/lib/Transformer/Transformer';
import { getTransactionTypeLabel } from '@/utils/transactions-types';
import { getUploadedObjectUri } from '../Attachments/utils';
export class GetPdfTemplateTransformer extends Transformer {
/**
@@ -56,7 +57,7 @@ class GetPdfTemplateAttributesTransformer extends Transformer {
*/
protected companyLogoUri(template) {
return template.companyLogoKey
? `https://bigcapital.sfo3.digitaloceanspaces.com/${template.companyLogoKey}`
? getUploadedObjectUri(template.companyLogoKey)
: '';
}
}