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)