diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 3d2e3dca2..9887c892f 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -1789,6 +1789,27 @@ + + jobclosedwithbypass + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + jobconverted false @@ -34608,27 +34629,6 @@ ro_guard - - eforce_profit - false - - - - - - en-US - false - - - es-MX - false - - - fr-CA - false - - - enforce_ar false @@ -34734,6 +34734,27 @@ + + enforce_profit + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + enforce_sublet false diff --git a/client/src/pages/jobs-close/jobs-close.component.jsx b/client/src/pages/jobs-close/jobs-close.component.jsx index 102ba0611..2585a8254 100644 --- a/client/src/pages/jobs-close/jobs-close.component.jsx +++ b/client/src/pages/jobs-close/jobs-close.component.jsx @@ -41,7 +41,7 @@ import { insertAuditTrail } from "../../redux/application/application.actions"; import { selectJobReadOnly } from "../../redux/application/application.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors"; import AuditTrailMapping from "../../utils/AuditTrailMappings"; -import JobCloseRoGuardContainer from '../../components/job-close-ro-guard/job-close-ro-guard.container'; +import JobCloseRoGuardContainer from "../../components/job-close-ro-guard/job-close-ro-guard.container"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -120,6 +120,13 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) { operation: AuditTrailMapping.jobinvoiced(), type: "jobinvoiced" }); + if (values.masterbypass) { + insertAuditTrail({ + jobid: job.id, + operation: AuditTrailMapping.jobclosedwithbypass(), + type: "jobclosedwithbypass" + }); + } // history(`/manage/jobs/${job.id}`); } else { setLoading(false); @@ -184,7 +191,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) { } /> - + {!job.actual_in && job.scheduled_in && } diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index ff2b0e2c1..0bddaaa70 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -116,6 +116,7 @@ "jobassignmentchange": "Employee {{name}} assigned to {{operation}}", "jobassignmentremoved": "Employee assignment removed for {{operation}}", "jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.", + "jobclosedwithbypass": "Job was invoiced using the master bypass password. ", "jobconverted": "Job converted and assigned number {{ro_number}}.", "jobdelivery": "Job intake completed. Status set to {{status}}. Actual completion is {{actual_completion}}.", "jobexported": "", @@ -2025,12 +2026,12 @@ "remove_from_ar": "Remove from AR", "returntotals": "Return Totals", "ro_guard": { - "eforce_profit": "Profit margins enforced.", "enforce_ar": "AR collection enforced.", "enforce_bills": "Bill discrepancy enforced.", "enforce_cm": "Credit memo entry enforced.", "enforce_labor": "Labor allocations enforced.", "enforce_ppd": "PPD sync enforced.", + "enforce_profit": "Profit margins enforced.", "enforce_sublet": "Sublet completion enforced.", "enforce_validation": "Master Bypass Required: {{message}}", "enforced": "This check has been enforced by your shop manager. Enter the master bypass password to close the Job." diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 72c5de71b..92df26cdc 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -116,6 +116,7 @@ "jobassignmentchange": "", "jobassignmentremoved": "", "jobchecklist": "", + "jobclosedwithbypass": "", "jobconverted": "", "jobdelivery": "", "jobexported": "", @@ -2025,12 +2026,12 @@ "remove_from_ar": "", "returntotals": "", "ro_guard": { - "eforce_profit": "", "enforce_ar": "", "enforce_bills": "", "enforce_cm": "", "enforce_labor": "", "enforce_ppd": "", + "enforce_profit": "", "enforce_sublet": "", "enforce_validation": "", "enforced": "" diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 4bc52d79f..9f766d929 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -116,6 +116,7 @@ "jobassignmentchange": "", "jobassignmentremoved": "", "jobchecklist": "", + "jobclosedwithbypass": "", "jobconverted": "", "jobdelivery": "", "jobexported": "", @@ -2025,12 +2026,12 @@ "remove_from_ar": "", "returntotals": "", "ro_guard": { - "eforce_profit": "", "enforce_ar": "", "enforce_bills": "", "enforce_cm": "", "enforce_labor": "", "enforce_ppd": "", + "enforce_profit": "", "enforce_sublet": "", "enforce_validation": "", "enforced": "" diff --git a/client/src/utils/AuditTrailMappings.js b/client/src/utils/AuditTrailMappings.js index f2de52319..62f3d6133 100644 --- a/client/src/utils/AuditTrailMappings.js +++ b/client/src/utils/AuditTrailMappings.js @@ -24,6 +24,7 @@ const AuditTrailMapping = { jobimported: () => i18n.t("audit_trail.messages.jobimported"), jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }), jobinvoiced: () => i18n.t("audit_trail.messages.jobinvoiced"), + jobclosedwithbypass: () => i18n.t("audit_trail.messages.jobclosedwithbypass"), jobmodifylbradj: ({ mod_lbr_ty, hours }) => i18n.t("audit_trail.messages.jobmodifylbradj", { mod_lbr_ty, hours }), jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"), jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),