Resolved object cloning issue for allocations on job close IO-431
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -37,6 +37,7 @@ client/yarn-error.log*
|
|||||||
admin/npm-debug.log*
|
admin/npm-debug.log*
|
||||||
admin/yarn-debug.log*
|
admin/yarn-debug.log*
|
||||||
admin/yarn-error.log*
|
admin/yarn-error.log*
|
||||||
|
client/.eslintcache
|
||||||
|
|
||||||
#Firebase Ignore
|
#Firebase Ignore
|
||||||
# Logs
|
# Logs
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export function BillFormComponent({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow grow>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="jobid"
|
name="jobid"
|
||||||
label={t("bills.fields.ro_number")}
|
label={t("bills.fields.ro_number")}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { connect } from "react-redux";
|
|||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import _ from "lodash";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -19,7 +19,7 @@ export function JobsCloseAutoAllocate({ bodyshop, joblines, form, disabled }) {
|
|||||||
|
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
joblines: joblines.map((jl) => {
|
joblines: joblines.map((jl) => {
|
||||||
const ret = jl;
|
const ret = _.cloneDeep(jl);
|
||||||
if (jl.part_type) {
|
if (jl.part_type) {
|
||||||
ret.profitcenter_part = defaults.profits[jl.part_type.toUpperCase()];
|
ret.profitcenter_part = defaults.profits[jl.part_type.toUpperCase()];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user