From 7fad968ad2f3497946c7720e919b077eb047415e Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Fri, 5 Apr 2024 13:24:38 -0400 Subject: [PATCH] - Cleanups Signed-off-by: Dave Richer --- client/.env.development.imex | 1 + client/src/App/App.jsx | 30 +- server/email/generateTemplate.js | 2738 +----------------------------- server/email/html.js | 2614 ++++++++++++++++++++++++++++ 4 files changed, 2718 insertions(+), 2665 deletions(-) create mode 100644 server/email/html.js diff --git a/client/.env.development.imex b/client/.env.development.imex index b5e6e8f53..1233b5c63 100644 --- a/client/.env.development.imex +++ b/client/.env.development.imex @@ -12,3 +12,4 @@ VITE_APP_AXIOS_BASE_API_URL=http://localhost:4000 VITE_APP_REPORTS_SERVER_URL=https://reports3.test.imex.online VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc VITE_APP_INSTANCE=IMEX +VITE_APP_PRODUCT_FRUITS_DISABLED=true diff --git a/client/src/App/App.jsx b/client/src/App/App.jsx index 50bde585a..56a3e5f19 100644 --- a/client/src/App/App.jsx +++ b/client/src/App/App.jsx @@ -147,19 +147,23 @@ export function App({ bodyshop, checkUserSession, currentUser, online, setOnline /> } > - + { + import.meta.env.PRODUCT_FRUITS_DISABLED !== 'true' && ( + + ) + } { + return RenderInstanceManager({ + imex: 'ImEX Online Collision Repair Management System', + rome: 'Rome Technologies', + promanager: 'ProManager', + }); +}; -// TODO use InstanceDynamicManager on the footer default to prevent the word IMEX from being hardcoded +const now = () => moment().format('MM/DD/YYYY @ hh:mm a'); const generateEmailTemplate = (strings) => { - let now = () => moment().format('MM/DD/YYYY @ hh:mm a'); - return ` - - - - - - - - - - - -
-
- - -
 
- - - -
- - -
${strings.header}

${strings.subHeader}

+` + + header + + start + + ` + + + + + + +
+ + + + + + + + + +
+
${strings.header}
+
+

${strings.subHeader}

+
+
- - -
- -
${strings.body}
+ + + + + + +
+ + + + + + +
${strings.body}
+
- - - - - - - - -
 
-
-
- -` -} + + + + + + + + +` + + end +}; module.exports = generateEmailTemplate; diff --git a/server/email/html.js b/server/email/html.js new file mode 100644 index 000000000..ec96c6ff9 --- /dev/null +++ b/server/email/html.js @@ -0,0 +1,2614 @@ +const header = ` + + + + + + +`; +const start = `
 
`; +const end = `
 
`; + +module.exports = { + header, + start, + end +};