From 5c9d8cd7fddc03167f580eb64169cda0f82e39e2 Mon Sep 17 00:00:00 2001 From: maddylewis <38016013+maddylewis@users.noreply.github.com> Date: Thu, 13 Apr 2023 12:43:49 -0400 Subject: [PATCH 001/512] Update Expensify-Lounge.md --- docs/articles/other/Expensify-Lounge.md | 82 ++++++++++++++----------- 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/docs/articles/other/Expensify-Lounge.md b/docs/articles/other/Expensify-Lounge.md index 925ab43f2548..c5214817977e 100644 --- a/docs/articles/other/Expensify-Lounge.md +++ b/docs/articles/other/Expensify-Lounge.md @@ -5,52 +5,64 @@ description: How to get the most out of the Expensify Lounge. # What is the Expensify Lounge? -The Expensify Lounge is a place for people to get shit done in a beautiful environment with great coffee and people to collaborate with. Please use this guide to learn how to utilize the Expensify Lounge best. +The Expensify Lounge is a place where people go to Get Shit Done. It's a beautiful environment with great coffee and a group of people to collaborate with. Check out this guide on how to best utilize the Expensify Lounge! # The Two Rules -*Number One - Get Shit Done* -The lounge is a space for people to get work done. It is optimized to be the perfect environment for you to focus on your work and collaborate with others to advance your ideas. We provide this by asking our members to keep in mind: +### Rule #1 - Get Shit Done -- **#focus** - Use the space for how it was designed, and do not distract from others' focus. It is beautiful, social, and collaborative, but it is built for work. -- **#urgency** - Working remotely is great but often introduces delay. Use the lounge to meet with whoever you need when time is of the essence. +The Lounge is a space for people to get work done. It is optimized to be the perfect environment for you to focus on your work, collaborate with others, and advance your most wild and creative ideas. To make this a reality, we ask our members to keep the following in mind: + +- **#focus** - Use the space for how it was designed and do not distract from others' focus. The space is beautiful, social, and collaborative, but it was created to help our members work effectively. +- **#urgency** - Working remotely is great, but there's nothing like real-time collaboration with your colleagues. Use the lounge to meet with co-workers IRL to continue the progress on whatever it is you're working on. - **#results** - Don't mistake time for effort or effort for output. Upon arrival, visualize what you want to accomplish, and don't leave until it's done. -*Number Two - Don’t Ruin it for Everyone Else* -We want this place to be incredible for everyone and to get always be getting better. We don’t want too many rules, but we do need some guardrails. The following guiding principles allow us to do that: -- **#writeitdown** - If you can help others learn from you, do so. Write a blog post, a document, or a post in Expensify Chat to share with others so they can learn from you. This includes making the Expensify Lounge a better space. Feel free to write down any improvements so we can continue to get better. -- **#showup** - If you are in the lounge, be fully present. Meet others, and collaborate in social rooms. The point is to build a community of people getting shit done; you’ll get out what you put in. -- **#oneteam** - We provide an inclusive community for all. Do not discriminate against others, and aim to go out of your way to include people that want to be included. -- **#nocreeps** - Do not make people feel uncomfortable with your words or actions. If you are made to feel uncomfortable or think others are, use this escalation process. +### Rule #2 - Don’t Ruin it for Everyone Else + +We want this place to be incredible, innovative, and always elvoving. To achieve that, we have some general guidelines: + +- **#writeitdown** - If you can help others learn from you, do so. Write a blog post, a document, or a post in Expensify Chat to share with others. This includes making the Expensify Lounge a better space. Feel free to write down any improvements so we can make it better. +- **#showup** - If you are in the lounge, be fully present. Meet others, and collaborate in social rooms. The point is to build a community of people who are focused on getting shit done; you’ll get out what you put in. +- **#oneteam** - Providing an inclusive community is our priority, and we do not tolerate any form of discrimination. Aim to go out of your way to include people who want to be included. +- **#nocreeps** - Do not make people feel uncomfortable with your words or actions. If you are made to feel uncomfortable or notice this happening to someone else, you can use the escalation process outlined in the FAQ section. # How to Use the Expensify Lounge -Below is a guide on how to help our members get the most out of the lounge centered around the rules above. +Keeping those two rules in mind, below is a guide on how our members can get the most out of the lounge. -Rule #1 - Getting Shit done: -- **Order drinks from Concierge** - [Write Concierge here](https://new.expensify.com/concierge) to ask lounge questions or order beverages. Concierge will bring it to you where you are sitting! -- **Using an office** - Offices are first come, first serve so go into any open one. Please keep office use to an hour or less. We do not allow any reservations at the moment. -- **Lounge hours** - The lounge will be open from 8am-6pm PT, Monday through Friday and closed on some major holidays. Go to our google maps profile to see our opening for specific holidays. -- **Make the lounge better** - Make any suggestions to improve your lounge experience in [#announce - Expensify Lounge](https://new.expensify.com/r/8292963527436014). +### Rule #1 - Getting Shit Done: +- **Order drinks from Concierge** - [Write Concierge here](https://new.expensify.com/concierge) to ask lounge questions or order beverages. Concierge will bring your order directly to you! +- **Using an office** - Offices are first come, first serve. If an office is open, feel free to use it! Please keep office use to under an hour. We currently do not allow reserving offices. +- **Lounge hours** - The lounge will be open from 8am-6pm PT, Monday through Friday and closed on some major holidays. You can review our Google Maps profile to check our holiday hours. +- **Make the lounge better** - Make any suggestions to improve the lounge experience in [#announce - Expensify Lounge](https://new.expensify.com/r/8292963527436014). -Rule #2 - Not Ruining it for Everyone Else -- **Offices are for calls** - Please do not occupy an office unless you have a call or collaborative meeting happening. Please do not stay in the offices longer than an hour. -- **Respect other people** - Please do not be too loud or distracting from others trying to work. While in chat spaces, be respectful of others’ viewpoints and keep a positive environment. -- **Stay home if you’re sick** - If you feel sick, please consider not visiting the lounge, or consider wearing a mask in public areas. -- **If you see something, say something** - If you are made to feel uncomfortable or witness others being made uncomfortable, let Concierge know. If this is happening in Chat, use our moderation tools (outlined below in the FAQ) to apply the applicable level of moderation, which includes flagging our team to take action. +### Rule #2 - Not Ruining it for Everyone Else: +- **Offices are for calls** - Please do not occupy an office unless you have a call or collaborative meeting happening, and don't stay in an office for longer than an hour. +- **Respect other people** - Please do not be too loud or distracting while others are trying to work. While collaborating in Expensify Chat, be respectful of others’ viewpoints and keep a positive environment. +- **Stay home if you’re sick** - If you feel sick, please do not visit the lounge, or consider wearing a mask in public areas. +- **If you see something, say something** - If you are made to feel uncomfortable or witness others being made uncomfortable, let Concierge know. If this is happening in Expensify Chat, use our moderation tools (outlined below in the FAQ) to apply the applicable level of moderation. -Thanks for joining us! We’re happy you are here to live rich, have fun, and save the world with us. +We’re so happy you are here to live rich, have fun, and save the world with us. Now, go enjoy the Expensify Lounge, and let's Get Shit Done! # FAQs -- What is Concierge? - - Concierge is our automated system that answers members with questions in real-time. Concierge has also been built with Expensify Lounges in mind, where questions regarding the local lounge get routed directly to Concierge IRL, who welcomes you into the lounge. Write Concierge for any drink requests or questions, and they’ll take care of everything for you. -- Who is invited to the Expensify Lounge? - - Everyone is invited to the Expensify Lounge! Whether you're an existing customer, or are just looking for a great space to get shit done, we'd love to have you. -- How do I escalate bad behavior? - - If you think something needs to be escalated from a chat space, use our escalation feature in chat to denote a chat as: - - “Spam” or “Inconsiderate” - this will send a whisper to the sender of the message warning them of the violation, and the message will have a flag applied to it which will be visible to all users. Concierge will not review these flags. - - “Intimidating” or “Bullying” - The message will be immediately hidden, and the content will be reviewed by our team. Users will be able to click to reveal the hidden message. After review and if verified to be one of the above, the message will be permanently hidden, and a message will be sent to the sender of the message, warning them of the violation. - - “Harassment” or “Assault” - The message will be immediately hidden and reviewed by our team. The user will be sent a message to warning them of the violation. Users will not be able to view the removed message. If not, the message will be visible again as usual. Concierge will also be able to block the user if they determine it necessary. - - If you witness something IRL, please write to Concierge referencing which lounge you are in, and they will escalate it appropriately. -- Where are other Expensify Lounge locations? - - Right now, we only have the San Francisco Lounge, but be on the lookout for more coming soon! + +#### What is Concierge? + +Concierge is our automated system that answers member questions in real-time. Questions regarding the local lounge will be routed directly to the lounge's Concierge. You can send Concierge a message if you have a drink request or general questions. They’ll take care of everything for you! + +#### Who is invited to the Expensify Lounge? + +Everyone is invited to the Expensify Lounge! Whether you're an existing customer, or you're someone looking for a great space to Get Shit Done, we'd love to have you. + +#### How do I escalate something that's making me or someone else uncomfortable? + +If you see something in Expensify Chat that should be escalated, you can use the escalation feature to mark a chat as: +- **Spam or Inconsiderate**: This will send a whisper to the sender of the message warning them of the violation, and the message will have a flag applied to it which will be visible to all users. Concierge will not review these flags. +- **Intimidating or Bullying**: The message will be immediately hidden, and the content will be reviewed by our team. After reviewing the message, and it's confirmed intimidation or bullying, the message will be permanently hidden and we'll communicate the violation to the sender of the message. +- **Harassment or Assault**: The message will be immediately hidden and reviewed by our team. The user will be sent a message to warning them of the violation, and Concierge can block the user if that's deemed necessary. + +If you witness something in-person, please write to Concierge referencing which lounge you are in, and they will escalate the issue appropriately. + +#### Where are other Expensify Lounge locations? + +Right now, we only have the San Francisco Lounge, but be on the lookout for more coming soon! From 1279f0fff70186db9a4c0f4be16afbb990e14d3b Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Mon, 11 Mar 2024 11:55:30 +0100 Subject: [PATCH 002/512] Initial config for TripRoomPreview --- src/CONST.ts | 1 + .../ReportActionItem/TripRoomPreview.tsx | 43 +++++++++++++++++++ src/libs/ReportUtils.ts | 5 +++ src/pages/home/report/ReportActionItem.tsx | 5 +++ src/types/onyx/Transaction.ts | 37 ++++++++++++++++ 5 files changed, 91 insertions(+) create mode 100644 src/components/ReportActionItem/TripRoomPreview.tsx diff --git a/src/CONST.ts b/src/CONST.ts index 70fecab70c39..d0aae5a2dac8 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -574,6 +574,7 @@ const CONST = { ACTIONS: { LIMIT: 50, TYPE: { + ACTION_TRIPPREVIEW: 'ACTION_TRIPPREVIEW', ADDCOMMENT: 'ADDCOMMENT', ACTIONABLEJOINREQUEST: 'ACTIONABLEJOINREQUEST', APPROVED: 'APPROVED', diff --git a/src/components/ReportActionItem/TripRoomPreview.tsx b/src/components/ReportActionItem/TripRoomPreview.tsx new file mode 100644 index 000000000000..3f0b46ac6f77 --- /dev/null +++ b/src/components/ReportActionItem/TripRoomPreview.tsx @@ -0,0 +1,43 @@ +import React, {useMemo} from 'react'; +import {View} from 'react-native'; +import type {StyleProp, ViewStyle} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; +import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; +import Button from '@components/Button'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import SettlementButton from '@components/SettlementButton'; +import {showContextMenuForReport} from '@components/ShowContextMenuContext'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import usePermissions from '@hooks/usePermissions'; +import useTheme from '@hooks/useTheme'; +import useThemeStyles from '@hooks/useThemeStyles'; +import ControlSelection from '@libs/ControlSelection'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReceiptUtils from '@libs/ReceiptUtils'; +import * as ReportActionUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import type {ContextMenuAnchor} from '@pages/home/report/ContextMenu/ReportActionContextMenu'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import type {TranslationPaths} from '@src/languages/types'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import type {Policy, Report, ReportAction, Session, Transaction, TransactionViolations} from '@src/types/onyx'; +import type {PaymentMethodType} from '@src/types/onyx/OriginalMessage'; +import ReportActionItemImages from './ReportActionItemImages'; + +function TripRoomPreview() { + return null; +} + +// TripRoomPreview.displayName = 'ReportPreview'; + +export default TripRoomPreview; diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index e062a4857e19..eaf610fea7a6 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -5187,6 +5187,10 @@ function shouldCreateNewMoneyRequestReport(existingIOUReport: OnyxEntry return !existingIOUReport || hasIOUWaitingOnCurrentUserBankAccount(chatReport) || !canAddOrDeleteTransactions(existingIOUReport); } +function getTripTransactions(expenseReportID: string) { + return expenseReportID; +} + export { getReportParticipantsTitle, isReportMessageAttachment, @@ -5394,6 +5398,7 @@ export { isJoinRequestInAdminRoom, canAddOrDeleteTransactions, shouldCreateNewMoneyRequestReport, + getTripTransactions, }; export type { diff --git a/src/pages/home/report/ReportActionItem.tsx b/src/pages/home/report/ReportActionItem.tsx index a37138b43039..a71aafe5eab4 100644 --- a/src/pages/home/report/ReportActionItem.tsx +++ b/src/pages/home/report/ReportActionItem.tsx @@ -28,6 +28,7 @@ import ReportPreview from '@components/ReportActionItem/ReportPreview'; import TaskAction from '@components/ReportActionItem/TaskAction'; import TaskPreview from '@components/ReportActionItem/TaskPreview'; import TaskView from '@components/ReportActionItem/TaskView'; +import TripRoomPreview from '@components/ReportActionItem/TripRoomPreview'; import {ShowContextMenuContext} from '@components/ShowContextMenuContext'; import Text from '@components/Text'; import UnreadActionIndicator from '@components/UnreadActionIndicator'; @@ -664,6 +665,10 @@ function ReportActionItem({ return {content}; }; + if (action.actionName === CONST.REPORT.ACTIONS.TYPE.ACTION_TRIPPREVIEW) { + return ; + } + if (action.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED) { const parentReportAction = parentReportActions?.[report.parentReportActionID ?? ''] ?? null; if (ReportActionsUtils.isTransactionThread(parentReportAction)) { diff --git a/src/types/onyx/Transaction.ts b/src/types/onyx/Transaction.ts index 1a7541955720..b48d90b9935b 100644 --- a/src/types/onyx/Transaction.ts +++ b/src/types/onyx/Transaction.ts @@ -95,6 +95,41 @@ type TaxRate = { data?: TaxRateData; }; +type Reservation = { + company: Company; + confirmations: ReservationConfirmation[]; + start: ReservationTimeDetails; + end: ReservationTimeDetails; + numPassengers?: number; + numberOfRooms?: number; + route: { + class: string; + number: string; + }; + type: ReservationType; +}; + +type ReservationTimeDetails = { + address: string; + date: string; + longName: string; + shortName: string; + timezoneOffset: number; +}; + +type Company = { + longName: string; + shortName?: string; + phone?: string; +}; + +type ReservationConfirmation = { + name: string; + value: string; +}; + +type ReservationType = 'flight' | 'hotel'; + type Transaction = OnyxCommon.OnyxValueWithOfflineFeedback< { /** The original transaction amount */ @@ -209,6 +244,8 @@ type Transaction = OnyxCommon.OnyxValueWithOfflineFeedback< /** Indicates transaction loading */ isLoading?: boolean; + + reservationList?: Reservation[]; }, keyof Comment >; From 370d8a85e5a746c1bc4bb956d6c7ec3c55386d7b Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Tue, 12 Mar 2024 15:31:54 +0100 Subject: [PATCH 003/512] Add template of ReservationRow component --- assets/images/bed.svg | 1 + assets/images/car-with-key.svg | 1 + assets/images/plane.svg | 1 + src/components/Icon/Expensicons.ts | 6 + .../ReportActionItem/ReportPreview.tsx | 3 + .../ReportActionItem/TripRoomPreview.tsx | 163 ++++++++++++++---- src/languages/en.ts | 5 + src/types/onyx/Transaction.ts | 2 +- 8 files changed, 152 insertions(+), 30 deletions(-) create mode 100644 assets/images/bed.svg create mode 100644 assets/images/car-with-key.svg create mode 100644 assets/images/plane.svg diff --git a/assets/images/bed.svg b/assets/images/bed.svg new file mode 100644 index 000000000000..fd654c036a7c --- /dev/null +++ b/assets/images/bed.svg @@ -0,0 +1 @@ + diff --git a/assets/images/car-with-key.svg b/assets/images/car-with-key.svg new file mode 100644 index 000000000000..1586c0dfecfa --- /dev/null +++ b/assets/images/car-with-key.svg @@ -0,0 +1 @@ + diff --git a/assets/images/plane.svg b/assets/images/plane.svg new file mode 100644 index 000000000000..bf4d56875239 --- /dev/null +++ b/assets/images/plane.svg @@ -0,0 +1 @@ + diff --git a/src/components/Icon/Expensicons.ts b/src/components/Icon/Expensicons.ts index d9f46203a703..0b928b6e939d 100644 --- a/src/components/Icon/Expensicons.ts +++ b/src/components/Icon/Expensicons.ts @@ -16,6 +16,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'; @@ -25,6 +26,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'; @@ -111,6 +113,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'; @@ -310,4 +313,7 @@ export { ChatBubbleUnread, ChatBubbleReply, Lightbulb, + Plane, + Bed, + CarWithKey, }; diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 381302489699..792be5bc7d8f 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -33,6 +33,7 @@ import ROUTES from '@src/ROUTES'; import type {Policy, Report, ReportAction, Session, Transaction, TransactionViolations} from '@src/types/onyx'; import type {PaymentMethodType} from '@src/types/onyx/OriginalMessage'; import ReportActionItemImages from './ReportActionItemImages'; +import TripRoomPreview from './TripRoomPreview'; type ReportPreviewOnyxProps = { /** The policy tied to the money request report */ @@ -105,6 +106,8 @@ function ReportPreview({ const {translate} = useLocalize(); const {canUseViolations} = usePermissions(); + return ; + const {hasMissingSmartscanFields, areAllRequestsBeingSmartScanned, hasOnlyTransactionsWithPendingRoutes, hasNonReimbursableTransactions} = useMemo( () => ({ hasMissingSmartscanFields: ReportUtils.hasMissingSmartscanFields(iouReportID), diff --git a/src/components/ReportActionItem/TripRoomPreview.tsx b/src/components/ReportActionItem/TripRoomPreview.tsx index 3f0b46ac6f77..8dc363e1fd88 100644 --- a/src/components/ReportActionItem/TripRoomPreview.tsx +++ b/src/components/ReportActionItem/TripRoomPreview.tsx @@ -1,43 +1,148 @@ -import React, {useMemo} from 'react'; +import React from 'react'; import {View} from 'react-native'; -import type {StyleProp, ViewStyle} from 'react-native'; +import {FlatList} from 'react-native'; +import type {OnyxCollection} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; -import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import Button from '@components/Button'; import Icon from '@components/Icon'; -import * as Expensicons from '@components/Icon/Expensicons'; import OfflineWithFeedback from '@components/OfflineWithFeedback'; -import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; -import SettlementButton from '@components/SettlementButton'; -import {showContextMenuForReport} from '@components/ShowContextMenuContext'; import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; -import usePermissions from '@hooks/usePermissions'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; -import ControlSelection from '@libs/ControlSelection'; -import * as CurrencyUtils from '@libs/CurrencyUtils'; -import * as DeviceCapabilities from '@libs/DeviceCapabilities'; -import Navigation from '@libs/Navigation/Navigation'; -import * as PolicyUtils from '@libs/PolicyUtils'; -import * as ReceiptUtils from '@libs/ReceiptUtils'; -import * as ReportActionUtils from '@libs/ReportActionsUtils'; -import * as ReportUtils from '@libs/ReportUtils'; -import * as TransactionUtils from '@libs/TransactionUtils'; -import type {ContextMenuAnchor} from '@pages/home/report/ContextMenu/ReportActionContextMenu'; -import * as IOU from '@userActions/IOU'; -import CONST from '@src/CONST'; -import type {TranslationPaths} from '@src/languages/types'; +import * as Expensicons from '@src/components/Icon/Expensicons'; import ONYXKEYS from '@src/ONYXKEYS'; -import ROUTES from '@src/ROUTES'; -import type {Policy, Report, ReportAction, Session, Transaction, TransactionViolations} from '@src/types/onyx'; -import type {PaymentMethodType} from '@src/types/onyx/OriginalMessage'; -import ReportActionItemImages from './ReportActionItemImages'; +import type {ReportAction, Transaction} from '@src/types/onyx'; +import type {Reservation} from '@src/types/onyx/Transaction'; -function TripRoomPreview() { - return null; +const reservations: Reservation[] = []; + +type TripRoomPreviewOnyxProps = { + /** All the transactions, used to update ReportPreview label and status */ + transactions: OnyxCollection; +}; + +type TripRoomPreviewProps = TripRoomPreviewOnyxProps & { + /** All the data of the action */ + action: ReportAction; + + // /** The associated chatReport */ + // chatReportID: string; + + // /** The active IOUReport, used for Onyx subscription */ + // iouReportID: string; + + // /** The report's policyID, used for Onyx subscription */ + // policyID: string; + + // /** Extra styles to pass to View wrapper */ + // containerStyles?: StyleProp; + + // /** Popover context menu anchor, used for showing context menu */ + // contextMenuAnchor?: ContextMenuAnchor; + + // /** Callback for updating context menu active state, used for showing context menu */ + // checkIfContextMenuActive?: () => void; + + // /** Whether a message is a whisper */ + // isWhisper?: boolean; + + // /** Whether the corresponding report action item is hovered */ + // isHovered?: boolean; +}; + +type ReservationRowProps = { + reservation: Reservation; +}; + +function ReservationRow({reservation}: ReservationRowProps) { + const theme = useTheme(); + const styles = useThemeStyles(); + const {translate} = useLocalize(); + return ( + + + + + + {translate(`travel.${reservation.type}`)} + {reservation.type === 'flight' ? ( + + {reservation.start.shortName} + + {reservation.end.shortName} + + ) : ( + {reservation.start.address} + )} + + + ); +} + +function TripRoomPreview({action, transactions}: TripRoomPreviewProps) { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + + return ( + + + + + + + Trip • December 15-20 + + + + + + $1234 + + + + + + + Trip to San Francisco + + + + + {reservations.map((reservation) => ( + + ))} +