From 115a1c963f4bb9378001a696199c38bf426d47e7 Mon Sep 17 00:00:00 2001 From: Prashant Mangukiya Date: Fri, 15 Oct 2021 23:25:27 +0530 Subject: [PATCH 1/3] Updated logic to not allow attendee deselection from bill split confirmation page. --- src/components/IOUConfirmationList.js | 5 ++++- src/pages/iou/IOUModal.js | 1 + src/pages/iou/steps/IOUConfirmPage.js | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/IOUConfirmationList.js b/src/components/IOUConfirmationList.js index 8c98d99a0b57..ccbce60460d2 100755 --- a/src/components/IOUConfirmationList.js +++ b/src/components/IOUConfirmationList.js @@ -65,6 +65,9 @@ const propTypes = { phoneNumber: PropTypes.string, })).isRequired, + /** Amount split belongs to group or not */ + isGroupSplit: PropTypes.bool.isRequired, + ...windowDimensionsPropTypes, ...withLocalizePropTypes, @@ -411,7 +414,7 @@ class IOUConfirmationList extends Component { canSelectMultipleOptions={this.props.hasMultipleParticipants} selectedOptions={this.getSelectedOptions()} onSelectRow={toggleOption} - disableRowInteractivity={!this.props.hasMultipleParticipants} + disableRowInteractivity={!this.props.isGroupSplit} optionHoveredStyle={hoverStyle} /> diff --git a/src/pages/iou/IOUModal.js b/src/pages/iou/IOUModal.js index f040e6bd4fd6..93f1b1269fcd 100755 --- a/src/pages/iou/IOUModal.js +++ b/src/pages/iou/IOUModal.js @@ -356,6 +356,7 @@ class IOUModal extends Component { onUpdateComment={this.updateComment} iouType={this.props.iouType} localCurrencyCode={this.props.myPersonalDetails.localCurrencyCode} + isGroupSplit={this.steps.length === 2} /> )} diff --git a/src/pages/iou/steps/IOUConfirmPage.js b/src/pages/iou/steps/IOUConfirmPage.js index 8ddcb864fff1..b4b363fe1364 100644 --- a/src/pages/iou/steps/IOUConfirmPage.js +++ b/src/pages/iou/steps/IOUConfirmPage.js @@ -40,6 +40,9 @@ const propTypes = { /** IOU type */ iouType: PropTypes.string, + + /** Amount split belongs to group or not */ + isGroupSplit: PropTypes.bool.isRequired, }; const defaultProps = { @@ -59,6 +62,7 @@ const IOUConfirmPage = props => ( onConfirm={props.onConfirm} iouType={props.iouType} localCurrencyCode={props.localCurrencyCode} + isGroupSplit={props.isGroupSplit} /> ); From e778c017d42a860c2a177529aeccff84ebe107a6 Mon Sep 17 00:00:00 2001 From: Prashant Mangukiya Date: Sat, 16 Oct 2021 11:22:01 +0530 Subject: [PATCH 2/3] Improved instruction for isGroupSplit prop --- src/components/IOUConfirmationList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/IOUConfirmationList.js b/src/components/IOUConfirmationList.js index ccbce60460d2..3d225c5a51fc 100755 --- a/src/components/IOUConfirmationList.js +++ b/src/components/IOUConfirmationList.js @@ -65,7 +65,7 @@ const propTypes = { phoneNumber: PropTypes.string, })).isRequired, - /** Amount split belongs to group or not */ + /** Whether this is an IOU split and belongs to a group report */ isGroupSplit: PropTypes.bool.isRequired, ...windowDimensionsPropTypes, From cb27361460cd0d00c63b46352ad568fbf171a4be Mon Sep 17 00:00:00 2001 From: Prashant Mangukiya Date: Sat, 16 Oct 2021 15:03:23 +0530 Subject: [PATCH 3/3] Changed props instruction on IOUConfirmPage.js --- src/pages/iou/steps/IOUConfirmPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/steps/IOUConfirmPage.js b/src/pages/iou/steps/IOUConfirmPage.js index b4b363fe1364..faf91a48ceea 100644 --- a/src/pages/iou/steps/IOUConfirmPage.js +++ b/src/pages/iou/steps/IOUConfirmPage.js @@ -41,7 +41,7 @@ const propTypes = { /** IOU type */ iouType: PropTypes.string, - /** Amount split belongs to group or not */ + /** Whether this is an IOU split and belongs to a group report */ isGroupSplit: PropTypes.bool.isRequired, };