mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
fix: make the base url of payment link configurable
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { Transformer } from '@/lib/Transformer/Transformer';
|
import { Transformer } from '@/lib/Transformer/Transformer';
|
||||||
|
import { PUBLIC_PAYMENT_LINK } from './constants';
|
||||||
|
|
||||||
export class GeneratePaymentLinkTransformer extends Transformer {
|
export class GeneratePaymentLinkTransformer extends Transformer {
|
||||||
/**
|
/**
|
||||||
@@ -18,11 +19,10 @@ export class GeneratePaymentLinkTransformer extends Transformer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Retrieves the public/private payment linl
|
||||||
* @param link
|
* @returns {string}
|
||||||
* @returns
|
|
||||||
*/
|
*/
|
||||||
public link(link) {
|
public link(link) {
|
||||||
return `http://localhost:3000/payment/${link.linkId}`;
|
return PUBLIC_PAYMENT_LINK?.replace('{PAYMENT_LINK_ID}', link.linkId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import config from '@/config';
|
||||||
|
|
||||||
export const DEFAULT_INVOICE_MAIL_SUBJECT =
|
export const DEFAULT_INVOICE_MAIL_SUBJECT =
|
||||||
'Invoice {InvoiceNumber} from {CompanyName}';
|
'Invoice {InvoiceNumber} from {CompanyName}';
|
||||||
export const DEFAULT_INVOICE_MAIL_CONTENT = `
|
export const DEFAULT_INVOICE_MAIL_CONTENT = `
|
||||||
@@ -30,6 +32,8 @@ Amount : <strong>{InvoiceAmount}</strong></p>
|
|||||||
</p>
|
</p>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const PUBLIC_PAYMENT_LINK = `${config.baseURL}/payment/{PAYMENT_LINK_ID}`;
|
||||||
|
|
||||||
export const ERRORS = {
|
export const ERRORS = {
|
||||||
INVOICE_NUMBER_NOT_UNIQUE: 'INVOICE_NUMBER_NOT_UNIQUE',
|
INVOICE_NUMBER_NOT_UNIQUE: 'INVOICE_NUMBER_NOT_UNIQUE',
|
||||||
SALE_INVOICE_NOT_FOUND: 'SALE_INVOICE_NOT_FOUND',
|
SALE_INVOICE_NOT_FOUND: 'SALE_INVOICE_NOT_FOUND',
|
||||||
|
|||||||
Reference in New Issue
Block a user