@provis/provis-common-be-module 2.6.67 → 2.6.69
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.
|
@@ -475,5 +475,17 @@ const occupation = [
|
|
|
475
475
|
'construction-3',
|
|
476
476
|
],
|
|
477
477
|
},
|
|
478
|
+
{
|
|
479
|
+
code: '2601',
|
|
480
|
+
desc: {
|
|
481
|
+
id: '',
|
|
482
|
+
en: 'Sawmills, panglong (sawmills with manual manufacture only)',
|
|
483
|
+
},
|
|
484
|
+
construction: [
|
|
485
|
+
'construction-1',
|
|
486
|
+
'construction-2',
|
|
487
|
+
'construction-3',
|
|
488
|
+
],
|
|
489
|
+
},
|
|
478
490
|
];
|
|
479
491
|
exports.default = occupation;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @param filePath - Absolute or relative path to the email.json file
|
|
6
6
|
*/
|
|
7
|
-
export declare const initEmailTemplates: (filePath: string) =>
|
|
7
|
+
export declare const initEmailTemplates: (filePath: string) => any;
|
|
8
8
|
/**
|
|
9
9
|
* Get email content by slug.
|
|
10
10
|
* Must call initEmailTemplates() once before using this.
|
|
@@ -12,7 +12,7 @@ export declare const initEmailTemplates: (filePath: string) => void;
|
|
|
12
12
|
* @param slug - The template slug identifier
|
|
13
13
|
* @returns Object containing the matched template data, header, and footer
|
|
14
14
|
*/
|
|
15
|
-
declare const getEmailContent: (slug: string) => {
|
|
15
|
+
declare const getEmailContent: (slug: string, templates: any) => {
|
|
16
16
|
data: any;
|
|
17
17
|
header: string;
|
|
18
18
|
footer: string;
|
|
@@ -4,7 +4,6 @@ exports.initEmailTemplates = void 0;
|
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const email_1 = require("../constants/email");
|
|
7
|
-
let templates = [];
|
|
8
7
|
/**
|
|
9
8
|
* Initialize email templates by providing the path to your project's email.json file.
|
|
10
9
|
* Call this once during app startup.
|
|
@@ -14,7 +13,7 @@ let templates = [];
|
|
|
14
13
|
const initEmailTemplates = (filePath) => {
|
|
15
14
|
const resolvedPath = path.resolve(filePath);
|
|
16
15
|
const data = JSON.parse(fs.readFileSync(resolvedPath, 'utf8'));
|
|
17
|
-
|
|
16
|
+
return data.templates;
|
|
18
17
|
};
|
|
19
18
|
exports.initEmailTemplates = initEmailTemplates;
|
|
20
19
|
/**
|
|
@@ -24,7 +23,7 @@ exports.initEmailTemplates = initEmailTemplates;
|
|
|
24
23
|
* @param slug - The template slug identifier
|
|
25
24
|
* @returns Object containing the matched template data, header, and footer
|
|
26
25
|
*/
|
|
27
|
-
const getEmailContent = (slug) => {
|
|
26
|
+
const getEmailContent = (slug, templates) => {
|
|
28
27
|
if (!templates.length) {
|
|
29
28
|
throw new Error('Email templates not initialized. Call initEmailTemplates(filePath) first.');
|
|
30
29
|
}
|