Merged in release/2026-06-05 (pull request #3267)
release/2026-06-05 - Esignture Banner
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { useTreatmentsWithConfig } from "../../feature-flags/splitio-react-replacement";
|
import { useTreatmentsWithConfig } from "../../feature-flags/splitio-react-replacement";
|
||||||
import { Card, Col, Input, Row, Space, Typography, Tooltip } from "antd";
|
import { CloseOutlined } from "@ant-design/icons";
|
||||||
|
import { Alert, Button, Card, Col, Input, Row, Space, Typography, Tooltip } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -17,6 +18,7 @@ import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-spee
|
|||||||
import { bodyshopHasDmsKey, DMS_MAP, getDmsMode } from "../../utils/dmsUtils";
|
import { bodyshopHasDmsKey, DMS_MAP, getDmsMode } from "../../utils/dmsUtils";
|
||||||
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||||
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
||||||
|
import useLocalStorage from "../../utils/useLocalStorage";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
printCenterModal: selectPrintCenter,
|
printCenterModal: selectPrintCenter,
|
||||||
@@ -28,6 +30,10 @@ const mapDispatchToProps = () => ({});
|
|||||||
|
|
||||||
export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technician }) {
|
export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technician }) {
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
|
const [esignatureBannerDismissed, setEsignatureBannerDismissed] = useLocalStorage(
|
||||||
|
"print_center_esignature_banner_dismissed",
|
||||||
|
false
|
||||||
|
);
|
||||||
const { id: jobId, job } = printCenterModal.context;
|
const { id: jobId, job } = printCenterModal.context;
|
||||||
const tempList = TemplateList("job", {});
|
const tempList = TemplateList("job", {});
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -42,6 +48,7 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technicia
|
|||||||
const dmsMode = getDmsMode(bodyshop, "off");
|
const dmsMode = getDmsMode(bodyshop, "off");
|
||||||
const isReynoldsMode = dmsMode === DMS_MAP.reynolds;
|
const isReynoldsMode = dmsMode === DMS_MAP.reynolds;
|
||||||
const esignatureEnabled = hasDocumensoApiKey(bodyshop);
|
const esignatureEnabled = hasDocumensoApiKey(bodyshop);
|
||||||
|
const showEsignatureBanner = !esignatureEnabled && !esignatureBannerDismissed;
|
||||||
|
|
||||||
const Templates = !hasDMSKey
|
const Templates = !hasDMSKey
|
||||||
? Object.keys(tempList)
|
? Object.keys(tempList)
|
||||||
@@ -92,6 +99,23 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technicia
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
{showEsignatureBanner && (
|
||||||
|
<Alert
|
||||||
|
action={
|
||||||
|
<Button
|
||||||
|
aria-label={t("general.actions.close")}
|
||||||
|
icon={<CloseOutlined />}
|
||||||
|
onClick={() => setEsignatureBannerDismissed(true)}
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
banner
|
||||||
|
title={t("printcenter.banners.esignature_promo")}
|
||||||
|
type="info"
|
||||||
|
className="print-center-esignature-banner"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
<Col lg={8} md={12} sm={24}>
|
<Col lg={8} md={12} sm={24}>
|
||||||
<PrintCenterSpeedPrint jobId={jobId} />
|
<PrintCenterSpeedPrint jobId={jobId} />
|
||||||
|
|||||||
@@ -5,3 +5,7 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.print-center-esignature-banner {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3053,6 +3053,9 @@
|
|||||||
"appointments": {
|
"appointments": {
|
||||||
"appointment_confirmation": "Appointment Confirmation"
|
"appointment_confirmation": "Appointment Confirmation"
|
||||||
},
|
},
|
||||||
|
"banners": {
|
||||||
|
"esignature_promo": "Tired of getting paper signatures? Try E-Signatures today. Contact sales to add this feature."
|
||||||
|
},
|
||||||
"bills": {
|
"bills": {
|
||||||
"inhouse_invoice": "In House Invoice"
|
"inhouse_invoice": "In House Invoice"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3053,6 +3053,9 @@
|
|||||||
"appointments": {
|
"appointments": {
|
||||||
"appointment_confirmation": ""
|
"appointment_confirmation": ""
|
||||||
},
|
},
|
||||||
|
"banners": {
|
||||||
|
"esignature_promo": "¿Cansado de obtener firmas en papel? Prueba las firmas electrónicas hoy. Contacta a ventas para agregar esta función."
|
||||||
|
},
|
||||||
"bills": {
|
"bills": {
|
||||||
"inhouse_invoice": ""
|
"inhouse_invoice": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3053,6 +3053,9 @@
|
|||||||
"appointments": {
|
"appointments": {
|
||||||
"appointment_confirmation": ""
|
"appointment_confirmation": ""
|
||||||
},
|
},
|
||||||
|
"banners": {
|
||||||
|
"esignature_promo": "Vous en avez assez des signatures papier? Essayez les signatures électroniques dès aujourd'hui. Communiquez avec les ventes pour ajouter cette fonction."
|
||||||
|
},
|
||||||
"bills": {
|
"bills": {
|
||||||
"inhouse_invoice": ""
|
"inhouse_invoice": ""
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user