Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO QA] Pass personal policyID to InboxCallUser #3773

Merged
merged 8 commits into from
Jul 7, 2021
15 changes: 14 additions & 1 deletion src/pages/RequestCallPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ const propTypes = {
partnerUserID: PropTypes.string,
})),
}).isRequired,

/** The policies which the user has access to */
policies: PropTypes.shape({
/** ID of the policy */
policyID: PropTypes.string,

/** The type of the policy */
type: PropTypes.string,
}).isRequired,
};

class RequestCallPage extends Component {
Expand Down Expand Up @@ -70,7 +79,8 @@ class RequestCallPage extends Component {
return;
}

requestConciergeDMCall('', this.state.firstName, this.state.lastName, this.state.phoneNumber)
const personalPolicyID = _.find(this.props.policies, policy => policy.type === 'personal').id;
jasperhuangg marked this conversation as resolved.
Show resolved Hide resolved
requestConciergeDMCall(personalPolicyID, this.state.firstName, this.state.lastName, this.state.phoneNumber)
.then((result) => {
this.setState({isLoading: false});
if (result.jsonCode === 200) {
Expand Down Expand Up @@ -167,5 +177,8 @@ export default compose(
user: {
key: ONYXKEYS.USER,
},
policies: {
key: ONYXKEYS.COLLECTION.POLICY,
},
}),
)(RequestCallPage);