Add additional translations and cleanup.
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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")}
|
||||
|
||||
@@ -323,14 +323,14 @@
|
||||
"addtemplate": "Add Template",
|
||||
"newlaborrate": "New Labor Rate",
|
||||
"newsalestaxcode": "New Sales Tax Code",
|
||||
"save_shop_information": "Save Shop Information",
|
||||
"newstatus": "Add Status",
|
||||
"save_shop_information": "Save Shop Information",
|
||||
"testrender": "Test Render"
|
||||
},
|
||||
"errors": {
|
||||
"creatingdefaultview": "Error creating default view.",
|
||||
"duplicate_job_status": "Duplicate job status. Each job status must be unique.",
|
||||
"duplicate_insurance_company": "Duplicate insurance company name. Each insurance company name must be unique",
|
||||
"duplicate_job_status": "Duplicate job status. Each job status must be unique.",
|
||||
"loading": "Unable to load shop details. Please call technical support.",
|
||||
"saving": "Error encountered while saving. {{message}}",
|
||||
"task_preset_allocation_exceeded": "{{laborType}} task preset total is {{total}}% and cannot exceed 100%."
|
||||
@@ -427,35 +427,6 @@
|
||||
"logo_img_path": "Shop Logo",
|
||||
"logo_img_path_height": "Logo Image Height",
|
||||
"logo_img_path_width": "Logo Image Width",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "Daily Body Target",
|
||||
"daily_paint_target": "Daily Paint Target",
|
||||
"ignore_blocked_days": "Ignore Blocked Days",
|
||||
"last_number_working_days": "Last Number of Working Days",
|
||||
"production_target_hours": "Production Target Hours"
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "Attach PDF to Sent Emails?",
|
||||
"from_emails": "Additional From Emails",
|
||||
"parts_order_cc": "Parts Orders CC",
|
||||
"parts_return_slip_cc": "Parts Returns CC"
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "Paint Hour Split",
|
||||
"paint_materials_hourly_cost_rate": "Paint Materials Hourly Cost Rate",
|
||||
"prep_hour_split": "Prep Hour Split",
|
||||
"shop_materials_hourly_cost_rate": "Shop Materials Hourly Cost Rate",
|
||||
"target_touch_time": "Target Touch Time",
|
||||
"use_paint_scale_data": "Use Paint Scale Data"
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "Enabled",
|
||||
"http_path": "HTTP Path",
|
||||
"network_path": "Network Path",
|
||||
"token": "Token"
|
||||
}
|
||||
},
|
||||
"md_categories": "Categories",
|
||||
"md_ccc_rates": "Courtesy Car Contract Rate Presets",
|
||||
"md_classes": "Classes",
|
||||
@@ -711,6 +682,13 @@
|
||||
},
|
||||
"schedule_end_time": "Schedule Ending Time",
|
||||
"schedule_start_time": "Schedule Starting Time",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "Daily Body Target",
|
||||
"daily_paint_target": "Daily Paint Target",
|
||||
"ignore_blocked_days": "Ignore Blocked Days",
|
||||
"last_number_working_days": "Last Number of Working Days",
|
||||
"production_target_hours": "Production Target Hours"
|
||||
},
|
||||
"shopname": "Shop Name",
|
||||
"speedprint": {
|
||||
"id": "Id",
|
||||
@@ -757,6 +735,28 @@
|
||||
"production_statuses": "Production Statuses",
|
||||
"ready_statuses": "Ready Statuses"
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "Attach PDF to Sent Emails?",
|
||||
"from_emails": "Additional From Emails",
|
||||
"parts_order_cc": "Parts Orders CC",
|
||||
"parts_return_slip_cc": "Parts Returns CC"
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "Paint Hour Split",
|
||||
"paint_materials_hourly_cost_rate": "Paint Materials Hourly Cost Rate",
|
||||
"prep_hour_split": "Prep Hour Split",
|
||||
"shop_materials_hourly_cost_rate": "Shop Materials Hourly Cost Rate",
|
||||
"target_touch_time": "Target Touch Time",
|
||||
"use_paint_scale_data": "Use Paint Scale Data"
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "Enabled",
|
||||
"http_path": "HTTP Path",
|
||||
"network_path": "Network Path",
|
||||
"token": "Token"
|
||||
}
|
||||
},
|
||||
"target_touchtime": "Target Touch Time",
|
||||
"timezone": "Timezone",
|
||||
"tt_allow_post_to_invoiced": "Allow Time Tickets to be posted to Invoiced & Exported Jobs",
|
||||
@@ -776,6 +776,7 @@
|
||||
"alljobstatuses": "All Job Statuses",
|
||||
"allopenjobstatuses": "All Open Job Statuses",
|
||||
"apptcolors": "Appointment Colors",
|
||||
"autoemail": "Auto Email",
|
||||
"businessinformation": "Business Information",
|
||||
"checklists": "Checklists",
|
||||
"consent_settings": "Phone Number Opt-Out List",
|
||||
@@ -783,7 +784,6 @@
|
||||
"customtemplates": "Custom Templates",
|
||||
"defaultcostsmapping": "Default Costs Mapping",
|
||||
"defaultprofitsmapping": "Default Profits Mapping",
|
||||
"dms_setup": "DMS Setup",
|
||||
"deliverchecklist": "Delivery Checklist",
|
||||
"dms": {
|
||||
"cdk": {
|
||||
@@ -798,10 +798,11 @@
|
||||
"rr_dealerid": "Reynolds Store Number",
|
||||
"title": "DMS"
|
||||
},
|
||||
"dms_setup": "DMS Setup",
|
||||
"emaillater": "Email Later",
|
||||
"employee_teams": "Employee Teams",
|
||||
"employee_options": "Employee Options",
|
||||
"employee_rates": "Employee Rates",
|
||||
"employee_teams": "Employee Teams",
|
||||
"employee_vacation": "Employee Vacation",
|
||||
"employees": "Employees",
|
||||
"estimators": "Estimators",
|
||||
@@ -812,21 +813,22 @@
|
||||
"intakechecklist": "Intake Checklist",
|
||||
"intellipay_cash_discount": "Please ensure that cash discounting has been enabled on your merchant account. Reach out to IntelliPay Support if you need assistance. ",
|
||||
"job_status_options": "Job Status Options",
|
||||
"jobcosting": "Job Costing",
|
||||
"jobstatuses": "Job Statuses",
|
||||
"jump_to_section": "Jump to section",
|
||||
"laborrates": "Labor Rates",
|
||||
"licensing": "Licensing",
|
||||
"localmediaserver": "Local Media Server",
|
||||
"md_parts_scan": "Parts Scan Rules",
|
||||
"md_ro_guard": "RO Guard",
|
||||
"md_ro_guard_options": "RO Guard Options",
|
||||
"md_tasks_presets": "Tasks Presets",
|
||||
"task_preset_options": "Task Preset Options",
|
||||
"md_to_emails": "Preset To Emails",
|
||||
"md_to_emails_emails": "Emails",
|
||||
"messagingpresets": "Messaging Presets",
|
||||
"notification_options": "Notification Options",
|
||||
"notemplatesavailable": "No templates available to add.",
|
||||
"notespresets": "Notes Presets",
|
||||
"jump_to_section": "Jump to section",
|
||||
"notification_options": "Notification Options",
|
||||
"notifications": {
|
||||
"followers": "Notifications"
|
||||
},
|
||||
@@ -863,9 +865,6 @@
|
||||
"roguard": {
|
||||
"title": "RO Guard"
|
||||
},
|
||||
"autoemail": "Auto Email",
|
||||
"jobcosting": "Job Costing",
|
||||
"localmediaserver": "Local Media Server",
|
||||
"romepay": "Rome Pay",
|
||||
"scheduling": "SMART Scheduling",
|
||||
"scoreboardsetup": "Scoreboard Setup",
|
||||
@@ -877,6 +876,7 @@
|
||||
"ssbuckets": "Job Size Definitions",
|
||||
"systemsettings": "System Settings",
|
||||
"task-presets": "Task Presets",
|
||||
"task_preset_options": "Task Preset Options",
|
||||
"workingdays": "Working Days"
|
||||
},
|
||||
"operations": {
|
||||
@@ -1353,13 +1353,27 @@
|
||||
},
|
||||
"esignature": {
|
||||
"actions": {
|
||||
"delete": "Delete",
|
||||
"distribute": "Distribute",
|
||||
"upload_document": "Upload Document for E-Sign"
|
||||
"redistribute": "Redistribute",
|
||||
"upload_document": "Upload Document for E-Sign",
|
||||
"view": "View"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"fields": {
|
||||
"completed": "Completed?",
|
||||
"completed_at": "Completed At",
|
||||
"created_at": "Created At",
|
||||
"external_document_id": "Ex. Document ID",
|
||||
"opened": "Opened?",
|
||||
"rejected": "Rejected?",
|
||||
"status": "Status",
|
||||
"title": "Title",
|
||||
"updated_at": "Updated At"
|
||||
}
|
||||
},
|
||||
"eula": {
|
||||
@@ -1477,8 +1491,8 @@
|
||||
"beta": "BETA",
|
||||
"cancel": "Are you sure you want to cancel? Your changes will not be saved.",
|
||||
"changelog": "Change Log",
|
||||
"click_to_begin": "Click {{action}} to begin",
|
||||
"clear": "Clear",
|
||||
"click_to_begin": "Click {{action}} to begin",
|
||||
"confirmpassword": "Confirm Password",
|
||||
"created_at": "Created At",
|
||||
"date": "Select Date",
|
||||
@@ -3768,11 +3782,11 @@
|
||||
"jobhours": "Job Related Time Tickets Summary",
|
||||
"lunch": "Lunch",
|
||||
"new": "New Time Ticket",
|
||||
"payrollclaimedtasks": "These time tickets will be automatically entered to the system as a part of claiming this task. These numbers are calculated using the jobs assigned lines. If lines are unassigned, they will be excluded from created tickets.",
|
||||
"payout_methods": {
|
||||
"commission": "Commission",
|
||||
"hourly": "Hourly"
|
||||
},
|
||||
"payrollclaimedtasks": "These time tickets will be automatically entered to the system as a part of claiming this task. These numbers are calculated using the jobs assigned lines. If lines are unassigned, they will be excluded from created tickets.",
|
||||
"pmbreak": "PM Break",
|
||||
"pmshift": "PM Shift",
|
||||
"shift": "Shift",
|
||||
|
||||
@@ -120,8 +120,9 @@
|
||||
"appointmentinsert": "",
|
||||
"assignedlinehours": "",
|
||||
"billdeleted": "",
|
||||
"billposted": "",
|
||||
"billmarkforreexport": "",
|
||||
"billposted": "",
|
||||
"billupdated": "",
|
||||
"failedpayment": "",
|
||||
"jobassignmentchange": "",
|
||||
"jobassignmentremoved": "",
|
||||
@@ -136,6 +137,9 @@
|
||||
"jobintake": "",
|
||||
"jobinvoiced": "",
|
||||
"jobioucreated": "",
|
||||
"joblineupdate": "",
|
||||
"jobmanualcreate": "",
|
||||
"jobmanuallineinsert": "",
|
||||
"jobmodifylbradj": "",
|
||||
"jobnoteadded": "",
|
||||
"jobnotedeleted": "",
|
||||
@@ -151,7 +155,9 @@
|
||||
"tasks_deleted": "",
|
||||
"tasks_uncompleted": "",
|
||||
"tasks_undeleted": "",
|
||||
"tasks_updated": ""
|
||||
"tasks_updated": "",
|
||||
"timeticketcreated": "",
|
||||
"timeticketupdated": ""
|
||||
}
|
||||
},
|
||||
"billlines": {
|
||||
@@ -317,14 +323,14 @@
|
||||
"addtemplate": "",
|
||||
"newlaborrate": "",
|
||||
"newsalestaxcode": "",
|
||||
"save_shop_information": "",
|
||||
"newstatus": "",
|
||||
"save_shop_information": "",
|
||||
"testrender": ""
|
||||
},
|
||||
"errors": {
|
||||
"creatingdefaultview": "",
|
||||
"duplicate_job_status": "",
|
||||
"duplicate_insurance_company": "",
|
||||
"duplicate_job_status": "",
|
||||
"loading": "No se pueden cargar los detalles de la tienda. Por favor llame al soporte técnico.",
|
||||
"saving": "",
|
||||
"task_preset_allocation_exceeded": ""
|
||||
@@ -421,35 +427,6 @@
|
||||
"logo_img_path": "",
|
||||
"logo_img_path_height": "",
|
||||
"logo_img_path_width": "",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "",
|
||||
"daily_paint_target": "",
|
||||
"ignore_blocked_days": "",
|
||||
"last_number_working_days": "",
|
||||
"production_target_hours": ""
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "",
|
||||
"from_emails": "",
|
||||
"parts_order_cc": "",
|
||||
"parts_return_slip_cc": ""
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "",
|
||||
"paint_materials_hourly_cost_rate": "",
|
||||
"prep_hour_split": "",
|
||||
"shop_materials_hourly_cost_rate": "",
|
||||
"target_touch_time": "",
|
||||
"use_paint_scale_data": ""
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "",
|
||||
"http_path": "",
|
||||
"network_path": "",
|
||||
"token": ""
|
||||
}
|
||||
},
|
||||
"md_categories": "",
|
||||
"md_ccc_rates": "",
|
||||
"md_classes": "",
|
||||
@@ -705,6 +682,13 @@
|
||||
},
|
||||
"schedule_end_time": "",
|
||||
"schedule_start_time": "",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "",
|
||||
"daily_paint_target": "",
|
||||
"ignore_blocked_days": "",
|
||||
"last_number_working_days": "",
|
||||
"production_target_hours": ""
|
||||
},
|
||||
"shopname": "",
|
||||
"speedprint": {
|
||||
"id": "",
|
||||
@@ -751,6 +735,28 @@
|
||||
"production_statuses": "",
|
||||
"ready_statuses": ""
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "",
|
||||
"from_emails": "",
|
||||
"parts_order_cc": "",
|
||||
"parts_return_slip_cc": ""
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "",
|
||||
"paint_materials_hourly_cost_rate": "",
|
||||
"prep_hour_split": "",
|
||||
"shop_materials_hourly_cost_rate": "",
|
||||
"target_touch_time": "",
|
||||
"use_paint_scale_data": ""
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "",
|
||||
"http_path": "",
|
||||
"network_path": "",
|
||||
"token": ""
|
||||
}
|
||||
},
|
||||
"target_touchtime": "",
|
||||
"timezone": "",
|
||||
"tt_allow_post_to_invoiced": "",
|
||||
@@ -770,6 +776,7 @@
|
||||
"alljobstatuses": "",
|
||||
"allopenjobstatuses": "",
|
||||
"apptcolors": "",
|
||||
"autoemail": "",
|
||||
"businessinformation": "",
|
||||
"checklists": "",
|
||||
"consent_settings": "",
|
||||
@@ -777,7 +784,6 @@
|
||||
"customtemplates": "",
|
||||
"defaultcostsmapping": "",
|
||||
"defaultprofitsmapping": "",
|
||||
"dms_setup": "",
|
||||
"deliverchecklist": "",
|
||||
"dms": {
|
||||
"cdk": {
|
||||
@@ -792,10 +798,11 @@
|
||||
"rr_dealerid": "",
|
||||
"title": ""
|
||||
},
|
||||
"dms_setup": "",
|
||||
"emaillater": "",
|
||||
"employee_teams": "",
|
||||
"employee_options": "",
|
||||
"employee_rates": "",
|
||||
"employee_teams": "",
|
||||
"employee_vacation": "",
|
||||
"employees": "",
|
||||
"estimators": "",
|
||||
@@ -806,21 +813,22 @@
|
||||
"intakechecklist": "",
|
||||
"intellipay_cash_discount": "",
|
||||
"job_status_options": "",
|
||||
"jobcosting": "",
|
||||
"jobstatuses": "",
|
||||
"jump_to_section": "",
|
||||
"laborrates": "",
|
||||
"licensing": "",
|
||||
"localmediaserver": "",
|
||||
"md_parts_scan": "",
|
||||
"md_ro_guard": "",
|
||||
"md_ro_guard_options": "",
|
||||
"md_tasks_presets": "",
|
||||
"task_preset_options": "",
|
||||
"md_to_emails": "",
|
||||
"md_to_emails_emails": "",
|
||||
"messagingpresets": "",
|
||||
"notification_options": "",
|
||||
"notemplatesavailable": "",
|
||||
"notespresets": "",
|
||||
"jump_to_section": "",
|
||||
"notification_options": "",
|
||||
"notifications": {
|
||||
"followers": ""
|
||||
},
|
||||
@@ -857,9 +865,6 @@
|
||||
"roguard": {
|
||||
"title": ""
|
||||
},
|
||||
"autoemail": "",
|
||||
"jobcosting": "",
|
||||
"localmediaserver": "",
|
||||
"romepay": "",
|
||||
"scheduling": "",
|
||||
"scoreboardsetup": "",
|
||||
@@ -871,6 +876,7 @@
|
||||
"ssbuckets": "",
|
||||
"systemsettings": "",
|
||||
"task-presets": "",
|
||||
"task_preset_options": "",
|
||||
"workingdays": ""
|
||||
},
|
||||
"operations": {
|
||||
@@ -1347,13 +1353,27 @@
|
||||
},
|
||||
"esignature": {
|
||||
"actions": {
|
||||
"delete": "",
|
||||
"distribute": "",
|
||||
"upload_document": "Upload Document for E-Sign"
|
||||
"redistribute": "",
|
||||
"upload_document": "Upload Document for E-Sign",
|
||||
"view": ""
|
||||
},
|
||||
"errors": {
|
||||
"no_token": "",
|
||||
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
|
||||
"upload_title": "Unable to prepare document for e-signature"
|
||||
},
|
||||
"fields": {
|
||||
"completed": "",
|
||||
"completed_at": "",
|
||||
"created_at": "",
|
||||
"external_document_id": "",
|
||||
"opened": "",
|
||||
"rejected": "",
|
||||
"status": "",
|
||||
"title": "",
|
||||
"updated_at": ""
|
||||
}
|
||||
},
|
||||
"eula": {
|
||||
@@ -1471,8 +1491,8 @@
|
||||
"beta": "",
|
||||
"cancel": "",
|
||||
"changelog": "",
|
||||
"click_to_begin": "",
|
||||
"clear": "",
|
||||
"click_to_begin": "",
|
||||
"confirmpassword": "",
|
||||
"created_at": "",
|
||||
"date": "",
|
||||
@@ -3762,11 +3782,11 @@
|
||||
"jobhours": "",
|
||||
"lunch": "",
|
||||
"new": "",
|
||||
"payrollclaimedtasks": "",
|
||||
"payout_methods": {
|
||||
"commission": "",
|
||||
"hourly": ""
|
||||
},
|
||||
"payrollclaimedtasks": "",
|
||||
"pmbreak": "",
|
||||
"pmshift": "",
|
||||
"shift": "",
|
||||
|
||||
@@ -122,6 +122,7 @@
|
||||
"billdeleted": "",
|
||||
"billmarkforreexport": "",
|
||||
"billposted": "",
|
||||
"billupdated": "",
|
||||
"failedpayment": "",
|
||||
"jobassignmentchange": "",
|
||||
"jobassignmentremoved": "",
|
||||
@@ -136,6 +137,9 @@
|
||||
"jobintake": "",
|
||||
"jobinvoiced": "",
|
||||
"jobioucreated": "",
|
||||
"joblineupdate": "",
|
||||
"jobmanualcreate": "",
|
||||
"jobmanuallineinsert": "",
|
||||
"jobmodifylbradj": "",
|
||||
"jobnoteadded": "",
|
||||
"jobnotedeleted": "",
|
||||
@@ -151,7 +155,9 @@
|
||||
"tasks_deleted": "",
|
||||
"tasks_uncompleted": "",
|
||||
"tasks_undeleted": "",
|
||||
"tasks_updated": ""
|
||||
"tasks_updated": "",
|
||||
"timeticketcreated": "",
|
||||
"timeticketupdated": ""
|
||||
}
|
||||
},
|
||||
"billlines": {
|
||||
@@ -317,14 +323,14 @@
|
||||
"addtemplate": "",
|
||||
"newlaborrate": "",
|
||||
"newsalestaxcode": "",
|
||||
"save_shop_information": "",
|
||||
"newstatus": "",
|
||||
"save_shop_information": "",
|
||||
"testrender": ""
|
||||
},
|
||||
"errors": {
|
||||
"creatingdefaultview": "",
|
||||
"duplicate_job_status": "",
|
||||
"duplicate_insurance_company": "",
|
||||
"duplicate_job_status": "",
|
||||
"loading": "Impossible de charger les détails de la boutique. Veuillez appeler le support technique.",
|
||||
"saving": "",
|
||||
"task_preset_allocation_exceeded": ""
|
||||
@@ -421,35 +427,6 @@
|
||||
"logo_img_path": "",
|
||||
"logo_img_path_height": "",
|
||||
"logo_img_path_width": "",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "",
|
||||
"daily_paint_target": "",
|
||||
"ignore_blocked_days": "",
|
||||
"last_number_working_days": "",
|
||||
"production_target_hours": ""
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "",
|
||||
"from_emails": "",
|
||||
"parts_order_cc": "",
|
||||
"parts_return_slip_cc": ""
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "",
|
||||
"paint_materials_hourly_cost_rate": "",
|
||||
"prep_hour_split": "",
|
||||
"shop_materials_hourly_cost_rate": "",
|
||||
"target_touch_time": "",
|
||||
"use_paint_scale_data": ""
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "",
|
||||
"http_path": "",
|
||||
"network_path": "",
|
||||
"token": ""
|
||||
}
|
||||
},
|
||||
"md_categories": "",
|
||||
"md_ccc_rates": "",
|
||||
"md_classes": "",
|
||||
@@ -705,6 +682,13 @@
|
||||
},
|
||||
"schedule_end_time": "",
|
||||
"schedule_start_time": "",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "",
|
||||
"daily_paint_target": "",
|
||||
"ignore_blocked_days": "",
|
||||
"last_number_working_days": "",
|
||||
"production_target_hours": ""
|
||||
},
|
||||
"shopname": "",
|
||||
"speedprint": {
|
||||
"id": "",
|
||||
@@ -751,6 +735,28 @@
|
||||
"production_statuses": "",
|
||||
"ready_statuses": ""
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "",
|
||||
"from_emails": "",
|
||||
"parts_order_cc": "",
|
||||
"parts_return_slip_cc": ""
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "",
|
||||
"paint_materials_hourly_cost_rate": "",
|
||||
"prep_hour_split": "",
|
||||
"shop_materials_hourly_cost_rate": "",
|
||||
"target_touch_time": "",
|
||||
"use_paint_scale_data": ""
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "",
|
||||
"http_path": "",
|
||||
"network_path": "",
|
||||
"token": ""
|
||||
}
|
||||
},
|
||||
"target_touchtime": "",
|
||||
"timezone": "",
|
||||
"tt_allow_post_to_invoiced": "",
|
||||
@@ -770,6 +776,7 @@
|
||||
"alljobstatuses": "",
|
||||
"allopenjobstatuses": "",
|
||||
"apptcolors": "",
|
||||
"autoemail": "",
|
||||
"businessinformation": "",
|
||||
"checklists": "",
|
||||
"consent_settings": "",
|
||||
@@ -777,7 +784,6 @@
|
||||
"customtemplates": "",
|
||||
"defaultcostsmapping": "",
|
||||
"defaultprofitsmapping": "",
|
||||
"dms_setup": "",
|
||||
"deliverchecklist": "",
|
||||
"dms": {
|
||||
"cdk": {
|
||||
@@ -792,10 +798,11 @@
|
||||
"rr_dealerid": "",
|
||||
"title": ""
|
||||
},
|
||||
"dms_setup": "",
|
||||
"emaillater": "",
|
||||
"employee_teams": "",
|
||||
"employee_options": "",
|
||||
"employee_rates": "",
|
||||
"employee_teams": "",
|
||||
"employee_vacation": "",
|
||||
"employees": "",
|
||||
"estimators": "",
|
||||
@@ -806,21 +813,22 @@
|
||||
"intakechecklist": "",
|
||||
"intellipay_cash_discount": "",
|
||||
"job_status_options": "",
|
||||
"jobcosting": "",
|
||||
"jobstatuses": "",
|
||||
"jump_to_section": "",
|
||||
"laborrates": "",
|
||||
"licensing": "",
|
||||
"localmediaserver": "",
|
||||
"md_parts_scan": "",
|
||||
"md_ro_guard": "",
|
||||
"md_ro_guard_options": "",
|
||||
"md_tasks_presets": "",
|
||||
"task_preset_options": "",
|
||||
"md_to_emails": "",
|
||||
"md_to_emails_emails": "",
|
||||
"messagingpresets": "",
|
||||
"notification_options": "",
|
||||
"notemplatesavailable": "",
|
||||
"notespresets": "",
|
||||
"jump_to_section": "",
|
||||
"notification_options": "",
|
||||
"notifications": {
|
||||
"followers": ""
|
||||
},
|
||||
@@ -857,9 +865,6 @@
|
||||
"roguard": {
|
||||
"title": ""
|
||||
},
|
||||
"autoemail": "",
|
||||
"jobcosting": "",
|
||||
"localmediaserver": "",
|
||||
"romepay": "",
|
||||
"scheduling": "",
|
||||
"scoreboardsetup": "",
|
||||
@@ -871,6 +876,7 @@
|
||||
"ssbuckets": "",
|
||||
"systemsettings": "",
|
||||
"task-presets": "",
|
||||
"task_preset_options": "",
|
||||
"workingdays": ""
|
||||
},
|
||||
"operations": {
|
||||
@@ -1347,13 +1353,27 @@
|
||||
},
|
||||
"esignature": {
|
||||
"actions": {
|
||||
"delete": "",
|
||||
"distribute": "",
|
||||
"upload_document": "Upload Document for E-Sign"
|
||||
"redistribute": "",
|
||||
"upload_document": "Upload Document for E-Sign",
|
||||
"view": ""
|
||||
},
|
||||
"errors": {
|
||||
"no_token": "",
|
||||
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
|
||||
"upload_title": "Unable to prepare document for e-signature"
|
||||
},
|
||||
"fields": {
|
||||
"completed": "",
|
||||
"completed_at": "",
|
||||
"created_at": "",
|
||||
"external_document_id": "",
|
||||
"opened": "",
|
||||
"rejected": "",
|
||||
"status": "",
|
||||
"title": "",
|
||||
"updated_at": ""
|
||||
}
|
||||
},
|
||||
"eula": {
|
||||
@@ -1471,8 +1491,8 @@
|
||||
"beta": "",
|
||||
"cancel": "",
|
||||
"changelog": "",
|
||||
"click_to_begin": "",
|
||||
"clear": "",
|
||||
"click_to_begin": "",
|
||||
"confirmpassword": "",
|
||||
"created_at": "",
|
||||
"date": "",
|
||||
@@ -3762,11 +3782,11 @@
|
||||
"jobhours": "",
|
||||
"lunch": "",
|
||||
"new": "",
|
||||
"payrollclaimedtasks": "",
|
||||
"payout_methods": {
|
||||
"commission": "",
|
||||
"hourly": ""
|
||||
},
|
||||
"payrollclaimedtasks": "",
|
||||
"pmbreak": "",
|
||||
"pmshift": "",
|
||||
"shift": "",
|
||||
|
||||
@@ -6,7 +6,7 @@ const logger = require("../utils/logger");
|
||||
//Need to pull the key dynamically to send documents.
|
||||
const JSR_SERVER = process.env.JSR_URL || "https://reports.imex.online";
|
||||
const jsreport = require("@jsreport/nodejs-client");
|
||||
const { QUERY_JOB_FOR_SIGNATURE, INSERT_ESIGNATURE_DOCUMENT, DISTRIBUTE_ESIGNATURE_DOCUMENT, QUERY_ESIGNATURE_BY_EXTERNAL_ID, UPDATE_ESIGNATURE_DOCUMENT, QUERY_DOCUMENSO_KEY } = require("../graphql-client/queries");
|
||||
const { QUERY_JOB_FOR_SIGNATURE, INSERT_ESIGNATURE_DOCUMENT, DISTRIBUTE_ESIGNATURE_DOCUMENT, QUERY_ESIGNATURE_BY_EXTERNAL_ID, UPDATE_ESIGNATURE_DOCUMENT, QUERY_DOCUMENSO_KEY, INSERT_ESIG_AUDIT_TRAIL } = require("../graphql-client/queries");
|
||||
const _ = require("lodash");
|
||||
|
||||
function parseJsonField(value, fallback = null) {
|
||||
@@ -122,7 +122,6 @@ async function createEsignDocumentFromPdf({ req, bodyshop, pdfBuffer, esigData,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
async function distributeDocument(req, res) {
|
||||
try {
|
||||
const client = req.userGraphQLClient;
|
||||
@@ -159,6 +158,44 @@ async function distributeDocument(req, res) {
|
||||
}
|
||||
}
|
||||
|
||||
async function redistributeDocument(req, res) {
|
||||
try {
|
||||
const client = req.userGraphQLClient;
|
||||
|
||||
const { documentId, bodyshopid } = req.body;
|
||||
const documenso = await getDocumensoClient({ bodyshopid, req })
|
||||
|
||||
|
||||
const document = await documenso.documents.get({
|
||||
documentId: parseInt(documentId)
|
||||
});
|
||||
|
||||
const distributeResult = await documenso.documents.redistribute({
|
||||
documentId: parseInt(documentId),
|
||||
recipients: document.recipients.filter(r => r.signingStatus === "NOT_SIGNED").map(r => r.id)
|
||||
});
|
||||
|
||||
await client.request(INSERT_ESIG_AUDIT_TRAIL, {
|
||||
obj: {
|
||||
jobid: req.body.jobid,
|
||||
bodyshopid: req.body.bodyshopid,
|
||||
operation: `Esignature document with title ${distributeResult.title} (ID: ${documentId}) redistributed to recipients.`,
|
||||
useremail: req.user?.email,
|
||||
type: 'esig-redistribute'
|
||||
}
|
||||
})
|
||||
|
||||
res.json({ success: true, distributeResult });
|
||||
} catch (error) {
|
||||
|
||||
logger.log(`esig-redistribute-error`, "ERROR", "esig", "api", {
|
||||
message: error.message, stack: error.stack,
|
||||
body: req.body
|
||||
});
|
||||
res.status(500).json({ error: "An error occurred while redistributing the document.", message: error.message });
|
||||
}
|
||||
}
|
||||
|
||||
async function deleteDocument(req, res) {
|
||||
try {
|
||||
const client = req.userGraphQLClient;
|
||||
@@ -413,6 +450,7 @@ module.exports = {
|
||||
newEsignDocument,
|
||||
newCustomEsignDocument,
|
||||
distributeDocument,
|
||||
redistributeDocument,
|
||||
deleteDocument,
|
||||
viewDocument,
|
||||
getDocumensoClient
|
||||
|
||||
@@ -16,6 +16,7 @@ const webhookTypeEnums = {
|
||||
DOCUMENT_CANCELLED: "DOCUMENT_CANCELLED",
|
||||
DOCUMENT_OPENED: "DOCUMENT_OPENED",
|
||||
DOCUMENT_SIGNED: "DOCUMENT_SIGNED",
|
||||
DOCUMENT_REMINDER_SENT: "DOCUMENT_REMINDER_SENT",
|
||||
}
|
||||
|
||||
async function esignWebhook(req, res) {
|
||||
@@ -29,6 +30,8 @@ async function esignWebhook(req, res) {
|
||||
const documentId = (message.payload?.id || message.payload?.payload?.id)?.toString()
|
||||
//TODO: Implement checks to prevent this from going backwards in status? If a request fails, it retries, which could cause a document marked as completed to be marked as rejected if the rejection event is processed after the completion event.
|
||||
switch (message.event) {
|
||||
case webhookTypeEnums.DOCUMENT_REMINDER_SENT:
|
||||
break;
|
||||
case webhookTypeEnums.DOCUMENT_OPENED:
|
||||
//TODO: DR: Add notification for document opened.
|
||||
await client.request(UPDATE_ESIGNATURE_DOCUMENT, {
|
||||
|
||||
@@ -4,7 +4,7 @@ const multer = require("multer");
|
||||
|
||||
const validateFirebaseIdTokenMiddleware = require("../middleware/validateFirebaseIdTokenMiddleware");
|
||||
const withUserGraphQLClientMiddleware = require("../middleware/withUserGraphQLClientMiddleware");
|
||||
const { newEsignDocument, newCustomEsignDocument, distributeDocument, viewDocument, deleteDocument } = require("../esign/esign-new");
|
||||
const { newEsignDocument, newCustomEsignDocument, distributeDocument, redistributeDocument, viewDocument, deleteDocument } = require("../esign/esign-new");
|
||||
const { esignWebhook } = require("../esign/webhook");
|
||||
|
||||
const upload = multer({
|
||||
@@ -16,6 +16,7 @@ const upload = multer({
|
||||
router.post("/new", validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, newEsignDocument);
|
||||
router.post("/new-custom", validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, upload.single("document"), newCustomEsignDocument);
|
||||
router.post("/distribute", validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, distributeDocument);
|
||||
router.post("/redistribute", validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, redistributeDocument);
|
||||
router.post("/delete", validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, deleteDocument);
|
||||
router.post("/view", validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, viewDocument);
|
||||
router.post("/webhook", esignWebhook);
|
||||
|
||||
Reference in New Issue
Block a user