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

[VIP-Travel] Trip room summary #41659

Merged
merged 73 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
7d069ac
add new chat type
rushatgabhane May 5, 2024
48d51c4
add isTripRoom
rushatgabhane May 5, 2024
37b5a9d
add isTripRoom
rushatgabhane May 5, 2024
dc2aba9
show trip details in report action item
rushatgabhane May 5, 2024
942c068
pass chatreport id to trip details
rushatgabhane May 5, 2024
770d39e
add styles and copy trip details view
rushatgabhane May 5, 2024
0079ccc
add dateutils and lang
rushatgabhane May 6, 2024
0d7db37
add reservation type
rushatgabhane May 6, 2024
26c0c88
add assets
rushatgabhane May 6, 2024
5497a13
add assets
rushatgabhane May 6, 2024
3adc309
add title style to menu item
rushatgabhane May 6, 2024
5865634
Merge branch 'main' into trip-room-2
rushatgabhane May 9, 2024
dda9361
Merge branch 'main' into trip-room-2
rushatgabhane May 12, 2024
5c93faa
fix margin and gap for trip summary
rushatgabhane May 13, 2024
724c980
fix empty div when no title present
rushatgabhane May 13, 2024
b0e6022
add 4px gap
rushatgabhane May 13, 2024
b3c8abb
update const chat type
rushatgabhane May 15, 2024
bc7a0f8
merge main
rushatgabhane May 15, 2024
686d386
Merge branch 'main' of github.com:rushatgabhane/exfy into trip-room-2
rushatgabhane May 15, 2024
9318abb
merge main
rushatgabhane May 15, 2024
e6b5296
update trip report type
rushatgabhane May 15, 2024
548f81d
show trip preview and check for trip room
rushatgabhane May 15, 2024
d78fe79
onyx add trip preview type
rushatgabhane May 15, 2024
c155df8
rm console log
rushatgabhane May 15, 2024
3e4d438
add trip header and trip transactins
rushatgabhane May 16, 2024
1d15129
working report
rushatgabhane May 17, 2024
da2b2f4
get trip transactions
rushatgabhane May 20, 2024
1812e1b
get trip reservations method
rushatgabhane May 20, 2024
0229a52
rm console
rushatgabhane May 20, 2024
876c403
add reservation to receipt
rushatgabhane May 20, 2024
658ba4b
add reservation to receipt
rushatgabhane May 20, 2024
854ac5b
add reservation details
rushatgabhane May 20, 2024
97b1d61
hide horizontal rule
rushatgabhane May 20, 2024
e498fb0
Merge branch 'main' of github.com:rushatgabhane/exfy into trip-room-2
rushatgabhane May 20, 2024
0a24259
Merge branch 'main' of github.com:rushatgabhane/exfy into trip-room-2
rushatgabhane May 23, 2024
fdbc3d3
add trip transaction util
rushatgabhane May 25, 2024
9721904
type for address
rushatgabhane May 25, 2024
f2ea7f5
get trip from backend
rushatgabhane May 25, 2024
c381f99
show reservation code for hotel booking and hotel name
rushatgabhane May 25, 2024
d855793
show car info
rushatgabhane May 25, 2024
25caa28
rm console
rushatgabhane May 25, 2024
2a07889
fix transaction type
rushatgabhane May 25, 2024
f4bfc63
use flatmap
rushatgabhane May 25, 2024
e4ba89e
Merge branch 'main' of github.com:rushatgabhane/exfy into trip-room-2
rushatgabhane May 25, 2024
06f36fb
rm flat
rushatgabhane May 25, 2024
d4e2562
fix original message type
rushatgabhane May 27, 2024
788b765
has reservation list fix type
rushatgabhane May 27, 2024
fcd5684
rm original msg
rushatgabhane May 27, 2024
3822694
rm original msg
rushatgabhane May 27, 2024
5ed20ab
Revert "rm original msg"
rushatgabhane May 27, 2024
d1ded81
Revert "rm original msg"
rushatgabhane May 27, 2024
844c7e1
add type for trip room original msg
rushatgabhane May 27, 2024
95ca8cf
rm train svg
rushatgabhane May 28, 2024
2e48b57
rm train and misc from reservation type
rushatgabhane May 28, 2024
90d2a0c
rm train svg
rushatgabhane May 28, 2024
48bdd41
add comment
rushatgabhane May 28, 2024
29a670f
rm type rail from lang
rushatgabhane May 28, 2024
7df2a56
Update src/libs/DateUtils.ts
rushatgabhane May 30, 2024
880db45
Merge branch 'main' of github.com:rushatgabhane/exfy into trip-room-2
rushatgabhane May 30, 2024
d3708b7
show year only if not this year
rushatgabhane May 30, 2024
41fb546
simplify comment
rushatgabhane May 30, 2024
dee1f1c
rm type
rushatgabhane May 30, 2024
b9b96a8
rm type
rushatgabhane May 30, 2024
89c3597
fix spacing when values are not present
rushatgabhane May 30, 2024
415e62a
use empty state bg
rushatgabhane May 30, 2024
e5a6960
rm animated state bg
rushatgabhane May 30, 2024
a6fc886
show paranthesis only when both short and long name are present
rushatgabhane May 30, 2024
56ed4e1
handle text overflow on native
rushatgabhane May 30, 2024
c4b5df5
use font size small
rushatgabhane May 30, 2024
22c472e
use existing styles
rushatgabhane May 30, 2024
5eba1aa
Merge branch 'main' of github.com:rushatgabhane/exfy into trip-room-2
rushatgabhane Jun 2, 2024
80cd508
add hover style
rushatgabhane Jun 2, 2024
f23f0c1
prettier
rushatgabhane Jun 3, 2024
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
1 change: 1 addition & 0 deletions assets/images/bed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/car-with-key.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/plane.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const KEYBOARD_SHORTCUT_NAVIGATION_TYPE = 'NAVIGATION_SHORTCUT';
const chatTypes = {
POLICY_ANNOUNCE: 'policyAnnounce',
POLICY_ADMINS: 'policyAdmins',
TRIP_ROOM: 'tripRoom',
GROUP: 'group',
DOMAIN_ALL: 'domainAll',
POLICY_ROOM: 'policyRoom',
Expand Down Expand Up @@ -697,6 +698,7 @@ const CONST = {
TASK_COMPLETED: 'TASKCOMPLETED',
TASK_EDITED: 'TASKEDITED',
TASK_REOPENED: 'TASKREOPENED',
TRIPPREVIEW: 'TRIPPREVIEW',
UNAPPROVED: 'UNAPPROVED', // OldDot Action
UNHOLD: 'UNHOLD',
UNSHARE: 'UNSHARE', // OldDot Action
Expand Down Expand Up @@ -4740,6 +4742,12 @@ const CONST = {
INITIAL_URL: 'INITIAL_URL',
},

RESERVATION_TYPE: {
CAR: 'car',
HOTEL: 'hotel',
FLIGHT: 'flight',
},

DOT_SEPARATOR: '•',

DEFAULT_TAX: {
Expand Down
6 changes: 6 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import NotificationsAvatar from '@assets/images/avatars/notifications-avatar.svg
import ActiveRoomAvatar from '@assets/images/avatars/room.svg';
import BackArrow from '@assets/images/back-left.svg';
import Bank from '@assets/images/bank.svg';
import Bed from '@assets/images/bed.svg';
import Bell from '@assets/images/bell.svg';
import BellSlash from '@assets/images/bellSlash.svg';
import Bill from '@assets/images/bill.svg';
Expand All @@ -28,6 +29,7 @@ import Bug from '@assets/images/bug.svg';
import Building from '@assets/images/building.svg';
import Calendar from '@assets/images/calendar.svg';
import Camera from '@assets/images/camera.svg';
import CarWithKey from '@assets/images/car-with-key.svg';
import Car from '@assets/images/car.svg';
import CardsAndDomains from '@assets/images/cards-and-domains.svg';
import Cash from '@assets/images/cash.svg';
Expand Down Expand Up @@ -124,6 +126,7 @@ import Paycheck from '@assets/images/paycheck.svg';
import Pencil from '@assets/images/pencil.svg';
import Phone from '@assets/images/phone.svg';
import Pin from '@assets/images/pin.svg';
import Plane from '@assets/images/plane.svg';
import Play from '@assets/images/play.svg';
import Plus from '@assets/images/plus.svg';
import Printer from '@assets/images/printer.svg';
Expand Down Expand Up @@ -344,6 +347,9 @@ export {
ChatBubbleUnread,
ChatBubbleReply,
Lightbulb,
Plane,
Bed,
CarWithKey,
DocumentPlus,
Clear,
};
77 changes: 50 additions & 27 deletions src/components/MenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ExpensiMark from 'expensify-common/lib/ExpensiMark';
import type {ImageContentFit} from 'expo-image';
import type {ReactNode} from 'react';
import type {ReactElement, ReactNode} from 'react';
import React, {forwardRef, useContext, useMemo} from 'react';
import type {GestureResponderEvent, StyleProp, TextStyle, ViewStyle} from 'react-native';
import {View} from 'react-native';
Expand Down Expand Up @@ -105,6 +105,9 @@ type MenuItemBaseProps = {
/** The fill color to pass into the secondary icon. */
secondaryIconFill?: string;

/** Whether the secondary icon should have hover style */
isSecondaryIconHoverable?: boolean;

/** Icon Width */
iconWidth?: number;

Expand Down Expand Up @@ -182,6 +185,12 @@ type MenuItemBaseProps = {
/** Text to display for the item */
title?: string;

/** Component to display as the title */
titleComponent?: ReactElement;

/** Any additional styles to apply to the container for title components */
titleContainerStyle?: StyleProp<ViewStyle>;

/** A right-aligned subtitle for this menu option */
subtitle?: string | number;

Expand Down Expand Up @@ -300,6 +309,7 @@ function MenuItem(
secondaryIcon,
secondaryIconFill,
iconType = CONST.ICON_TYPE_ICON,
isSecondaryIconHoverable = false,
iconWidth,
iconHeight,
iconStyles,
Expand All @@ -321,6 +331,8 @@ function MenuItem(
focused = false,
disabled = false,
title,
titleComponent,
titleContainerStyle,
subtitle,
shouldShowBasicTitle,
label,
Expand Down Expand Up @@ -554,7 +566,13 @@ function MenuItem(
</View>
)}
{secondaryIcon && (
<View style={[styles.popoverMenuIcon, iconStyles]}>
<View
style={[
styles.popoverMenuIcon,
iconStyles,
isSecondaryIconHoverable && StyleUtils.getBackgroundAndBorderStyle(focused || isHovered ? theme.hoverComponentBG : theme.overlay),
]}
>
<Icon
contentFit={contentFit}
src={secondaryIcon}
Expand All @@ -567,7 +585,9 @@ function MenuItem(
/>
</View>
)}
<View style={[styles.justifyContentCenter, styles.flex1, StyleUtils.getMenuItemTextContainerStyle(isSmallAvatarSubscriptMenu)]}>
<View
style={[styles.justifyContentCenter, styles.flex1, StyleUtils.getMenuItemTextContainerStyle(isSmallAvatarSubscriptMenu), titleContainerStyle]}
>
{!!description && shouldShowDescriptionOnTop && (
<Text
style={descriptionTextStyles}
Expand All @@ -576,30 +596,32 @@ function MenuItem(
{description}
</Text>
)}
<View style={[styles.flexRow, styles.alignItemsCenter]}>
{!!title && (shouldRenderAsHTML || (shouldParseTitle && !!html.length)) && (
<View style={styles.renderHTMLTitle}>
<RenderHTML html={processedTitle} />
</View>
)}
{!shouldRenderAsHTML && !shouldParseTitle && !!title && (
<Text
style={combinedTitleTextStyle}
numberOfLines={numberOfLinesTitle || undefined}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: interactive && disabled}}
>
{renderTitleContent()}
</Text>
)}
{shouldShowTitleIcon && titleIcon && (
<View style={[styles.ml2]}>
<Icon
src={titleIcon}
fill={theme.iconSuccessFill}
/>
</View>
)}
</View>
{(!!title || !!shouldShowTitleIcon) && (
<View style={[styles.flexRow, styles.alignItemsCenter]}>
{!!title && (shouldRenderAsHTML || (shouldParseTitle && !!html.length)) && (
<View style={styles.renderHTMLTitle}>
<RenderHTML html={processedTitle} />
</View>
)}
{!shouldRenderAsHTML && !shouldParseTitle && !!title && (
<Text
style={combinedTitleTextStyle}
numberOfLines={numberOfLinesTitle || undefined}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: interactive && disabled}}
>
{renderTitleContent()}
</Text>
)}
{shouldShowTitleIcon && titleIcon && (
<View style={[styles.ml2]}>
<Icon
src={titleIcon}
fill={theme.iconSuccessFill}
/>
</View>
)}
</View>
)}
{!!description && !shouldShowDescriptionOnTop && (
<Text
style={descriptionTextStyles}
Expand All @@ -626,6 +648,7 @@ function MenuItem(
</Text>
</View>
)}
{titleComponent}
</View>
</View>
</View>
Expand Down
Loading
Loading