From 84ef3bd16151bc1cedb4cf01155f1688980808af Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 5 Sep 2023 15:53:37 -0600 Subject: [PATCH] create EditRequestReceiptPage --- src/components/AttachmentModal.js | 7 ++++--- src/pages/EditRequestReceiptPage.js | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 src/pages/EditRequestReceiptPage.js diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js index abbc656bf844..56183aa20643 100755 --- a/src/components/AttachmentModal.js +++ b/src/components/AttachmentModal.js @@ -111,7 +111,6 @@ function AttachmentModal(props) { const [confirmButtonFadeAnimation] = useState(new Animated.Value(1)); const [shouldShowDownloadButton, setShouldShowDownloadButton] = React.useState(true); const {windowWidth} = useWindowDimensions(); - const [isEditingReceipt, setIsEditingReceipt] = useState(false); const [file, setFile] = useState( props.originalFileName @@ -361,8 +360,10 @@ function AttachmentModal(props) { onSelected: () => { closeModal(); - // TODO: replace with actual edit receipt route - Navigation.navigate(ROUTES.getEditRequestRoute(props.report.reportID, 'amount')); + // TODO: remove timeout + setTimeout(() => { + Navigation.navigate(ROUTES.getEditRequestRoute(props.report.reportID, 'receipt')); + }, 1000) }, }, { diff --git a/src/pages/EditRequestReceiptPage.js b/src/pages/EditRequestReceiptPage.js new file mode 100644 index 000000000000..fd0f4893bb3a --- /dev/null +++ b/src/pages/EditRequestReceiptPage.js @@ -0,0 +1,27 @@ +import React from 'react'; +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'; + +function EditRequestReceiptPage() { + const {translate} = useLocalize(); + + return ( + + + + + ); +} + +EditRequestReceiptPage.displayName = 'EditRequestReceiptPage'; + +export default EditRequestReceiptPage;