Skip to content

Commit

Permalink
Merge pull request #108 from openimis/feature/OP-1699
Browse files Browse the repository at this point in the history
OP-1699: if no family, update insuree and save family
  • Loading branch information
delcroip authored Dec 15, 2023
2 parents 6ae3d4a + 5da4671 commit 3003f2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/InsureeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ class InsureeForm extends Component {
};
});
}

if (!this.state.insuree.family && this.props.family) {
const updatedInsuree = { ...this.state.insuree, family: this.props.family };
this.setState({ insuree: updatedInsuree });
}
}

componentWillUnmount = () => {
Expand Down

0 comments on commit 3003f2e

Please sign in to comment.