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

Build read-only bill split details page #19390

Merged
merged 54 commits into from
May 26, 2023
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c590fe6
add split details route
luacmartins May 18, 2023
b84cb09
create details page
luacmartins May 18, 2023
08e5ec1
update route
luacmartins May 18, 2023
bf8f3d8
pass chatReportID to route
luacmartins May 18, 2023
bd6a0dc
add SplitBillDetailsPage
luacmartins May 18, 2023
c5900ac
update page
luacmartins May 18, 2023
c1b2bec
use right participants
luacmartins May 18, 2023
46fdadd
rm unused prop
luacmartins May 18, 2023
5f40115
Merge branch 'main' into cmartins-fixSplitDetails
luacmartins May 19, 2023
9210b3e
add modal header
luacmartins May 19, 2023
561e1ef
disable editing in details page
luacmartins May 19, 2023
5a33228
rm button from details page
luacmartins May 19, 2023
8585770
fix prop type, add screenwrapper
luacmartins May 19, 2023
36826ab
fix style
luacmartins May 19, 2023
5a98489
update incorrect component name
Julesssss May 22, 2023
e4442e1
create split details navigation route
Julesssss May 22, 2023
5c12e00
launch new route when bill split IOUPreview is tapped
Julesssss May 22, 2023
31c4efb
fix split details routing
Julesssss May 22, 2023
89c8c3b
display new split details page instead of participants
Julesssss May 22, 2023
5f7f5a8
reuse IOUConfirmationList component within SplitDetailsPage
Julesssss May 22, 2023
f2dbf54
remove props from read-only request confirmation comp
Julesssss May 22, 2023
a02033f
add readOnly mode to RequestConfirmationList
Julesssss May 22, 2023
eb9973a
completely remove participants list from split details page
Julesssss May 22, 2023
0e74bd7
fix outstanding lint issues
Julesssss May 22, 2023
d52719c
Merge branch 'main' into jules-buildReadOnlySplitConfirmationPage
Julesssss May 22, 2023
448942a
disable the editable fields when in read-only mode
Julesssss May 23, 2023
5ae444e
Merge branch 'main' into jules-buildReadOnlySplitConfirmationPage
Julesssss May 23, 2023
8413236
prevent exception by rending 404 page when action missing
Julesssss May 23, 2023
a20ca87
pass the reportActionID to the SplitDetailsPage component via URL route
Julesssss May 23, 2023
f6be7e6
retrieve reportActions within SplitDetailsPage using chatReportID
Julesssss May 23, 2023
6ca85da
retrieve split reportAction from Onyx using route param
Julesssss May 23, 2023
a1002b6
when showing split details, get amount from the reportAction
Julesssss May 23, 2023
b18e838
remove split creator from the participants array to avoid invalid lis…
Julesssss May 23, 2023
091019a
hide chevron from split details when in read-only mode
Julesssss May 23, 2023
125798d
move SplitDetailsPage to iou pages folder
Julesssss May 23, 2023
750a3ee
Merge branch 'main' into cmartins-fixSplitDetails
Julesssss May 23, 2023
4c72eea
Merge branch 'main' into jules-buildReadOnlySplitConfirmationPage
Julesssss May 23, 2023
58d1d75
fix lint issues
Julesssss May 23, 2023
80f1966
Merge branch 'jules-buildReadOnlySplitConfirmationPage' into cmartins…
Julesssss May 23, 2023
37666fe
Merge pull request #19452 from Expensify/cmartins-fixSplitDetails
Julesssss May 23, 2023
b1e3d8f
switch to Carlos' stack navigator
Julesssss May 23, 2023
9c56718
further formatting and prettier fixes
Julesssss May 23, 2023
9f97480
Merge branch 'main' into jules-buildReadOnlySplitConfirmationPage
Julesssss May 24, 2023
8444113
improve navigation routing
Julesssss May 24, 2023
7d4e046
apply review feedback, refactor participants and footer logic
Julesssss May 24, 2023
81909f0
show payee instead of authenticated user, plus other formatting fixes
Julesssss May 24, 2023
669884d
make the request confirmation payee dynamic
Julesssss May 24, 2023
f5e5b7f
Merge branch 'main' into jules-buildReadOnlySplitConfirmationPage
Julesssss May 25, 2023
f9e144d
Merge branch 'main' into jules-buildReadOnlySplitConfirmationPage
Julesssss May 25, 2023
f402d46
further read-only split details page improvements based on feedback
Julesssss May 25, 2023
24781eb
apply prettier change
Julesssss May 25, 2023
ea1882a
Merge branch 'main' into jules-buildReadOnlySplitConfirmationPage
Julesssss May 26, 2023
693ebe3
further improvements to split bill details page
Julesssss May 26, 2023
f2024d0
fix secondary route for split bill page
Julesssss May 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reuse IOUConfirmationList component within SplitDetailsPage
  • Loading branch information
