IO-2443 Minor clean up.

This commit is contained in:
Patrick Fic
2026-04-20 11:37:19 -07:00
parent 9c97b30e8e
commit b6cbfb8e45
14 changed files with 176 additions and 258 deletions

View File

@@ -1,5 +1,5 @@
import { EmbedUpdateDocumentV1 } from "@documenso/embed-react";
import { Modal, notification } from "antd";
import { Modal, notification, Result } from "antd";
import axios from "axios";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -8,6 +8,7 @@ import { toggleModalVisible } from "../../redux/modals/modals.actions";
import { selectEsignature } from "../../redux/modals/modals.selectors";
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
import { useState } from "react";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
const mapStateToProps = createStructuredSelector({
esignatureModal: selectEsignature,
@@ -27,7 +28,10 @@ export function EsignatureModalContainer({ esignatureModal, toggleModalVisible,
return (
<Modal
open={open}
title={t("jobs.labels.esignature")}
title={InstanceRenderManager({
imex: t("jobs.labels.esignature_imex"),
rome: t("jobs.labels.esignature_rome")
})}
onOk={async () => {
try {
setDistributing(true);
@@ -51,7 +55,8 @@ export function EsignatureModalContainer({ esignatureModal, toggleModalVisible,
try {
await axios.post("/esign/delete", {
documentId,
envelopeId
envelopeId,
bodyshopid: bodyshop.id
});
toggleModalVisible();
@@ -80,7 +85,7 @@ export function EsignatureModalContainer({ esignatureModal, toggleModalVisible,
}}
/>
) : (
<div>No token...</div>
<Result status="warning" title={t("esignature.errors.no_token")} />
)}
</div>
</Modal>

View File

@@ -135,7 +135,8 @@ export function JobAuditTrail({ bodyshop, jobId }) {
logImEXEvent("job_esig_delete", {});
try {
const deleteResult = await axios.post("/esign/delete", {
documentId: record.external_document_id
documentId: record.external_document_id,
bodyshopid: bodyshop.id
});
console.log("*** ~ JobAuditTrail ~ deleteResult:", deleteResult);
refetch();
@@ -155,7 +156,8 @@ export function JobAuditTrail({ bodyshop, jobId }) {
onClick={() => {
axios
.post("/esign/view", {
documentId: record.external_document_id
documentId: record.external_document_id,
bodyshopid: bodyshop.id
})
.then((response) => {
window.open(response.data?.document?.downloadUrl, "_blank");

View File

@@ -62,7 +62,7 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technicia
(temp.regions && bodyshop.region_config.includes(Object.keys(temp.regions)) === true)
)
.filter((temp) => !technician || temp.group !== "financial");
const JobsReportsList =
Enhanced_Payroll.treatment === "on"
? Object.keys(Templates)

View File

@@ -1245,6 +1245,7 @@
"upload_document": "Upload Document for E-Sign"
},
"errors": {
"no_token": "Error connecting to signing server. No authorization token was provided.",
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
"upload_title": "Unable to prepare document for e-signature"
}
@@ -2201,7 +2202,8 @@
"duplicateconfirm": "Are you sure you want to duplicate this Job? Some elements of this Job will not be duplicated.",
"emailaudit": "Email Audit Trail",
"employeeassignments": "Employee Assignments",
"esignature": "E-Signature",
"esignature_imex": "ImEX Sign",
"esignature_rome": "Rome Sign",
"estimatelines": "Estimate Lines",
"estimator": "Estimator",
"existing_jobs": "Existing Jobs",

View File

@@ -1245,6 +1245,7 @@
"upload_document": "Upload Document for E-Sign"
},
"errors": {
"no_token": "",
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
"upload_title": "Unable to prepare document for e-signature"
}
@@ -2201,7 +2202,8 @@
"duplicateconfirm": "",
"emailaudit": "",
"employeeassignments": "",
"esignature": "",
"esignature_imex": "",
"esignature_rome": "",
"estimatelines": "",
"estimator": "",
"existing_jobs": "Empleos existentes",

View File

@@ -1245,6 +1245,7 @@
"upload_document": "Upload Document for E-Sign"
},
"errors": {
"no_token": "",
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
"upload_title": "Unable to prepare document for e-signature"
}
@@ -2201,7 +2202,8 @@
"duplicateconfirm": "",
"emailaudit": "",
"employeeassignments": "",
"esignature": "",
"esignature_imex": "",
"esignature_rome": "",
"estimatelines": "",
"estimator": "",
"existing_jobs": "Emplois existants",