diff --git a/client/src/components/esignature-custom-document/esignature-custom-document.component.jsx b/client/src/components/esignature-custom-document/esignature-custom-document.component.jsx
index 59d5cab67..6dd279a62 100644
--- a/client/src/components/esignature-custom-document/esignature-custom-document.component.jsx
+++ b/client/src/components/esignature-custom-document/esignature-custom-document.component.jsx
@@ -24,16 +24,28 @@ const mapDispatchToProps = (dispatch) => ({
)
});
-export function EsignatureCustomDocument({ bodyshop, jobId, setEsignatureContext }) {
+export function EsignatureCustomDocument({
+ bodyshop,
+ disabled = false,
+ jobId,
+ setEsignatureContext,
+ showUnavailable = false
+}) {
const [loading, setLoading] = useState(false);
const notification = useNotification();
const { t } = useTranslation();
+ const esignatureEnabled = hasDocumensoApiKey(bodyshop);
+ const isDisabled = disabled || !esignatureEnabled;
- if (!hasDocumensoApiKey(bodyshop)) {
+ if (!esignatureEnabled && !showUnavailable) {
return null;
}
const uploadCustomDocument = async ({ file, onError, onSuccess }) => {
+ if (isDisabled) {
+ return;
+ }
+
const formData = new FormData();
formData.append("document", file);
formData.append("jobid", jobId);
@@ -78,11 +90,12 @@ export function EsignatureCustomDocument({ bodyshop, jobId, setEsignatureContext
return Upload.LIST_IGNORE;
}}
customRequest={uploadCustomDocument}
+ disabled={isDisabled}
maxCount={1}
showUploadList={false}
multiple={false}
>
- } loading={loading}>
+ } loading={loading}>
{t("esignature.actions.upload_document")}
diff --git a/client/src/components/lock-wrapper/lock-wrapper.component.jsx b/client/src/components/lock-wrapper/lock-wrapper.component.jsx
index 2d65e3c86..0b8ff191c 100644
--- a/client/src/components/lock-wrapper/lock-wrapper.component.jsx
+++ b/client/src/components/lock-wrapper/lock-wrapper.component.jsx
@@ -14,7 +14,7 @@ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
});
-const LockWrapper = ({ featureName, bodyshop, children, disabled = true, bypass }) => {
+const LockWrapper = ({ featureName, bodyshop, children, disabled = true, bypass, locked }) => {
let renderedChildren = children;
//Mark the child prop as disabled.
@@ -36,11 +36,13 @@ const LockWrapper = ({ featureName, bodyshop, children, disabled = true, bypass
return {children};
}
- return HasFeatureAccess({ featureName: featureName, bodyshop }) ? (
+ const hasAccess = typeof locked === "boolean" ? !locked : HasFeatureAccess({ featureName: featureName, bodyshop });
+
+ return hasAccess ? (
children
) : (
- {!HasFeatureAccess({ featureName: featureName, bodyshop }) && }
+
{renderedChildren}
);
diff --git a/client/src/components/print-center-jobs/print-center-jobs.component.jsx b/client/src/components/print-center-jobs/print-center-jobs.component.jsx
index b01173f1a..fd0afe0ce 100644
--- a/client/src/components/print-center-jobs/print-center-jobs.component.jsx
+++ b/client/src/components/print-center-jobs/print-center-jobs.component.jsx
@@ -1,5 +1,5 @@
import { useTreatmentsWithConfig } from "../../feature-flags/splitio-react-replacement";
-import { Card, Col, Input, Row, Space, Typography } from "antd";
+import { Card, Col, Input, Row, Space, Typography, Tooltip } from "antd";
import _ from "lodash";
import { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -10,6 +10,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import { TemplateList } from "../../utils/TemplateConstants";
import Jobd3RdPartyModal from "../job-3rd-party-modal/job-3rd-party-modal.component";
import EsignatureCustomDocument from "../esignature-custom-document/esignature-custom-document.component";
+import LockWrapperComponent from "../lock-wrapper/lock-wrapper.component";
import PrintCenterItem from "../print-center-item/print-center-item.component";
import PrintCenterJobsLabels from "../print-center-jobs-labels/print-center-jobs-labels.component";
import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component";
@@ -50,7 +51,7 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technicia
.filter(
(temp) =>
(!temp.regions ||
- (temp.regions && temp.regions[bodyshop.region_config]) ||
+ temp.regions?.[bodyshop.region_config] ||
(temp.regions && bodyshop.region_config.includes(Object.keys(temp.regions)) === true)) &&
(!temp.dms || temp.dms === false)
)
@@ -62,7 +63,7 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technicia
.filter(
(temp) =>
!temp.regions ||
- (temp.regions && temp.regions[bodyshop.region_config]) ||
+ temp.regions?.[bodyshop.region_config] ||
(temp.regions && bodyshop.region_config.includes(Object.keys(temp.regions)) === true)
)
.filter((temp) => !isReynoldsMode || !temp.excludedDmsModes?.includes(dmsMode))
@@ -100,7 +101,13 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technicia
extra={
- {esignatureEnabled && }
+
+
+
+
+
+
+
setSearch(e.target.value)} value={search} enterButton />
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index d2088122c..73e04d198 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -1366,6 +1366,9 @@
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
"upload_title": "Unable to prepare document for e-signature"
},
+ "tooltips": {
+ "contact_sales": "E-signatures are not enabled for this shop. Contact sales to add this feature."
+ },
"fields": {
"completed": "Completed?",
"completed_at": "Completed At",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 781b1dfae..40685612f 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -1366,6 +1366,9 @@
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
"upload_title": "Unable to prepare document for e-signature"
},
+ "tooltips": {
+ "contact_sales": "Las firmas electronicas no estan habilitadas para este taller. Contacte a ventas para agregar esta funcion."
+ },
"fields": {
"completed": "",
"completed_at": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 1f3333f56..ce5d80016 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -1366,6 +1366,9 @@
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
"upload_title": "Unable to prepare document for e-signature"
},
+ "tooltips": {
+ "contact_sales": "Les signatures electroniques ne sont pas activees pour cet atelier. Contactez les ventes pour ajouter cette fonctionnalite."
+ },
"fields": {
"completed": "",
"completed_at": "",