Add audit log to job close with bypass.
This commit is contained in:
@@ -1789,6 +1789,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>jobclosedwithbypass</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>jobconverted</name>
|
<name>jobconverted</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -34608,27 +34629,6 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>ro_guard</name>
|
<name>ro_guard</name>
|
||||||
<children>
|
<children>
|
||||||
<concept_node>
|
|
||||||
<name>eforce_profit</name>
|
|
||||||
<definition_loaded>false</definition_loaded>
|
|
||||||
<description></description>
|
|
||||||
<comment></comment>
|
|
||||||
<default_text></default_text>
|
|
||||||
<translations>
|
|
||||||
<translation>
|
|
||||||
<language>en-US</language>
|
|
||||||
<approved>false</approved>
|
|
||||||
</translation>
|
|
||||||
<translation>
|
|
||||||
<language>es-MX</language>
|
|
||||||
<approved>false</approved>
|
|
||||||
</translation>
|
|
||||||
<translation>
|
|
||||||
<language>fr-CA</language>
|
|
||||||
<approved>false</approved>
|
|
||||||
</translation>
|
|
||||||
</translations>
|
|
||||||
</concept_node>
|
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>enforce_ar</name>
|
<name>enforce_ar</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -34734,6 +34734,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>enforce_profit</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>enforce_sublet</name>
|
<name>enforce_sublet</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import { insertAuditTrail } from "../../redux/application/application.actions";
|
|||||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
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({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -120,6 +120,13 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) {
|
|||||||
operation: AuditTrailMapping.jobinvoiced(),
|
operation: AuditTrailMapping.jobinvoiced(),
|
||||||
type: "jobinvoiced"
|
type: "jobinvoiced"
|
||||||
});
|
});
|
||||||
|
if (values.masterbypass) {
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: job.id,
|
||||||
|
operation: AuditTrailMapping.jobclosedwithbypass(),
|
||||||
|
type: "jobclosedwithbypass"
|
||||||
|
});
|
||||||
|
}
|
||||||
// history(`/manage/jobs/${job.id}`);
|
// history(`/manage/jobs/${job.id}`);
|
||||||
} else {
|
} else {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -184,7 +191,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) {
|
|||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<JobCloseRoGuardContainer form={form} job={job} />
|
<JobCloseRoGuardContainer form={form} job={job} />
|
||||||
<Space wrap direction="vertical" style={{ width: "100%" }}>
|
<Space wrap direction="vertical" style={{ width: "100%" }}>
|
||||||
<FormsFieldChanged form={form} />
|
<FormsFieldChanged form={form} />
|
||||||
{!job.actual_in && job.scheduled_in && <Alert type="warning" message={t("jobs.labels.actual_in_inferred")} />}
|
{!job.actual_in && job.scheduled_in && <Alert type="warning" message={t("jobs.labels.actual_in_inferred")} />}
|
||||||
|
|||||||
@@ -116,6 +116,7 @@
|
|||||||
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
|
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
|
||||||
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
|
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
|
||||||
"jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.",
|
"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}}.",
|
"jobconverted": "Job converted and assigned number {{ro_number}}.",
|
||||||
"jobdelivery": "Job intake completed. Status set to {{status}}. Actual completion is {{actual_completion}}.",
|
"jobdelivery": "Job intake completed. Status set to {{status}}. Actual completion is {{actual_completion}}.",
|
||||||
"jobexported": "",
|
"jobexported": "",
|
||||||
@@ -2025,12 +2026,12 @@
|
|||||||
"remove_from_ar": "Remove from AR",
|
"remove_from_ar": "Remove from AR",
|
||||||
"returntotals": "Return Totals",
|
"returntotals": "Return Totals",
|
||||||
"ro_guard": {
|
"ro_guard": {
|
||||||
"eforce_profit": "Profit margins enforced.",
|
|
||||||
"enforce_ar": "AR collection enforced.",
|
"enforce_ar": "AR collection enforced.",
|
||||||
"enforce_bills": "Bill discrepancy enforced.",
|
"enforce_bills": "Bill discrepancy enforced.",
|
||||||
"enforce_cm": "Credit memo entry enforced.",
|
"enforce_cm": "Credit memo entry enforced.",
|
||||||
"enforce_labor": "Labor allocations enforced.",
|
"enforce_labor": "Labor allocations enforced.",
|
||||||
"enforce_ppd": "PPD sync enforced.",
|
"enforce_ppd": "PPD sync enforced.",
|
||||||
|
"enforce_profit": "Profit margins enforced.",
|
||||||
"enforce_sublet": "Sublet completion enforced.",
|
"enforce_sublet": "Sublet completion enforced.",
|
||||||
"enforce_validation": "Master Bypass Required: {{message}}",
|
"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."
|
"enforced": "This check has been enforced by your shop manager. Enter the master bypass password to close the Job."
|
||||||
|
|||||||
@@ -116,6 +116,7 @@
|
|||||||
"jobassignmentchange": "",
|
"jobassignmentchange": "",
|
||||||
"jobassignmentremoved": "",
|
"jobassignmentremoved": "",
|
||||||
"jobchecklist": "",
|
"jobchecklist": "",
|
||||||
|
"jobclosedwithbypass": "",
|
||||||
"jobconverted": "",
|
"jobconverted": "",
|
||||||
"jobdelivery": "",
|
"jobdelivery": "",
|
||||||
"jobexported": "",
|
"jobexported": "",
|
||||||
@@ -2025,12 +2026,12 @@
|
|||||||
"remove_from_ar": "",
|
"remove_from_ar": "",
|
||||||
"returntotals": "",
|
"returntotals": "",
|
||||||
"ro_guard": {
|
"ro_guard": {
|
||||||
"eforce_profit": "",
|
|
||||||
"enforce_ar": "",
|
"enforce_ar": "",
|
||||||
"enforce_bills": "",
|
"enforce_bills": "",
|
||||||
"enforce_cm": "",
|
"enforce_cm": "",
|
||||||
"enforce_labor": "",
|
"enforce_labor": "",
|
||||||
"enforce_ppd": "",
|
"enforce_ppd": "",
|
||||||
|
"enforce_profit": "",
|
||||||
"enforce_sublet": "",
|
"enforce_sublet": "",
|
||||||
"enforce_validation": "",
|
"enforce_validation": "",
|
||||||
"enforced": ""
|
"enforced": ""
|
||||||
|
|||||||
@@ -116,6 +116,7 @@
|
|||||||
"jobassignmentchange": "",
|
"jobassignmentchange": "",
|
||||||
"jobassignmentremoved": "",
|
"jobassignmentremoved": "",
|
||||||
"jobchecklist": "",
|
"jobchecklist": "",
|
||||||
|
"jobclosedwithbypass": "",
|
||||||
"jobconverted": "",
|
"jobconverted": "",
|
||||||
"jobdelivery": "",
|
"jobdelivery": "",
|
||||||
"jobexported": "",
|
"jobexported": "",
|
||||||
@@ -2025,12 +2026,12 @@
|
|||||||
"remove_from_ar": "",
|
"remove_from_ar": "",
|
||||||
"returntotals": "",
|
"returntotals": "",
|
||||||
"ro_guard": {
|
"ro_guard": {
|
||||||
"eforce_profit": "",
|
|
||||||
"enforce_ar": "",
|
"enforce_ar": "",
|
||||||
"enforce_bills": "",
|
"enforce_bills": "",
|
||||||
"enforce_cm": "",
|
"enforce_cm": "",
|
||||||
"enforce_labor": "",
|
"enforce_labor": "",
|
||||||
"enforce_ppd": "",
|
"enforce_ppd": "",
|
||||||
|
"enforce_profit": "",
|
||||||
"enforce_sublet": "",
|
"enforce_sublet": "",
|
||||||
"enforce_validation": "",
|
"enforce_validation": "",
|
||||||
"enforced": ""
|
"enforced": ""
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ const AuditTrailMapping = {
|
|||||||
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
|
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
|
||||||
jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
|
jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
|
||||||
jobinvoiced: () => i18n.t("audit_trail.messages.jobinvoiced"),
|
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 }),
|
jobmodifylbradj: ({ mod_lbr_ty, hours }) => i18n.t("audit_trail.messages.jobmodifylbradj", { mod_lbr_ty, hours }),
|
||||||
jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"),
|
jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"),
|
||||||
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
|
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
|
||||||
|
|||||||
Reference in New Issue
Block a user