-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26508 from Expensify/cmartins-replaceReceipt
Replace receipt
- Loading branch information
Showing
10 changed files
with
193 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import ScreenWrapper from '../components/ScreenWrapper'; | ||
import HeaderWithBackButton from '../components/HeaderWithBackButton'; | ||
import Navigation from '../libs/Navigation/Navigation'; | ||
import useLocalize from '../hooks/useLocalize'; | ||
import ReceiptSelector from './iou/ReceiptSelector'; | ||
import DragAndDropProvider from '../components/DragAndDrop/Provider'; | ||
|
||
const propTypes = { | ||
/** React Navigation route */ | ||
route: PropTypes.shape({ | ||
/** Params from the route */ | ||
params: PropTypes.shape({ | ||
/** The type of IOU report, i.e. bill, request, send */ | ||
iouType: PropTypes.string, | ||
|
||
/** The report ID of the IOU */ | ||
reportID: PropTypes.string, | ||
}), | ||
}).isRequired, | ||
|
||
/** The id of the transaction we're editing */ | ||
transactionID: PropTypes.string.isRequired, | ||
}; | ||
|
||
function EditRequestReceiptPage({route, transactionID}) { | ||
const {translate} = useLocalize(); | ||
|
||
return ( | ||
<ScreenWrapper | ||
includeSafeAreaPaddingBottom={false} | ||
shouldEnableMaxHeight | ||
> | ||
<HeaderWithBackButton | ||
title={translate('common.receipt')} | ||
onBackButtonPress={Navigation.goBack} | ||
/> | ||
<DragAndDropProvider> | ||
<ReceiptSelector | ||
route={route} | ||
transactionID={transactionID} | ||
/> | ||
</DragAndDropProvider> | ||
</ScreenWrapper> | ||
); | ||
} | ||
|
||
EditRequestReceiptPage.propTypes = propTypes; | ||
EditRequestReceiptPage.displayName = 'EditRequestReceiptPage'; | ||
|
||
export default EditRequestReceiptPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.