Add additional translations and cleanup.
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -58,19 +58,19 @@ export function JobAuditTrail({ bodyshop, jobId }) {
|
||||
];
|
||||
const esigColumns = [
|
||||
{
|
||||
title: t("audit.fields.created_at"),
|
||||
title: t("esignature.fields.created_at"),
|
||||
dataIndex: "created_at",
|
||||
key: "created_at",
|
||||
render: (text) => <DateTimeFormatter>{text}</DateTimeFormatter>
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.updated_at"),
|
||||
title: t("esignature.fields.updated_at"),
|
||||
dataIndex: "updated_at",
|
||||
key: "updated_at",
|
||||
render: (text) => <DateTimeFormatter>{text}</DateTimeFormatter>
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.title"),
|
||||
title: t("esignature.fields.title"),
|
||||
dataIndex: "title",
|
||||
key: "title",
|
||||
render: (text) => (
|
||||
@@ -80,7 +80,7 @@ export function JobAuditTrail({ bodyshop, jobId }) {
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.external_document_id"),
|
||||
title: t("esignature.fields.external_document_id"),
|
||||
dataIndex: "external_document_id",
|
||||
key: "external_document_id",
|
||||
render: (text) => (
|
||||
@@ -90,7 +90,7 @@ export function JobAuditTrail({ bodyshop, jobId }) {
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.status"),
|
||||
title: t("esignature.fields.status"),
|
||||
dataIndex: "status",
|
||||
key: "status",
|
||||
render: (text) => (
|
||||
@@ -100,25 +100,25 @@ export function JobAuditTrail({ bodyshop, jobId }) {
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.opened"),
|
||||
title: t("esignature.fields.opened"),
|
||||
dataIndex: "opened",
|
||||
key: "opened",
|
||||
render: (text) => <Checkbox checked={text} disabled />
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.rejected"),
|
||||
title: t("esignature.fields.rejected"),
|
||||
dataIndex: "rejected",
|
||||
key: "rejected",
|
||||
render: (text) => <Checkbox checked={text} disabled />
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.completed"),
|
||||
title: t("esignature.fields.completed"),
|
||||
dataIndex: "completed",
|
||||
key: "completed",
|
||||
render: (text) => <Checkbox checked={text} disabled />
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.completed_at"),
|
||||
title: t("esignature.fields.completed_at"),
|
||||
dataIndex: "completed_at",
|
||||
key: "completed_at",
|
||||
render: (text) => <DateTimeFormatter>{text}</DateTimeFormatter>
|
||||
@@ -134,11 +134,10 @@ export function JobAuditTrail({ bodyshop, jobId }) {
|
||||
onClick={async () => {
|
||||
logImEXEvent("job_esig_delete", {});
|
||||
try {
|
||||
const deleteResult = await axios.post("/esign/delete", {
|
||||
await axios.post("/esign/delete", {
|
||||
documentId: record.external_document_id,
|
||||
bodyshopid: bodyshop.id
|
||||
});
|
||||
console.log("*** ~ JobAuditTrail ~ deleteResult:", deleteResult);
|
||||
refetch();
|
||||
} catch (error) {
|
||||
console.error("Error deleting document:", error?.response?.data || error.message);
|
||||
@@ -151,24 +150,43 @@ export function JobAuditTrail({ bodyshop, jobId }) {
|
||||
>
|
||||
{t("esignature.actions.delete")}
|
||||
</Button>
|
||||
<Button onClick={() => console.log(record)}>{t("esignature.actions.resend")}</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
axios
|
||||
.post("/esign/view", {
|
||||
onClick={async () => {
|
||||
logImEXEvent("job_esig_redistribute", {});
|
||||
try {
|
||||
await axios.post("/esign/redistribute", {
|
||||
documentId: record.external_document_id,
|
||||
bodyshopid: bodyshop.id
|
||||
})
|
||||
.then((response) => {
|
||||
window.open(response.data?.document?.downloadUrl, "_blank");
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error viewing document:", error?.response?.data || error.message);
|
||||
notification.error({
|
||||
message: t("esignature.view_error"),
|
||||
description: error?.response?.data?.message || error.message
|
||||
});
|
||||
});
|
||||
|
||||
//Pop the success notification. Possible audit requery required.
|
||||
} catch (error) {
|
||||
console.error("Error viewing document:", error?.response?.data || error.message);
|
||||
notification.error({
|
||||
message: t("esignature.view_error"),
|
||||
description: error?.response?.data?.message || error.message
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t("esignature.actions.redistribute")}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={async () => {
|
||||
logImEXEvent("job_esig_view", {});
|
||||
try {
|
||||
const response = await axios.post("/esign/view", {
|
||||
documentId: record.external_document_id,
|
||||
bodyshopid: bodyshop.id
|
||||
});
|
||||
window.open(response.data?.document?.downloadUrl, "_blank");
|
||||
} catch (error) {
|
||||
console.error("Error viewing document:", error?.response?.data || error.message);
|
||||
notification.error({
|
||||
message: t("esignature.view_error"),
|
||||
description: error?.response?.data?.message || error.message
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t("esignature.actions.view")}
|
||||
|
||||
Reference in New Issue
Block a user