-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[vip-travel] Create Trip Details Screen #52823
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
Merged
stitesExpensify
merged 85 commits into
Expensify:main
from
software-mansion-labs:feature/trip-details
Dec 18, 2024
Merged
Changes from all commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
a33274b
Create trip details screen
blazejkustra 15c9ae3
Add translation for trip support
blazejkustra 3ae7f98
Add undefined type for trip details
blazejkustra d2e1df5
Fix navigation config
blazejkustra 7394a09
Link the correct backTo on trip details screen
blazejkustra 2c9d2a8
Access data and fix getTripIDFromTransactionParentReportID
blazejkustra 610ed48
Add english translations
blazejkustra 644243c
Make reservationType optional in getTripReservationIcon function
blazejkustra d5dd2af
Add arrivalGate and cityName fields to Reservation and ReservationTim…
blazejkustra 6c89f5a
Enhance getFormattedTransportDate function to support shorter date fo…
blazejkustra b47f8a2
Add FlightTripDetails component to display flight reservation informa…
blazejkustra aeddf58
Integrate FlightTripDetails component into TripDetails screen and wra…
blazejkustra ae39590
Final touches
blazejkustra 2954e6a
Fix flight page after design changes
blazejkustra 08fd3fb
Change TripDetails into TripDetailsPage
blazejkustra 6e71d43
Create HotelTripDetails
blazejkustra 4ff355f
Add missing translation
blazejkustra 2eb1bb9
Revert "Final touches"
blazejkustra 503cf60
Remove flight from hotel page
blazejkustra a4a0cde
Add a blank line for improved readability in HotelTripDetails component
blazejkustra 30e27d1
Add CarTripDetails component for displaying car rental information
blazejkustra a8b78f8
Refactor getReservationsFromTripTransactions to return structured res…
blazejkustra f4f5501
Add translation for rental car
blazejkustra d49cdce
Fix navigation route in MoneyRequestView to use parentReportID
blazejkustra 092e430
Refactor TripDetailsView and TripRoomPreview to use structured reserv…
blazejkustra 6c59ca4
Add CarTripDetails component to TripDetailsPage for displaying car re…
blazejkustra 49f946f
Add Trip Summary screen
blazejkustra 9c5963e
Add address translation to common
blazejkustra 34553ef
Add screen to navigator and fix types
blazejkustra 4b3a159
Navigate to summary conditionally
blazejkustra a1ebfe7
Clean date utils around transport
blazejkustra aa0fb94
Add reservation index to display just one flight
blazejkustra 1d541a1
Update config configuration
blazejkustra fe18238
Update styles after design changes
blazejkustra 833bc3e
Merge branch 'main' into feature/trip-details
blazejkustra c882db8
Rename TRIP_DETAILS screen identifier to maintain consistent naming c…
blazejkustra c20e09e
Fix typecheck and lint
blazejkustra 7dcfbd0
Add Spanish translations for flight, hotel, and car details
blazejkustra 5ba408a
Refactor reservation type checks to use constants
blazejkustra 7c2d12d
Add cancellation deadline and policy to car and hotel trip details
blazejkustra 0389b73
Rename reservation deadline property and update related components to…
blazejkustra 8cbf341
Merge branch 'main' into feature/trip-details
blazejkustra f906103
Rename displayName for CarTripDetails component
blazejkustra 79b0cbd
Add Spanish translation for cancellationUntil in booking and car sect…
blazejkustra 7bdea21
Remove unnecessary blank line in HotelTripDetails component
blazejkustra f202c55
Merge branch 'main' into feature/trip-details
blazejkustra 889416c
Add optional fields for rail reservations in Transaction
blazejkustra c8557b0
Add TRAIN constant to CONST for transportation options
blazejkustra 9f7ca7e
Add train translations and details to language file
blazejkustra 3477149
Add TrainTripDetails component to display train reservation details
blazejkustra 3c720d1
Update Spanish translations for train terminology
blazejkustra 575918c
Add train icon SVG and import it into Expensicons
blazejkustra 542749b
Update train SVG to remove fixed width and height attributes
blazejkustra f9b5bbc
Add support for train in TripDetailsView and TripRoomPreview components
blazejkustra 575fa38
Add trip details translation for English and Spanish; update TripSumm…
blazejkustra 0ab84cd
Add customizable icon dimensions and styles to HeaderWithBackButton c…
blazejkustra 13dd939
Add dynamic reservation icon support in TripDetailsPage component
blazejkustra 0a33fd4
Refactor TripDetailsPage to use reservation object for details rendering
blazejkustra 7f7d5d4
Refactor CarTripDetails component to use reservation object for rende…
blazejkustra 3de4fb9
Add shouldUseHeadlineHeader prop to multiple pages for consistent hea…
blazejkustra a3d68f4
Refactor HotelTripDetails component to use reservation object for ren…
blazejkustra b9d0da2
Add flight layover translation support and abbreviations in English a…
blazejkustra 9778049
Add FlightLayoverParams type for layover details
blazejkustra 5eac23a
Enhance duration formatting functions to support translation for hour…
blazejkustra 72b825e
Refactor FlightTripDetails component to use reservation object
blazejkustra 6466aec
Refactor TrainTripDetails component to use reservation object for ren…
blazejkustra c576047
Merge branch 'main' into feature/trip-details
blazejkustra 6dc72b3
Refactor trip details components to remove personal details prop and …
blazejkustra 4e3b48a
Merge branch 'main' into feature/trip-details
blazejkustra b892fe0
Revert "Refactor trip details components to remove personal details p…
blazejkustra 1457fda
Update trip details components to use traveler information from reser…
blazejkustra 9a9eaf7
Show duration for train, fix truncated confirmatiion number
blazejkustra c7ebfb2
Display passenger/guest conditionally
blazejkustra e09dc23
Use label size for layover
blazejkustra e91d3a8
Remove console log from FlightTripDetails component
blazejkustra 6b31349
Refactor navigation parameters to use tripRoomReportID consistently a…
blazejkustra 9c82c76
Fix modify trip and trip support buttons for all cases
blazejkustra c69639a
Add network status handling to disable buttons when offline
blazejkustra 0b6030f
Add loading state management for trip modification and support actions
blazejkustra 4e075c8
Merge branch 'main' into feature/trip-details
blazejkustra d43a884
Merge branch 'main' into feature/trip-details
blazejkustra 8324be8
fix PR comments
SzymczakJ d0776cf
Merge branch 'main' into feature/trip-details
SzymczakJ ffe8522
Merge branch 'main' into feature/trip-details
blazejkustra 990300e
Merge branch 'main' into feature/trip-details
blazejkustra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -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({ | |
| <Header | ||
| title={title} | ||
| subtitle={stepCounter ? translate('stepCounter', stepCounter) : subtitle} | ||
| textStyles={[titleColor ? StyleUtils.getTextColorStyle(titleColor) : {}, isCentralPaneSettings && styles.textHeadlineH2]} | ||
| textStyles={[titleColor ? StyleUtils.getTextColorStyle(titleColor) : {}, shouldUseHeadlineHeader && styles.textHeadlineH2]} | ||
| subTitleLink={subTitleLink} | ||
| /> | ||
| ); | ||
| }, [ | ||
| 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 && ( | ||
| <Icon | ||
| src={icon} | ||
| width={variables.iconHeader} | ||
| height={variables.iconHeader} | ||
| additionalStyles={[styles.mr2]} | ||
| width={iconWidth ?? variables.iconHeader} | ||
| height={iconHeight ?? variables.iconHeader} | ||
| additionalStyles={[styles.mr2, iconStyles]} | ||
| fill={iconFill ?? theme.icon} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| /> | ||
| )} | ||
| {!!policyAvatar && ( | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.