diff --git a/src/components/IOUConfirmationList.js b/src/components/IOUConfirmationList.js index 4f4eb415ed4b6..7e2de32e502df 100755 --- a/src/components/IOUConfirmationList.js +++ b/src/components/IOUConfirmationList.js @@ -57,8 +57,8 @@ const propTypes = { phoneNumber: PropTypes.string, })).isRequired, - /** Is this IOU associated with existing report */ - isIOUAttachedToExistingChatReport: PropTypes.bool.isRequired, + /** Can the participants be modified or not */ + canModifyParticipants: PropTypes.bool, ...windowDimensionsPropTypes, @@ -91,6 +91,7 @@ const defaultProps = { onUpdateComment: null, comment: '', iouType: CONST.IOU.IOU_TYPE.REQUEST, + canModifyParticipants: false, ...withCurrentUserPersonalDetailsDefaultProps, }; @@ -275,7 +276,7 @@ class IOUConfirmationList extends Component { const shouldShowSettlementButton = this.props.iouType === CONST.IOU.IOU_TYPE.SEND; const shouldDisableButton = selectedParticipants.length === 0; const recipient = this.state.participants[0]; - const canModifyParticipants = !this.props.isIOUAttachedToExistingChatReport && this.props.hasMultipleParticipants; + const canModifyParticipants = this.props.canModifyParticipants && this.props.hasMultipleParticipants; return ( )} diff --git a/src/pages/iou/steps/IOUConfirmPage.js b/src/pages/iou/steps/IOUConfirmPage.js index c14626399f2ca..7f69fc7ef9a12 100644 --- a/src/pages/iou/steps/IOUConfirmPage.js +++ b/src/pages/iou/steps/IOUConfirmPage.js @@ -43,14 +43,15 @@ const propTypes = { /** IOU type */ iouType: PropTypes.string, - /** Is this IOU associated with existing report */ - isIOUAttachedToExistingChatReport: PropTypes.bool.isRequired, + /** Can the participants be modified or not */ + canModifyParticipants: PropTypes.bool, }; const defaultProps = { onUpdateComment: null, comment: '', iouType: CONST.IOU.IOU_TYPE.REQUEST, + canModifyParticipants: false, }; const IOUConfirmPage = props => ( @@ -63,7 +64,7 @@ const IOUConfirmPage = props => ( onConfirm={props.onConfirm} onSendMoney={props.onSendMoney} iouType={props.iouType} - isIOUAttachedToExistingChatReport={props.isIOUAttachedToExistingChatReport} + canModifyParticipants={props.canModifyParticipants} /> );