Resolved object cloning issue for allocations on job close IO-431
This commit is contained in:
@@ -65,7 +65,7 @@ export function BillFormComponent({
|
||||
|
||||
return (
|
||||
<div>
|
||||
<LayoutFormRow>
|
||||
<LayoutFormRow grow>
|
||||
<Form.Item
|
||||
name="jobid"
|
||||
label={t("bills.fields.ro_number")}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user