+
+ setVariables(e)} />
+
diff --git a/client/src/components/shop-templates-list/shop-templates-list.container.jsx b/client/src/components/shop-templates-list/shop-templates-list.container.jsx
index d435fed47..8122fcf2d 100644
--- a/client/src/components/shop-templates-list/shop-templates-list.container.jsx
+++ b/client/src/components/shop-templates-list/shop-templates-list.container.jsx
@@ -62,9 +62,9 @@ export default function ShopTemplatesListContainer({ visibleState }) {
>
-
{TemplateList[item.name].title}
-
{TemplateList[item.name].description}
-
{TemplateList[item.name].drivingid}
+
{TemplateList()[item.name].title}
+
{TemplateList()[item.name].description}
+
{TemplateList()[item.name].drivingid}
diff --git a/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx b/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx
index f6c17a43b..d9a39caa8 100644
--- a/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx
+++ b/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx
@@ -70,7 +70,7 @@ export function TimeTicketsSummaryEmployees({
const handlePrintEmployeeTicket = async (empId) => {
const html = await RenderTemplate(
{
- name: TemplateList.time_tickets_by_employee.key,
+ name: TemplateList().time_tickets_by_employee.key,
variables: { id: empId, start: startDate, end: endDate },
},
bodyshop
diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js
index a902ce478..f9a6b66eb 100644
--- a/client/src/utils/TemplateConstants.js
+++ b/client/src/utils/TemplateConstants.js
@@ -1,71 +1,83 @@
+import i18n from "i18next";
+
export const EmailSettings = {
fromNameDefault: "ImEX Online",
fromAddress: "noreply@imex.online",
};
-export const TemplateList = {
- //Verified Completed items
- estimate_detail: {
- title: "Estimate Detail",
- description: "Est Detail",
- drivingId: "job",
- key: "estimate_detail",
- },
- //Non Completed Items
- appointment_reminder: {
- title: "Appointment Reminder",
- description: "Sent to a customer as a reminder of an upcoming appointment.",
- drivingId: "appointment",
- key: "appointment_reminder",
- },
- appointment_confirmation: {
- title: "Appointment Confirmation",
- description:
- "Sent to a customer as a Confirmation of an upcoming appointment.",
- drivingId: "appointment",
- key: "appointment_confirmation",
- },
- parts_order_confirmation: {
- title: "Parts Order Confirmation",
- description: "Parts order template including part details",
- drivingId: "partsorder",
- key: "parts_order_confirmation",
- },
+export const TemplateList = (type, object) => {
+ return {
+ //Verified Completed items
+ estimate_detail: {
+ title: i18n.t("printcenter.jobs.estimate_detail"),
+ description: "Est Detail",
+ drivingId: "job",
+ key: "estimate_detail",
+ },
+ all_job_notes: {
+ title: i18n.t("printcenter.jobs.all_job_notes"),
+ description: "All jobs Notes including Private",
+ drivingId: "job",
+ key: "all_job_notes",
+ },
- cover_sheet_landscape: {
- title: "Cover Sheet - Landscape",
- description: "Cover sheet landscape",
- drivingId: "job",
- key: "cover_sheet_landscape",
- },
- cover_sheet_portrait: {
- title: "Cover Sheet - portrait",
- description: "Cover sheet portrait",
- drivingId: "job",
- key: "cover_sheet_portrait",
- },
- parts_return_confirmation: {
- title: "Parts Return Confirmation",
- description: "Parts Return template including part details",
- drivingId: "partsorder",
- key: "parts_return_confirmation",
- },
- csi_invitation: {
- title: "Customer Survey Invitation",
- description: "Customer Survey Invitation",
- drivingId: "csi",
- key: "csi_invitation",
- },
- payment_receipt: {
- title: "Payment Receipt",
- description: "Receipt of payment for customer",
- drivingId: "payment",
- key: "payment_receipt",
- },
- time_tickets_by_employee: {
- title: "Time Tickets by Employee",
- description: "Time tickets for employee with date range",
- drivingId: "employee",
- key: "time_tickets_by_employee",
- },
+ //Non Completed Items
+ appointment_reminder: {
+ title: "Appointment Reminder",
+ description:
+ "Sent to a customer as a reminder of an upcoming appointment.",
+ drivingId: "appointment",
+ key: "appointment_reminder",
+ },
+ appointment_confirmation: {
+ title: "Appointment Confirmation",
+ description:
+ "Sent to a customer as a Confirmation of an upcoming appointment.",
+ drivingId: "appointment",
+ key: "appointment_confirmation",
+ },
+ parts_order_confirmation: {
+ title: "Parts Order Confirmation",
+ description: "Parts order template including part details",
+ drivingId: "partsorder",
+ key: "parts_order_confirmation",
+ },
+
+ cover_sheet_landscape: {
+ title: "Cover Sheet - Landscape",
+ description: "Cover sheet landscape",
+ drivingId: "job",
+ key: "cover_sheet_landscape",
+ },
+ cover_sheet_portrait: {
+ title: "Cover Sheet - portrait",
+ description: "Cover sheet portrait",
+ drivingId: "job",
+ key: "cover_sheet_portrait",
+ },
+ parts_return_confirmation: {
+ title: "Parts Return Confirmation",
+ description: "Parts Return template including part details",
+ drivingId: "partsorder",
+ key: "parts_return_confirmation",
+ },
+ csi_invitation: {
+ title: "Customer Survey Invitation",
+ description: "Customer Survey Invitation",
+ drivingId: "csi",
+ key: "csi_invitation",
+ },
+ payment_receipt: {
+ title: "Payment Receipt",
+ description: "Receipt of payment for customer",
+ drivingId: "payment",
+ key: "payment_receipt",
+ },
+ time_tickets_by_employee: {
+ title: "Time Tickets by Employee",
+ description: "Time tickets for employee with date range",
+ drivingId: "employee",
+ key: "time_tickets_by_employee",
+ },
+ };
};
diff --git a/client/templates/helpers.md b/client/templates/helpers.md
index e69de29bb..1464c021b 100644
--- a/client/templates/helpers.md
+++ b/client/templates/helpers.md
@@ -0,0 +1,3 @@
+Table Styles
+
+
diff --git a/server/render/renderHandlebars.js b/server/render/renderHandlebars.js
index 65d0b8f8b..241cc1fdd 100644
--- a/server/render/renderHandlebars.js
+++ b/server/render/renderHandlebars.js
@@ -202,6 +202,7 @@ exports.render = (req, res) => {
//console.log("[HJS Render] Context", req.body.context);
if (req.body.context.bodyshop.template_header) {
console.log("[HJS Render] Including Header");
+ //view = req.body.view;
view = `${req.body.context.bodyshop.template_header}${req.body.view}`;
} else {
console.log("[HJS Render] No header to include.");