mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +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 { PUBLIC_PAYMENT_LINK } from './constants';
|
||||
|
||||
export class GeneratePaymentLinkTransformer extends Transformer {
|
||||
/**
|
||||
@@ -18,11 +19,10 @@ export class GeneratePaymentLinkTransformer extends Transformer {
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param link
|
||||
* @returns
|
||||
* Retrieves the public/private payment linl
|
||||
* @returns {string}
|
||||
*/
|
||||
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 =
|
||||
'Invoice {InvoiceNumber} from {CompanyName}';
|
||||
export const DEFAULT_INVOICE_MAIL_CONTENT = `
|
||||
@@ -30,6 +32,8 @@ Amount : <strong>{InvoiceAmount}</strong></p>
|
||||
</p>
|
||||
`;
|
||||
|
||||
export const PUBLIC_PAYMENT_LINK = `${config.baseURL}/payment/{PAYMENT_LINK_ID}`;
|
||||
|
||||
export const ERRORS = {
|
||||
INVOICE_NUMBER_NOT_UNIQUE: 'INVOICE_NUMBER_NOT_UNIQUE',
|
||||
SALE_INVOICE_NOT_FOUND: 'SALE_INVOICE_NOT_FOUND',
|
||||
|
||||
Reference in New Issue
Block a user