Resolved object cloning issue for allocations on job close IO-431

This commit is contained in:
Patrick Fic
2020-12-02 14:38:23 -08:00
parent cf5b9ce215
commit 2a96c5deaa
3 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@@ -37,6 +37,7 @@ client/yarn-error.log*
admin/npm-debug.log*
admin/yarn-debug.log*
admin/yarn-error.log*
client/.eslintcache
#Firebase Ignore
# Logs

View File

@@ -65,7 +65,7 @@ export function BillFormComponent({
return (
<div>
<LayoutFormRow>
<LayoutFormRow grow>
<Form.Item
name="jobid"
label={t("bills.fields.ro_number")}

View File

@@ -5,7 +5,7 @@ import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { logImEXEvent } from "../../firebase/firebase.utils";
import { selectBodyshop } from "../../redux/user/user.selectors";
import _ from "lodash";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
@@ -19,7 +19,7 @@ export function JobsCloseAutoAllocate({ bodyshop, joblines, form, disabled }) {
form.setFieldsValue({
joblines: joblines.map((jl) => {
const ret = jl;
const ret = _.cloneDeep(jl);
if (jl.part_type) {
ret.profitcenter_part = defaults.profits[jl.part_type.toUpperCase()];
} else {