fix: typo in invoice customize drawer

This commit is contained in:
Ahmed Bouhuolia
2024-09-17 19:18:22 +02:00
parent 5f40d50852
commit 34e781b4a2
5 changed files with 14 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
export const SALE_INVOICE_CREATED = 'Sale invoice created'; export const SALE_INVOICE_CREATED = 'Sale invoice created';
export const SALE_INVOICE_EDITED = 'Sale invoice d'; export const SALE_INVOICE_EDITED = 'Sale invoice edited';
export const SALE_INVOICE_DELETED = 'Sale invoice deleted'; export const SALE_INVOICE_DELETED = 'Sale invoice deleted';
export const SALE_INVOICE_MAIL_DELIVERED = 'Sale invoice mail delivered'; export const SALE_INVOICE_MAIL_DELIVERED = 'Sale invoice mail delivered';

View File

@@ -43,9 +43,10 @@ export class SaleEstimatesPdf {
} }
/** /**
* * Retrieves the given estimate branding attributes.
* @param {number} tenantId * @param {number} tenantId - Tenant id.
* @param {number} estimateId * @param {number} estimateId - Estimate id.
* @returns {Promise<EstimatePdfBrandingAttributes>}
*/ */
async getEstimateBrandingAttributes( async getEstimateBrandingAttributes(
tenantId: number, tenantId: number,

View File

@@ -5,6 +5,7 @@ import { GetSaleReceipt } from './GetSaleReceipt';
import HasTenancyService from '@/services/Tenancy/TenancyService'; import HasTenancyService from '@/services/Tenancy/TenancyService';
import { SaleReceiptBrandingTemplate } from './SaleReceiptBrandingTemplate'; import { SaleReceiptBrandingTemplate } from './SaleReceiptBrandingTemplate';
import { transformReceiptToBrandingTemplateAttributes } from './utils'; import { transformReceiptToBrandingTemplateAttributes } from './utils';
import { ISaleReceiptBrandingTemplateAttributes } from '@/interfaces';
@Service() @Service()
export class SaleReceiptsPdf { export class SaleReceiptsPdf {
@@ -34,26 +35,26 @@ export class SaleReceiptsPdf {
tenantId, tenantId,
saleReceiptId saleReceiptId
); );
console.log(brandingAttributes, 'attributes'); // Converts the receipt template to html content.
const htmlContent = await this.templateInjectable.render( const htmlContent = await this.templateInjectable.render(
tenantId, tenantId,
'modules/receipt-regular', 'modules/receipt-regular',
brandingAttributes brandingAttributes
); );
// Renders the html content to pdf document.
return this.chromiumlyTenancy.convertHtmlContent(tenantId, htmlContent); return this.chromiumlyTenancy.convertHtmlContent(tenantId, htmlContent);
} }
/** /**
* Retrieves receipt branding attributes. * Retrieves receipt branding attributes.
* @param {number} tenantId * @param {number} tenantId
* @param {number] receiptId * @param {number} receiptId
* @returns * @returns {Promise<ISaleReceiptBrandingTemplateAttributes>}
*/ */
public async getReceiptBrandingAttributes( public async getReceiptBrandingAttributes(
tenantId: number, tenantId: number,
receiptId: number receiptId: number
) { ): Promise<ISaleReceiptBrandingTemplateAttributes> {
const { PdfTemplate } = this.tenancy.models(tenantId); const { PdfTemplate } = this.tenancy.models(tenantId);
const saleReceipt = await this.getSaleReceiptService.getSaleReceipt( const saleReceipt = await this.getSaleReceiptService.getSaleReceipt(

View File

@@ -32,7 +32,7 @@ function MarkDefaultBrandingTemplateAlert({
.then(() => { .then(() => {
AppToaster.show({ AppToaster.show({
message: message:
'The branding template has been marked as default successfully.', 'The branding template has been marked as a default template.',
intent: Intent.SUCCESS, intent: Intent.SUCCESS,
}); });
closeAlert(name); closeAlert(name);
@@ -60,8 +60,7 @@ function MarkDefaultBrandingTemplateAlert({
onConfirm={handleConfirmDelete} onConfirm={handleConfirmDelete}
> >
<p> <p>
Are you sure want to mark the given branding template as default Are you sure want to mark the given branding template as a default template?
template?
</p> </p>
</Alert> </Alert>
); );

View File

@@ -20,7 +20,7 @@
.th { .th {
padding: 0.68rem 0.5rem; padding: 0.68rem 0.5rem;
background: #f6f7f9; background: #f5f5f5;
font-size: 14px; font-size: 14px;
color: #424853; color: #424853;
font-weight: 400; font-weight: 400;