From b8382aa970eba64580a4a616fecb54e7f958f332 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 12 Apr 2021 13:48:00 -0700 Subject: [PATCH] IO-869 Report Email Subject Lines issue --- bodyshop_translations.babel | 21 +++++++++++++++++++ .../email-overlay/email-overlay.container.jsx | 13 +++++++++--- .../report-center-modal.component.jsx | 1 + client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 6 files changed, 35 insertions(+), 3 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index c14b01a12..7f2407375 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -10761,6 +10761,27 @@ + + generatingemail + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + preview false diff --git a/client/src/components/email-overlay/email-overlay.container.jsx b/client/src/components/email-overlay/email-overlay.container.jsx index 4e28b7738..48bb33ce6 100644 --- a/client/src/components/email-overlay/email-overlay.container.jsx +++ b/client/src/components/email-overlay/email-overlay.container.jsx @@ -1,4 +1,4 @@ -import { Form, Modal, notification } from "antd"; +import { Divider, Form, Modal, notification } from "antd"; import axios from "axios"; import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -18,6 +18,7 @@ import RenderTemplate from "../../utils/RenderTemplate"; import { EmailSettings } from "../../utils/TemplateConstants"; import LoadingSpinner from "../loading-spinner/loading-spinner.component"; import EmailOverlayComponent from "./email-overlay.component"; +import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component"; const mapStateToProps = createStructuredSelector({ modalVisible: selectEmailVisible, @@ -123,8 +124,14 @@ export function EmailOverlayContainer({ okButtonProps={{ loading: sending }} >
- {loading && } - + {loading && ( +
+ + {t("emails.labels.preview")} + +
+ )} + {!loading && } ); diff --git a/client/src/components/report-center-modal/report-center-modal.component.jsx b/client/src/components/report-center-modal/report-center-modal.component.jsx index 652b86aa7..ed819306d 100644 --- a/client/src/components/report-center-modal/report-center-modal.component.jsx +++ b/client/src/components/report-center-modal/report-center-modal.component.jsx @@ -71,6 +71,7 @@ export function ReportCenterModalComponent({ reportCenterModal }) { }, { to: values.to, + subject: Templates[values.key]?.subject, }, values.email ? "e" : "p" ); diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 6a3d95cc6..e064608fc 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -693,6 +693,7 @@ }, "labels": { "attachments": "Attachments", + "generatingemail": "Generating email...", "preview": "Email Preview" }, "successes": { diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index ac07d094c..c49ae2e85 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -693,6 +693,7 @@ }, "labels": { "attachments": "", + "generatingemail": "", "preview": "" }, "successes": { diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 186219ea4..fe9ed7c78 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -693,6 +693,7 @@ }, "labels": { "attachments": "", + "generatingemail": "", "preview": "" }, "successes": {