mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: wip mail receipt preview
This commit is contained in:
@@ -22,6 +22,9 @@ export class GetEstimateMailTemplateAttributesTransformer extends Transformer {
|
||||
'total',
|
||||
'totalLabel',
|
||||
|
||||
'subtotal',
|
||||
'subtotalLabel',
|
||||
|
||||
'dueAmount',
|
||||
'dueAmountLabel',
|
||||
|
||||
@@ -57,7 +60,7 @@ export class GetEstimateMailTemplateAttributesTransformer extends Transformer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Primary color
|
||||
* Primary color.
|
||||
* @returns {string}
|
||||
*/
|
||||
public primaryColor(): string {
|
||||
@@ -69,7 +72,7 @@ export class GetEstimateMailTemplateAttributesTransformer extends Transformer {
|
||||
* @returns {string}
|
||||
*/
|
||||
public estimateNumber(): string {
|
||||
return this.options.estimate.number;
|
||||
return this.options.estimate.estimateNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,7 +80,7 @@ export class GetEstimateMailTemplateAttributesTransformer extends Transformer {
|
||||
* @returns {string}
|
||||
*/
|
||||
public estimateNumberLabel(): string {
|
||||
return 'Estimate Number';
|
||||
return 'Estimate No: {estimateNumber}';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,7 +88,7 @@ export class GetEstimateMailTemplateAttributesTransformer extends Transformer {
|
||||
* @returns {string}
|
||||
*/
|
||||
public expirationDate(): string {
|
||||
return this.options.estimate.expirationDate;
|
||||
return this.options.estimate.formattedExpirationDate;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,14 +96,14 @@ export class GetEstimateMailTemplateAttributesTransformer extends Transformer {
|
||||
* @returns {string}
|
||||
*/
|
||||
public expirationDateLabel(): string {
|
||||
return 'Expiration Date';
|
||||
return 'Expiration Date: {expirationDate}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Estimate total.
|
||||
*/
|
||||
public total(): string {
|
||||
return this.options.estimate.totalFormatted;
|
||||
return this.options.estimate.formattedAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,6 +114,21 @@ export class GetEstimateMailTemplateAttributesTransformer extends Transformer {
|
||||
return 'Total';
|
||||
}
|
||||
|
||||
/**
|
||||
* Estimate subtotal.
|
||||
*/
|
||||
public subtotal(): string {
|
||||
return this.options.estimate.formattedAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Estimate subtotal label.
|
||||
* @returns {string}
|
||||
*/
|
||||
public subtotalLabel(): string {
|
||||
return 'Subtotal';
|
||||
}
|
||||
|
||||
/**
|
||||
* Estimate mail items attributes.
|
||||
*/
|
||||
|
||||
@@ -52,7 +52,7 @@ export class GetSaleEstimateMailStateTransformer extends SaleEstimateTransfromer
|
||||
* @returns {string | null}
|
||||
*/
|
||||
protected companyLogoUri = (invoice) => {
|
||||
return invoice.pdfTemplate?.companyLogoUri;
|
||||
return invoice.pdfTemplate?.companyLogoUri || null;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ export class GetSaleEstimateMailStateTransformer extends SaleEstimateTransfromer
|
||||
* @returns {string}
|
||||
*/
|
||||
protected primaryColor = (invoice) => {
|
||||
return invoice.pdfTemplate?.attributes?.primaryColor;
|
||||
return invoice.pdfTemplate?.attributes?.primaryColor || null;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user