Merged in release/2022-06-30 (pull request #531)
release/2022-06-30 Approved-by: Patrick Fic
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<babeledit_project version="1.2" be_version="2.7.1">
|
<babeledit_project be_version="2.7.1" version="1.2">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
BabelEdit project file
|
BabelEdit project file
|
||||||
|
|||||||
@@ -144,6 +144,14 @@ function BillEnterModalContainer({
|
|||||||
adjKeys.forEach((key) => {
|
adjKeys.forEach((key) => {
|
||||||
newAdjustments[key] =
|
newAdjustments[key] =
|
||||||
(newAdjustments[key] || 0) + adjustmentsToInsert[key];
|
(newAdjustments[key] || 0) + adjustmentsToInsert[key];
|
||||||
|
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: values.jobid,
|
||||||
|
operation: AuditTrailMapping.jobmodifylbradj({
|
||||||
|
mod_lbr_ty: key,
|
||||||
|
hours: adjustmentsToInsert[key],
|
||||||
|
}),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const jobUpdate = client.mutate({
|
const jobUpdate = client.mutate({
|
||||||
@@ -161,10 +169,6 @@ function BillEnterModalContainer({
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
insertAuditTrail({
|
|
||||||
jobid: values.jobid,
|
|
||||||
operation: AuditTrailMapping.jobmodifylbradj(),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const markPolReceived =
|
const markPolReceived =
|
||||||
|
|||||||
@@ -36,7 +36,12 @@ export default connect(
|
|||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(JobLineConvertToLabor);
|
)(JobLineConvertToLabor);
|
||||||
|
|
||||||
export function JobLineConvertToLabor({ jobline, job, ...otherBtnProps }) {
|
export function JobLineConvertToLabor({
|
||||||
|
jobline,
|
||||||
|
job,
|
||||||
|
insertAuditTrail,
|
||||||
|
...otherBtnProps
|
||||||
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@@ -99,7 +104,10 @@ export function JobLineConvertToLabor({ jobline, job, ...otherBtnProps }) {
|
|||||||
}
|
}
|
||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: values.jobid,
|
jobid: values.jobid,
|
||||||
operation: AuditTrailMapping.jobmodifylbradj(),
|
operation: AuditTrailMapping.jobmodifylbradj({
|
||||||
|
hours: calculateAdjustment({ mod_lbr_ty, job, jobline }),
|
||||||
|
mod_lbr_ty,
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
setVisibility(false);
|
setVisibility(false);
|
||||||
|
|||||||
@@ -12,7 +12,24 @@ import React, { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||||
|
|
||||||
export default function LaborAllocationsAdjustmentEdit({
|
import { connect } from "react-redux";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
//currentUser: selectCurrentUser
|
||||||
|
});
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
insertAuditTrail: ({ jobid, operation }) =>
|
||||||
|
dispatch(insertAuditTrail({ jobid, operation })),
|
||||||
|
});
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(LaborAllocationsAdjustmentEdit);
|
||||||
|
|
||||||
|
export function LaborAllocationsAdjustmentEdit({
|
||||||
|
insertAuditTrail,
|
||||||
jobId,
|
jobId,
|
||||||
mod_lbr_ty,
|
mod_lbr_ty,
|
||||||
adjustments,
|
adjustments,
|
||||||
@@ -51,6 +68,13 @@ export default function LaborAllocationsAdjustmentEdit({
|
|||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("jobs.successes.save"),
|
message: t("jobs.successes.save"),
|
||||||
});
|
});
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: values.jobid,
|
||||||
|
operation: AuditTrailMapping.jobmodifylbradj({
|
||||||
|
mod_lbr_ty: values.mod_lbr_ty,
|
||||||
|
hours: values.hours - ((adjustments && adjustments[mod_lbr_ty]) || 0),
|
||||||
|
}),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
|
|||||||
@@ -124,6 +124,15 @@ export function PartsOrderModalComponent({
|
|||||||
<Checkbox />
|
<Checkbox />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
{OEConnection.treatment === "on" && !isReturn && (
|
||||||
|
<Form.Item
|
||||||
|
name="is_quote"
|
||||||
|
label={t("parts_orders.labels.is_quote")}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Checkbox />
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<Divider orientation="left">
|
<Divider orientation="left">
|
||||||
{t("parts_orders.labels.inthisorder")}
|
{t("parts_orders.labels.inthisorder")}
|
||||||
@@ -290,15 +299,6 @@ export function PartsOrderModalComponent({
|
|||||||
>
|
>
|
||||||
<Input.TextArea rows={3} />
|
<Input.TextArea rows={3} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{OEConnection.treatment === "on" && !isReturn && (
|
|
||||||
<Form.Item
|
|
||||||
name="is_quote"
|
|
||||||
label={t("parts_orders.labels.is_quote")}
|
|
||||||
valuePropName="checked"
|
|
||||||
>
|
|
||||||
<Checkbox />
|
|
||||||
</Form.Item>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Form.Item noStyle shouldUpdate>
|
<Form.Item noStyle shouldUpdate>
|
||||||
{() => {
|
{() => {
|
||||||
|
|||||||
@@ -125,6 +125,11 @@ export function PartsOrderModalContainer({
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
notification["success"]({
|
||||||
|
message: values.isReturn
|
||||||
|
? t("parts_orders.successes.return_created")
|
||||||
|
: t("parts_orders.successes.created"),
|
||||||
|
});
|
||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: jobId,
|
jobid: jobId,
|
||||||
operation: isReturn
|
operation: isReturn
|
||||||
@@ -168,12 +173,6 @@ export function PartsOrderModalContainer({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
notification["success"]({
|
|
||||||
message: values.isReturn
|
|
||||||
? t("parts_orders.successes.return_created")
|
|
||||||
: t("parts_orders.successes.created"),
|
|
||||||
});
|
|
||||||
|
|
||||||
if (values.vendorid === bodyshop.inhousevendorid) {
|
if (values.vendorid === bodyshop.inhousevendorid) {
|
||||||
setBillEnterContext({
|
setBillEnterContext({
|
||||||
actions: { refetch: refetch },
|
actions: { refetch: refetch },
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ export function PartsQueuePageComponent({ bodyshop }) {
|
|||||||
key: "queued_for_parts",
|
key: "queued_for_parts",
|
||||||
sorter: (a, b) => a.queued_for_parts - b.queued_for_parts,
|
sorter: (a, b) => a.queued_for_parts - b.queued_for_parts,
|
||||||
sortOrder: sortcolumn === "queued_for_parts" && sortorder,
|
sortOrder: sortcolumn === "queued_for_parts" && sortorder,
|
||||||
filteredValue: filter.queued_for_parts || null,
|
filteredValue: filter?.queued_for_parts || null,
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
text: "Queued",
|
text: "Queued",
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
"jobimported": "Job imported.",
|
"jobimported": "Job imported.",
|
||||||
"jobinproductionchange": "Job production status set to {{inproduction}}",
|
"jobinproductionchange": "Job production status set to {{inproduction}}",
|
||||||
"jobioucreated": "IOU Created.",
|
"jobioucreated": "IOU Created.",
|
||||||
"jobmodifylbradj": "Labor adjustments modified.",
|
"jobmodifylbradj": "Labor adjustments modified {{mod_lbr_ty}} / {{hours}}.",
|
||||||
"jobnoteadded": "Note added to job.",
|
"jobnoteadded": "Note added to job.",
|
||||||
"jobnotedeleted": "Note deleted from job.",
|
"jobnotedeleted": "Note deleted from job.",
|
||||||
"jobnoteupdated": "Note updated on job.",
|
"jobnoteupdated": "Note updated on job.",
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ const AuditTrailMapping = {
|
|||||||
i18n.t("audit_trail.messages.jobspartsorder", { order_number }),
|
i18n.t("audit_trail.messages.jobspartsorder", { order_number }),
|
||||||
jobspartsreturn: (order_number) =>
|
jobspartsreturn: (order_number) =>
|
||||||
i18n.t("audit_trail.messages.jobspartsreturn", { order_number }),
|
i18n.t("audit_trail.messages.jobspartsreturn", { order_number }),
|
||||||
jobmodifylbradj: () => i18n.t("audit_trail.messages.jobmodifylbradj", {}),
|
jobmodifylbradj: ({ mod_lbr_ty, hours }) =>
|
||||||
|
i18n.t("audit_trail.messages.jobmodifylbradj", { mod_lbr_ty, hours }),
|
||||||
billposted: (invoice_number) =>
|
billposted: (invoice_number) =>
|
||||||
i18n.t("audit_trail.messages.billposted", { invoice_number }),
|
i18n.t("audit_trail.messages.billposted", { invoice_number }),
|
||||||
billupdated: (invoice_number) =>
|
billupdated: (invoice_number) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user