Julesssss committed May 22, 2023
commit 5f7f5a860321dcc3e0d67a08e3d25125c41cc3cf
61 changes: 37 additions & 24 deletions src/pages/SplitDetailsPage.js
Original file line number Diff line number Diff line change
@@ -10,12 +10,12 @@ import ONYXKEYS from '../ONYXKEYS';
import HeaderWithCloseButton from '../components/HeaderWithCloseButton';
import Navigation from '../libs/Navigation/Navigation';
import ScreenWrapper from '../components/ScreenWrapper';
import OptionsList from '../components/OptionsList';
import ROUTES from '../ROUTES';
import MoneyRequestConfirmationList from '../components/MoneyRequestConfirmationList';
import personalDetailsPropType from './personalDetailsPropType';
import withLocalize, {withLocalizePropTypes} from '../components/withLocalize';
import compose from '../libs/compose';
import * as ReportUtils from '../libs/ReportUtils';
import reportActionPropTypes from '../pages/home/report/reportActionPropTypes';
import reportPropTypes from './reportPropTypes';
import withReportOrNotFound from './home/report/withReportOrNotFound';
import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView';
@@ -30,10 +30,13 @@ const propTypes = {
/** The active report */
report: reportPropTypes.isRequired,

/** The report action which we are displaying */
action: PropTypes.shape(reportActionPropTypes),

/** Route params */
route: PropTypes.shape({
params: PropTypes.shape({
/** Report ID passed via route r/:reportID/participants */
/** Report ID passed via route r/:reportID/split/details */
reportID: PropTypes.string,
}),
}).isRequired,
@@ -43,6 +46,7 @@ const propTypes = {

const defaultProps = {
personalDetails: {},
action: {},
};

/**
@@ -89,9 +93,7 @@ const SplitDetailsPage = (props) => {
{({safeAreaPaddingBottomStyle}) => (
<FullPageNotFoundView shouldShow={_.isEmpty(props.report)}>
<HeaderWithCloseButton
title={props.translate(
ReportUtils.isChatRoom(props.report) || ReportUtils.isPolicyExpenseChat(props.report) || ReportUtils.isThread(props.report) ? 'common.members' : 'common.details',
)}
title={props.translate('common.details')}
onCloseButtonPress={Navigation.dismissModal}
onBackButtonPress={Navigation.goBack}
shouldShowBackButton={ReportUtils.isChatRoom(props.report) || ReportUtils.isPolicyExpenseChat(props.report) || ReportUtils.isThread(props.report)}
@@ -101,25 +103,36 @@ const SplitDetailsPage = (props) => {
style={[styles.containerWithSpaceBetween]}
>
{Boolean(participants.length) && (
<OptionsList
sections={[
{
title: '',
data: participants,
shouldShow: true,
indexOffset: 0,
},
]}
onSelectRow={(option) => {
Navigation.navigate(ROUTES.getReportParticipantRoute(props.route.params.reportID, option.login));
}}
hideSectionHeaders
showTitleTooltip
disableFocusOptions
boldStyle
optionHoveredStyle={styles.hoveredComponentBG}
contentContainerStyles={[safeAreaPaddingBottomStyle]}
<MoneyRequestConfirmationList
hasMultipleParticipants
participants={participants}
iouAmount={9999}
// onConfirm={props.onConfirm}
// onSendMoney={props.onSendMoney}
iouType={CONST.IOU.MONEY_REQUEST_TYPE.SPLIT}
canModifyParticipants={false}
// navigateToStep={props.navigateToStep}
// policyID={props.policyID}
/>
// <OptionsList
// sections={[
// {
// title: '',
// data: participants,
// shouldShow: true,
// indexOffset: 0,
// },
// ]}
// onSelectRow={(option) => {
// Navigation.navigate(ROUTES.getReportParticipantRoute(props.route.params.reportID, option.login));
// }}
// hideSectionHeaders
// showTitleTooltip
// disableFocusOptions
// boldStyle
// optionHoveredStyle={styles.hoveredComponentBG}
// contentContainerStyles={[safeAreaPaddingBottomStyle]}
// />
)}
</View>
</FullPageNotFoundView>