ztechno_core 0.0.108 → 0.0.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,7 @@
1
1
  export type Coordinates = [number, number];
2
2
  export type CompanyInfo = {
3
- baseUrl: string;
4
- website: string;
5
3
  company: string;
4
+ companyShort: string;
6
5
  copyright: string;
7
6
  kvk: string;
8
7
  kvkUrl: string;
@@ -38,6 +37,7 @@ export type RenderContext = {
38
37
  projectsHtml: string;
39
38
  };
40
39
  export type RenderData = {
40
+ baseUrl: string;
41
41
  company: CompanyInfo;
42
42
  address: Address;
43
43
  contact: ContactInfo;
@@ -22,7 +22,7 @@ class InvoiceService {
22
22
  return this.opt.siteConfig;
23
23
  }
24
24
  get baseUrl() {
25
- return this.opt.siteConfig.company.website;
25
+ return this.opt.siteConfig.baseUrl;
26
26
  }
27
27
  constructor(opt) {
28
28
  this.opt = opt;
@@ -834,18 +834,18 @@ class InvoiceService {
834
834
  const subject = isReceipt ? `Betalingsbevestiging ${invoice.invoice_number}` : `Factuur ${invoice.invoice_number}`;
835
835
  const title = isReceipt ? `Betaling ontvangen ${invoice.invoice_number}` : `Factuur ${invoice.invoice_number}`;
836
836
  const content = isReceipt
837
- ? `<br>Beste ${customer.name},<br><br>We hebben uw betaling ontvangen. De factuur vindt u in de bijlage.<br><br>Dank u wel, ${cfg.company.website}<br>`
838
- : `<br>Beste ${customer.name},<br><br>U vindt uw factuur in de bijlage.<br><br><a href="${pay?.payUrl}" style="display:inline-block;padding:10px 16px;background:#0d6efd;color:#fff;text-decoration:none;border-radius:6px;">Betaal nu</a><br><br>Dank u wel, ${cfg.company.website}<br>`;
837
+ ? `<br>Beste ${customer.name},<br><br>We hebben uw betaling ontvangen. De factuur vindt u in de bijlage.<br><br>Dank u wel, ${cfg.company.companyShort}<br>`
838
+ : `<br>Beste ${customer.name},<br><br>U vindt uw factuur in de bijlage.<br><br><a href="${pay?.payUrl}" style="display:inline-block;padding:10px 16px;background:#0d6efd;color:#fff;text-decoration:none;border-radius:6px;">Betaal nu</a><br><br>Dank u wel, ${cfg.company.companyShort}<br>`;
839
839
  await this.mailService.sendAdvanced({
840
- from: `${cfg.company.website} <${cfg.contact.contact}>`,
840
+ from: `${cfg.company.company} <${cfg.contact.contact}>`,
841
841
  recipient: to,
842
842
  subject,
843
843
  template: 'template.html',
844
844
  inject: {
845
845
  title,
846
846
  content,
847
- logoSrc: `${cfg.company.website}/img/logo-small.png`,
848
- baseUrl: cfg.company.website,
847
+ logoSrc: `${cfg.baseUrl}/img/logo-small.png`,
848
+ baseUrl: cfg.baseUrl,
849
849
  },
850
850
  attachments: [
851
851
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztechno_core",
3
- "version": "0.0.108",
3
+ "version": "0.0.109",
4
4
  "description": "Core files for ztechno framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",