Merged in release/2021-09-24 (pull request #223)
release/2021-09-24 Approved-by: Patrick Fic
This commit is contained in:
@@ -1369,6 +1369,69 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>jobnoteadded</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>
|
||||||
|
<name>jobnotedeleted</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>
|
||||||
|
<name>jobnoteupdated</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>jobspartsorder</name>
|
<name>jobspartsorder</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
|||||||
text: t("courtesycars.status.out"),
|
text: t("courtesycars.status.out"),
|
||||||
value: "courtesycars.status.out",
|
value: "courtesycars.status.out",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: t("courtesycars.status.sold"),
|
||||||
|
value: "courtesycars.status.sold",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
onFilter: (value, record) => value.includes(record.status),
|
onFilter: (value, record) => value.includes(record.status),
|
||||||
sortOrder:
|
sortOrder:
|
||||||
|
|||||||
@@ -10,8 +10,21 @@ import {
|
|||||||
QUERY_NOTES_BY_JOB_PK,
|
QUERY_NOTES_BY_JOB_PK,
|
||||||
} from "../../graphql/notes.queries";
|
} from "../../graphql/notes.queries";
|
||||||
import JobNotesComponent from "./jobs.notes.component";
|
import JobNotesComponent from "./jobs.notes.component";
|
||||||
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
|
||||||
export default function JobNotesContainer({ jobId }) {
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
//currentUser: selectCurrentUser
|
||||||
|
});
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
insertAuditTrail: ({ jobid, operation }) =>
|
||||||
|
dispatch(insertAuditTrail({ jobid, operation })),
|
||||||
|
});
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(JobNotesContainer);
|
||||||
|
|
||||||
|
export function JobNotesContainer({ jobId, insertAuditTrail }) {
|
||||||
const { loading, error, data, refetch } = useQuery(QUERY_NOTES_BY_JOB_PK, {
|
const { loading, error, data, refetch } = useQuery(QUERY_NOTES_BY_JOB_PK, {
|
||||||
variables: { id: jobId },
|
variables: { id: jobId },
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
@@ -32,6 +45,10 @@ export default function JobNotesContainer({ jobId }) {
|
|||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("notes.successes.deleted"),
|
message: t("notes.successes.deleted"),
|
||||||
});
|
});
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: jobId,
|
||||||
|
operation: AuditTrailMapping.jobnotedeleted(),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
setDeleteLoading(false);
|
setDeleteLoading(false);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import { selectNoteUpsert } from "../../redux/modals/modals.selectors";
|
|||||||
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||||
import NoteUpsertModalComponent from "./note-upsert-modal.component";
|
import NoteUpsertModalComponent from "./note-upsert-modal.component";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
currentUser: selectCurrentUser,
|
currentUser: selectCurrentUser,
|
||||||
@@ -17,12 +19,15 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
toggleModalVisible: () => dispatch(toggleModalVisible("noteUpsert")),
|
toggleModalVisible: () => dispatch(toggleModalVisible("noteUpsert")),
|
||||||
|
insertAuditTrail: ({ jobid, operation }) =>
|
||||||
|
dispatch(insertAuditTrail({ jobid, operation })),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function NoteUpsertModalContainer({
|
export function NoteUpsertModalContainer({
|
||||||
currentUser,
|
currentUser,
|
||||||
noteUpsertModal,
|
noteUpsertModal,
|
||||||
toggleModalVisible,
|
toggleModalVisible,
|
||||||
|
insertAuditTrail,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [insertNote] = useMutation(INSERT_NEW_NOTE);
|
const [insertNote] = useMutation(INSERT_NEW_NOTE);
|
||||||
@@ -56,6 +61,10 @@ export function NoteUpsertModalContainer({
|
|||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("notes.successes.updated"),
|
message: t("notes.successes.updated"),
|
||||||
});
|
});
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: context.jobId,
|
||||||
|
operation: AuditTrailMapping.jobnoteupdated(),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
if (refetch) refetch();
|
if (refetch) refetch();
|
||||||
toggleModalVisible();
|
toggleModalVisible();
|
||||||
@@ -75,6 +84,10 @@ export function NoteUpsertModalContainer({
|
|||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("notes.successes.create"),
|
message: t("notes.successes.create"),
|
||||||
});
|
});
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: context.jobId,
|
||||||
|
operation: AuditTrailMapping.jobnoteadded(),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
|
|||||||
<Typography.Title level={4}>
|
<Typography.Title level={4}>
|
||||||
{t(`reportcenter.labels.groups.${key}`)}
|
{t(`reportcenter.labels.groups.${key}`)}
|
||||||
</Typography.Title>
|
</Typography.Title>
|
||||||
<ul style={{ columns: "3 auto" }}>
|
<ul style={{ columns: "2 auto" }}>
|
||||||
{grouped[key].map((item) => (
|
{grouped[key].map((item) => (
|
||||||
<li key={item.key}>
|
<li key={item.key}>
|
||||||
<Radio key={item.key} value={item.key}>
|
<Radio key={item.key} value={item.key}>
|
||||||
|
|||||||
@@ -96,6 +96,9 @@
|
|||||||
"jobimported": "Job imported.",
|
"jobimported": "Job imported.",
|
||||||
"jobinproductionchange": "Job production status set to {{inproduction}}",
|
"jobinproductionchange": "Job production status set to {{inproduction}}",
|
||||||
"jobmodifylbradj": "Labor adjustments modified.",
|
"jobmodifylbradj": "Labor adjustments modified.",
|
||||||
|
"jobnoteadded": "Note added to job.",
|
||||||
|
"jobnotedeleted": "Note deleted from job.",
|
||||||
|
"jobnoteupdated": "Note updated on job.",
|
||||||
"jobspartsorder": "Parts order {{order_number}} added to job.",
|
"jobspartsorder": "Parts order {{order_number}} added to job.",
|
||||||
"jobspartsreturn": "Parts return {{order_number}} added to job.",
|
"jobspartsreturn": "Parts return {{order_number}} added to job.",
|
||||||
"jobstatuschange": "Job status changed to {{status}}.",
|
"jobstatuschange": "Job status changed to {{status}}.",
|
||||||
|
|||||||
@@ -96,6 +96,9 @@
|
|||||||
"jobimported": "",
|
"jobimported": "",
|
||||||
"jobinproductionchange": "",
|
"jobinproductionchange": "",
|
||||||
"jobmodifylbradj": "",
|
"jobmodifylbradj": "",
|
||||||
|
"jobnoteadded": "",
|
||||||
|
"jobnotedeleted": "",
|
||||||
|
"jobnoteupdated": "",
|
||||||
"jobspartsorder": "",
|
"jobspartsorder": "",
|
||||||
"jobspartsreturn": "",
|
"jobspartsreturn": "",
|
||||||
"jobstatuschange": "",
|
"jobstatuschange": "",
|
||||||
|
|||||||
@@ -96,6 +96,9 @@
|
|||||||
"jobimported": "",
|
"jobimported": "",
|
||||||
"jobinproductionchange": "",
|
"jobinproductionchange": "",
|
||||||
"jobmodifylbradj": "",
|
"jobmodifylbradj": "",
|
||||||
|
"jobnoteadded": "",
|
||||||
|
"jobnotedeleted": "",
|
||||||
|
"jobnoteupdated": "",
|
||||||
"jobspartsorder": "",
|
"jobspartsorder": "",
|
||||||
"jobspartsreturn": "",
|
"jobspartsreturn": "",
|
||||||
"jobstatuschange": "",
|
"jobstatuschange": "",
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ const AuditTrailMapping = {
|
|||||||
i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
|
i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
|
||||||
jobchecklist: (type, inproduction, status) =>
|
jobchecklist: (type, inproduction, status) =>
|
||||||
i18n.t("audit_trail.messages.jobchecklist", { type, inproduction, status }),
|
i18n.t("audit_trail.messages.jobchecklist", { type, inproduction, status }),
|
||||||
|
jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"),
|
||||||
|
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
|
||||||
|
jobnotedeleted: () => i18n.t("audit_trail.messages.jobnotedeleted"),
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AuditTrailMapping;
|
export default AuditTrailMapping;
|
||||||
|
|||||||
@@ -1226,7 +1226,7 @@ export const TemplateList = (type, context) => {
|
|||||||
object: i18n.t("reportcenter.labels.objects.jobs"),
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
field: i18n.t("jobs.fields.date_open"),
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
},
|
},
|
||||||
group: "jobs",
|
group: "payroll",
|
||||||
},
|
},
|
||||||
work_in_progress_labour: {
|
work_in_progress_labour: {
|
||||||
title: i18n.t("reportcenter.templates.work_in_progress_labour"),
|
title: i18n.t("reportcenter.templates.work_in_progress_labour"),
|
||||||
@@ -1278,7 +1278,7 @@ export const TemplateList = (type, context) => {
|
|||||||
object: i18n.t("reportcenter.labels.objects.parts_orders"),
|
object: i18n.t("reportcenter.labels.objects.parts_orders"),
|
||||||
field: i18n.t("parts_orders.fields.order_date"),
|
field: i18n.t("parts_orders.fields.order_date"),
|
||||||
},
|
},
|
||||||
group: "jobs",
|
group: "purchases",
|
||||||
},
|
},
|
||||||
scoreboard_detail: {
|
scoreboard_detail: {
|
||||||
title: i18n.t("reportcenter.templates.scoreboard_detail"),
|
title: i18n.t("reportcenter.templates.scoreboard_detail"),
|
||||||
@@ -1330,7 +1330,7 @@ export const TemplateList = (type, context) => {
|
|||||||
object: i18n.t("reportcenter.labels.objects.csi"),
|
object: i18n.t("reportcenter.labels.objects.csi"),
|
||||||
field: i18n.t("csi.fields.created_at"), // Also date invoice.
|
field: i18n.t("csi.fields.created_at"), // Also date invoice.
|
||||||
},
|
},
|
||||||
group: "jobs",
|
group: "customers",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
|
|||||||
Reference in New Issue
Block a user