diff --git a/assets/images/train.svg b/assets/images/train.svg
new file mode 100644
index 0000000000000..40d8c9d1af8ac
--- /dev/null
+++ b/assets/images/train.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/CONST.ts b/src/CONST.ts
index 4bfaad7b6d1b0..fd026cf45137a 100755
--- a/src/CONST.ts
+++ b/src/CONST.ts
@@ -4452,7 +4452,7 @@ const CONST = {
BOOK_TRAVEL_DEMO_URL: 'https://calendly.com/d/ck2z-xsh-q97/expensify-travel-demo-travel-page',
TRAVEL_DOT_URL: 'https://travel.expensify.com',
STAGING_TRAVEL_DOT_URL: 'https://staging.travel.expensify.com',
- TRIP_ID_PATH: (tripID: string) => `trips/${tripID}`,
+ TRIP_ID_PATH: (tripID?: string) => (tripID ? `trips/${tripID}` : undefined),
SPOTNANA_TMC_ID: '8e8e7258-1cf3-48c0-9cd1-fe78a6e31eed',
STAGING_SPOTNANA_TMC_ID: '7a290c6e-5328-4107-aff6-e48765845b81',
SCREEN_READER_STATES: {
@@ -5953,6 +5953,7 @@ const CONST = {
CAR: 'car',
HOTEL: 'hotel',
FLIGHT: 'flight',
+ TRAIN: 'train',
},
DOT_SEPARATOR: '•',
diff --git a/src/ROUTES.ts b/src/ROUTES.ts
index b9544d81beceb..bab16698bcf6c 100644
--- a/src/ROUTES.ts
+++ b/src/ROUTES.ts
@@ -1365,6 +1365,15 @@ const ROUTES = {
TRAVEL_MY_TRIPS: 'travel',
TRAVEL_TCS: 'travel/terms',
TRACK_TRAINING_MODAL: 'track-training',
+ TRAVEL_TRIP_SUMMARY: {
+ route: 'r/:reportID/trip/:transactionID',
+ getRoute: (reportID: string, transactionID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/trip/${transactionID}`, backTo),
+ },
+ TRAVEL_TRIP_DETAILS: {
+ route: 'r/:reportID/trip/:transactionID/:reservationIndex',
+ getRoute: (reportID: string, transactionID: string, reservationIndex: number, backTo?: string) =>
+ getUrlWithBackToParam(`r/${reportID}/trip/${transactionID}/${reservationIndex}`, backTo),
+ },
ONBOARDING_ROOT: {
route: 'onboarding',
getRoute: (backTo?: string) => getUrlWithBackToParam(`onboarding`, backTo),
diff --git a/src/SCREENS.ts b/src/SCREENS.ts
index 6c4547e94c37d..b608e327a5630 100644
--- a/src/SCREENS.ts
+++ b/src/SCREENS.ts
@@ -27,6 +27,8 @@ const SCREENS = {
TRAVEL: {
MY_TRIPS: 'Travel_MyTrips',
TCS: 'Travel_TCS',
+ TRIP_SUMMARY: 'Travel_TripSummary',
+ TRIP_DETAILS: 'Travel_TripDetails',
},
SEARCH: {
CENTRAL_PANE: 'Search_Central_Pane',
diff --git a/src/components/HeaderWithBackButton/index.tsx b/src/components/HeaderWithBackButton/index.tsx
index 6fa006cfb4fbe..b4d097e90994b 100755
--- a/src/components/HeaderWithBackButton/index.tsx
+++ b/src/components/HeaderWithBackButton/index.tsx
@@ -25,6 +25,9 @@ import type HeaderWithBackButtonProps from './types';
function HeaderWithBackButton({
icon,
iconFill,
+ iconWidth,
+ iconHeight,
+ iconStyles,
guidesCallTaskID = '',
onBackButtonPress = () => Navigation.goBack(),
onCloseButtonPress = () => Navigation.dismissModal(),
@@ -45,6 +48,7 @@ function HeaderWithBackButton({
shouldSetModalVisibility = true,
shouldShowThreeDotsButton = false,
shouldDisableThreeDotsButton = false,
+ shouldUseHeadlineHeader = false,
stepCounter,
subtitle = '',
title = '',
@@ -72,9 +76,6 @@ function HeaderWithBackButton({
const [isDownloadButtonActive, temporarilyDisableDownloadButton] = useThrottledButtonState();
const {translate} = useLocalize();
- // If the icon is present, the header bar should be taller and use different font.
- const isCentralPaneSettings = !!icon;
-
const middleContent = useMemo(() => {
if (progressBarPercentage) {
return (
@@ -106,14 +107,14 @@ function HeaderWithBackButton({
);
}, [
StyleUtils,
subTitleLink,
- isCentralPaneSettings,
+ shouldUseHeadlineHeader,
policy,
progressBarPercentage,
report,
@@ -138,7 +139,7 @@ function HeaderWithBackButton({
dataSet={{dragArea: false}}
style={[
styles.headerBar,
- isCentralPaneSettings && styles.headerBarDesktopHeight,
+ shouldUseHeadlineHeader && styles.headerBarDesktopHeight,
shouldShowBorderBottom && styles.borderBottom,
// progressBarPercentage can be 0 which would
// be falsey, hence using !== undefined explicitly
@@ -178,9 +179,10 @@ function HeaderWithBackButton({
{!!icon && (
)}
{!!policyAvatar && (
diff --git a/src/components/HeaderWithBackButton/types.ts b/src/components/HeaderWithBackButton/types.ts
index 6eef2b072eee1..d2d4ba9e4e0f3 100644
--- a/src/components/HeaderWithBackButton/types.ts
+++ b/src/components/HeaderWithBackButton/types.ts
@@ -38,6 +38,15 @@ type HeaderWithBackButtonProps = Partial & {
* */
icon?: IconAsset;
+ /** Icon Width */
+ iconWidth?: number;
+
+ /** Icon Height */
+ iconHeight?: number;
+
+ /** Any additional styles to pass to the icon container. */
+ iconStyles?: StyleProp;
+
/** Method to trigger when pressing download button of the header */
onDownloadButtonPress?: () => void;
@@ -119,6 +128,9 @@ type HeaderWithBackButtonProps = Partial & {
/** Whether we should navigate to report page when the route have a topMostReport */
shouldNavigateToTopMostReport?: boolean;
+ /** Whether the header should use the headline header style */
+ shouldUseHeadlineHeader?: boolean;
+
/** The fill color for the icon. Can be hex, rgb, rgba, or valid react-native named color such as 'red' or 'blue'. */
iconFill?: string;
diff --git a/src/components/Icon/Expensicons.ts b/src/components/Icon/Expensicons.ts
index 51db1bc12c8e2..4093b44743fe8 100644
--- a/src/components/Icon/Expensicons.ts
+++ b/src/components/Icon/Expensicons.ts
@@ -187,6 +187,7 @@ import Task from '@assets/images/task.svg';
import Thread from '@assets/images/thread.svg';
import ThreeDots from '@assets/images/three-dots.svg';
import ThumbsUp from '@assets/images/thumbs-up.svg';
+import Train from '@assets/images/train.svg';
import Transfer from '@assets/images/transfer.svg';
import Trashcan from '@assets/images/trashcan.svg';
import Unlock from '@assets/images/unlock.svg';
@@ -413,5 +414,6 @@ export {
Star,
QBDSquare,
GalleryNotFound,
+ Train,
boltSlash,
};
diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx
index 9635ead74751e..18750bfc7a296 100644
--- a/src/components/ReportActionItem/MoneyRequestView.tsx
+++ b/src/components/ReportActionItem/MoneyRequestView.tsx
@@ -33,7 +33,6 @@ import ViolationsUtils from '@libs/Violations/ViolationsUtils';
import Navigation from '@navigation/Navigation';
import AnimatedEmptyStateBackground from '@pages/home/report/AnimatedEmptyStateBackground';
import * as IOU from '@userActions/IOU';
-import * as Link from '@userActions/Link';
import * as Transaction from '@userActions/Transaction';
import CONST from '@src/CONST';
import type {TranslationPaths} from '@src/languages/types';
@@ -82,7 +81,6 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
const session = useSession();
const {isOffline} = useNetwork();
const {translate, toLocaleDigit} = useLocalize();
- const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID);
const parentReportID = report?.parentReportID ?? '-1';
const policyID = report?.policyID ?? '-1';
const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`);
@@ -188,7 +186,7 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
const shouldShowAttendees = useMemo(() => TransactionUtils.shouldShowAttendees(iouType, policy), [iouType, policy]);
const shouldShowTax = isTaxTrackingEnabled(isPolicyExpenseChat, policy, isDistanceRequest);
- const tripID = ReportUtils.getTripIDFromTransactionParentReport(parentReport);
+ const tripID = ReportUtils.getTripIDFromTransactionParentReportID(parentReport?.parentReportID);
const shouldShowViewTripDetails = TransactionUtils.hasReservationList(transaction) && !!tripID;
const {getViolationsForField} = useViolations(transactionViolations ?? [], isReceiptBeingScanned || !ReportUtils.isPaidGroupPolicy(report));
@@ -699,10 +697,12 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals