fix: company logo does not show up in mail receipt preview

This commit is contained in:
Ahmed Bouhuolia
2024-11-03 20:22:59 +02:00
parent ba1d9b3f28
commit 6ba54a994a
16 changed files with 67 additions and 31 deletions

View File

@@ -1,6 +1,9 @@
import { getUploadedObjectUri } from '@/services/Attachments/utils';
import TenantModel from 'models/TenantModel';
export class PdfTemplate extends TenantModel {
public readonly attributes: Record<string, any>;
/**
* Table name.
*/
@@ -47,7 +50,17 @@ export class PdfTemplate extends TenantModel {
* Virtual attributes.
*/
static get virtualAttributes() {
return [];
return ['companyLogoUri'];
}
/**
* Retrieves the company logo uri.
* @returns {string}
*/
get companyLogoUri() {
return this.attributes.companyLogoKey
? getUploadedObjectUri(this.attributes.companyLogoKey)
: '';
}
/**