diff --git a/assets/images/LaptopwithSecondScreenandHourglass.svg b/assets/images/LaptopwithSecondScreenandHourglass.svg
new file mode 100644
index 000000000000..c838c82c55ce
--- /dev/null
+++ b/assets/images/LaptopwithSecondScreenandHourglass.svg
@@ -0,0 +1,245 @@
+
+
\ No newline at end of file
diff --git a/src/CONST.ts b/src/CONST.ts
index 7fb0d320c43a..00e17af072cf 100755
--- a/src/CONST.ts
+++ b/src/CONST.ts
@@ -897,6 +897,10 @@ const CONST = {
INDIVIDUAL: 'individual',
BUSINESS: 'policy',
},
+ EXPORT_OPTIONS: {
+ EXPORT_TO_INTEGRATION: 'exportToIntegration',
+ MARK_AS_EXPORTED: 'markAsExported',
+ },
},
NEXT_STEP: {
FINISHED: 'Finished!',
@@ -2456,6 +2460,7 @@ const CONST = {
SETTINGS: 'settings',
LEAVE_ROOM: 'leaveRoom',
PRIVATE_NOTES: 'privateNotes',
+ EXPORT: 'export',
DELETE: 'delete',
MARK_AS_INCOMPLETE: 'markAsIncomplete',
CANCEL_PAYMENT: 'cancelPayment',
diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts
index b06b05dac7e1..75714f221293 100755
--- a/src/ONYXKEYS.ts
+++ b/src/ONYXKEYS.ts
@@ -373,6 +373,9 @@ const ONYXKEYS = {
/** Stores info during review duplicates flow */
REVIEW_DUPLICATES: 'reviewDuplicates',
+ /** Stores the last export method for policy */
+ LAST_EXPORT_METHOD: 'lastExportMethod',
+
/** Stores the information about the state of issuing a new card */
ISSUE_NEW_EXPENSIFY_CARD: 'issueNewExpensifyCard',
@@ -745,6 +748,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.NVP_DISMISSED_HOLD_USE_EXPLANATION]: boolean;
[ONYXKEYS.FOCUS_MODE_NOTIFICATION]: boolean;
[ONYXKEYS.NVP_LAST_PAYMENT_METHOD]: OnyxTypes.LastPaymentMethod;
+ [ONYXKEYS.LAST_EXPORT_METHOD]: OnyxTypes.LastExportMethod;
[ONYXKEYS.NVP_RECENT_WAYPOINTS]: OnyxTypes.RecentWaypoint[];
[ONYXKEYS.NVP_INTRO_SELECTED]: OnyxTypes.IntroSelected;
[ONYXKEYS.NVP_LAST_SELECTED_DISTANCE_RATES]: OnyxTypes.LastSelectedDistanceRates;
diff --git a/src/ROUTES.ts b/src/ROUTES.ts
index 2f3372144610..6bcec45b7f14 100644
--- a/src/ROUTES.ts
+++ b/src/ROUTES.ts
@@ -3,7 +3,7 @@ import type CONST from './CONST';
import type {IOUAction, IOUType} from './CONST';
import type {IOURequestType} from './libs/actions/IOU';
import type {AuthScreensParamList} from './libs/Navigation/types';
-import type {SageIntacctMappingName} from './types/onyx/Policy';
+import type {ConnectionName, SageIntacctMappingName} from './types/onyx/Policy';
import type {SearchQuery} from './types/onyx/SearchResults';
import type AssertTypesNotEqual from './types/utils/AssertTypesNotEqual';
@@ -286,6 +286,10 @@ const ROUTES = {
route: 'r/:reportID/details',
getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/details`, backTo),
},
+ REPORT_WITH_ID_DETAILS_EXPORT: {
+ route: 'r/:reportID/details/export/:connectionName',
+ getRoute: (reportID: string, connectionName: ConnectionName) => `r/${reportID}/details/export/${connectionName}` as const,
+ },
REPORT_SETTINGS: {
route: 'r/:reportID/settings',
getRoute: (reportID: string) => `r/${reportID}/settings` as const,
diff --git a/src/SCREENS.ts b/src/SCREENS.ts
index b2f1ee002669..3d053c6d8160 100644
--- a/src/SCREENS.ts
+++ b/src/SCREENS.ts
@@ -147,6 +147,7 @@ const SCREENS = {
SEARCH_REPORT: 'SearchReport',
SETTINGS_CATEGORIES: 'SettingsCategories',
RESTRICTED_ACTION: 'RestrictedAction',
+ REPORT_EXPORT: 'Report_Export',
},
ONBOARDING_MODAL: {
ONBOARDING: 'Onboarding',
@@ -240,6 +241,7 @@ const SCREENS = {
REPORT_DETAILS: {
ROOT: 'Report_Details_Root',
SHARE_CODE: 'Report_Details_Share_Code',
+ EXPORT: 'Report_Details_Export',
},
WORKSPACE: {
diff --git a/src/components/ButtonWithDropdownMenu/types.ts b/src/components/ButtonWithDropdownMenu/types.ts
index 59621a8dd58c..baac60190ce5 100644
--- a/src/components/ButtonWithDropdownMenu/types.ts
+++ b/src/components/ButtonWithDropdownMenu/types.ts
@@ -14,6 +14,8 @@ type WorkspaceDistanceRatesBulkActionType = DeepValueOf;
+type ReportExportType = DeepValueOf;
+
type DropdownOption = {
value: TValueType;
text: string;
@@ -84,4 +86,12 @@ type ButtonWithDropdownMenuProps = {
isSplitButton?: boolean;
};
-export type {PaymentType, WorkspaceMemberBulkActionType, WorkspaceDistanceRatesBulkActionType, DropdownOption, ButtonWithDropdownMenuProps, WorkspaceTaxRatesBulkActionType};
+export type {
+ PaymentType,
+ WorkspaceMemberBulkActionType,
+ WorkspaceDistanceRatesBulkActionType,
+ DropdownOption,
+ ButtonWithDropdownMenuProps,
+ WorkspaceTaxRatesBulkActionType,
+ ReportExportType,
+};
diff --git a/src/components/ConfirmationPage.tsx b/src/components/ConfirmationPage.tsx
index 883e7261f386..a95cf9bf87d2 100644
--- a/src/components/ConfirmationPage.tsx
+++ b/src/components/ConfirmationPage.tsx
@@ -1,9 +1,12 @@
import React from 'react';
-import type {TextStyle} from 'react-native';
+import type {TextStyle, ViewStyle} from 'react-native';
import {View} from 'react-native';
import useThemeStyles from '@hooks/useThemeStyles';
+import isIllustrationLottieAnimation from '@libs/isIllustrationLottieAnimation';
+import type IconAsset from '@src/types/utils/IconAsset';
import Button from './Button';
import FixedFooter from './FixedFooter';
+import ImageSVG from './ImageSVG';
import Lottie from './Lottie';
import LottieAnimations from './LottieAnimations';
import type DotLottieAnimation from './LottieAnimations/types';
@@ -11,7 +14,7 @@ import Text from './Text';
type ConfirmationPageProps = {
/** The asset to render */
- animation?: DotLottieAnimation;
+ illustration?: DotLottieAnimation | IconAsset;
/** Heading of the confirmation page */
heading: string;
@@ -31,31 +34,45 @@ type ConfirmationPageProps = {
/** Additional style for the heading */
headingStyle?: TextStyle;
+ /** Additional style for the animation */
+ illustrationStyle?: ViewStyle;
+
/** Additional style for the description */
descriptionStyle?: TextStyle;
};
function ConfirmationPage({
- animation = LottieAnimations.Fireworks,
+ illustration = LottieAnimations.Fireworks,
heading,
description,
buttonText = '',
onButtonPress = () => {},
shouldShowButton = false,
headingStyle,
+ illustrationStyle,
descriptionStyle,
}: ConfirmationPageProps) {
const styles = useThemeStyles();
+ const isLottie = isIllustrationLottieAnimation(illustration);
return (
<>
-
+ {isLottie ? (
+
+ ) : (
+
+
+
+ )}
{heading}
{description}
diff --git a/src/components/Icon/Illustrations.ts b/src/components/Icon/Illustrations.ts
index b4dd8f254e25..6499e8eceb6e 100644
--- a/src/components/Icon/Illustrations.ts
+++ b/src/components/Icon/Illustrations.ts
@@ -1,4 +1,5 @@
import ExpensifyCardIllustration from '@assets/images/expensifyCard/cardIllustration.svg';
+import LaptopwithSecondScreenandHourglass from '@assets/images/LaptopwithSecondScreenandHourglass.svg';
import Abracadabra from '@assets/images/product-illustrations/abracadabra.svg';
import BankArrowPink from '@assets/images/product-illustrations/bank-arrow--pink.svg';
import BankMouseGreen from '@assets/images/product-illustrations/bank-mouse--green.svg';
@@ -146,6 +147,7 @@ export {
PinkBill,
CreditCardsNew,
InvoiceBlue,
+ LaptopwithSecondScreenandHourglass,
LockOpen,
Luggage,
MoneyIntoWallet,
diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx
index 6777bbf6c269..51c64650477a 100644
--- a/src/components/MoneyReportHeader.tsx
+++ b/src/components/MoneyReportHeader.tsx
@@ -9,6 +9,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import * as CurrencyUtils from '@libs/CurrencyUtils';
import Navigation from '@libs/Navigation/Navigation';
+import * as PolicyUtils from '@libs/PolicyUtils';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import * as ReportUtils from '@libs/ReportUtils';
import * as TransactionUtils from '@libs/TransactionUtils';
@@ -34,6 +35,7 @@ import type {MoneyRequestHeaderStatusBarProps} from './MoneyRequestHeaderStatusB
import type {ActionHandledType} from './ProcessMoneyReportHoldMenu';
import ProcessMoneyReportHoldMenu from './ProcessMoneyReportHoldMenu';
import ProcessMoneyRequestHoldMenu from './ProcessMoneyRequestHoldMenu';
+import ExportWithDropdownMenu from './ReportActionItem/ExportWithDropdownMenu';
import SettlementButton from './SettlementButton';
type MoneyReportHeaderProps = {
@@ -99,6 +101,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
const canAllowSettlement = ReportUtils.hasUpdatedTotal(moneyRequestReport, policy);
const policyType = policy?.type;
const isDraft = ReportUtils.isOpenExpenseReport(moneyRequestReport);
+ const connectedIntegration = PolicyUtils.getConnectedIntegration(policy);
const navigateBackToAfterDelete = useRef();
const hasScanningReceipt = ReportUtils.getTransactionsWithReceipts(moneyRequestReport?.reportID).some((t) => TransactionUtils.isReceiptBeingScanned(t));
@@ -113,15 +116,19 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
const shouldDisableApproveButton = shouldShowApproveButton && !ReportUtils.isAllowedToApproveExpenseReport(moneyRequestReport);
- const shouldShowSettlementButton = (shouldShowPayButton || shouldShowApproveButton) && !allHavePendingRTERViolation;
-
const shouldShowSubmitButton = isDraft && reimbursableSpend !== 0 && !allHavePendingRTERViolation;
+
+ const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && !!policy;
+
+ const shouldShowSettlementButton = (shouldShowPayButton || shouldShowApproveButton) && !allHavePendingRTERViolation && !shouldShowExportIntegrationButton;
+
const shouldDisableSubmitButton = shouldShowSubmitButton && !ReportUtils.isAllowedToSubmitDraftExpenseReport(moneyRequestReport);
const shouldShowMarkAsCashButton = isDraft && allHavePendingRTERViolation;
const isFromPaidPolicy = policyType === CONST.POLICY.TYPE.TEAM || policyType === CONST.POLICY.TYPE.CORPORATE;
const shouldShowStatusBar = allHavePendingRTERViolation || hasOnlyHeldExpenses || hasScanningReceipt;
const shouldShowNextStep = !ReportUtils.isClosedExpenseReportWithNoExpenses(moneyRequestReport) && isFromPaidPolicy && !!nextStep?.message?.length && !shouldShowStatusBar;
- const shouldShowAnyButton = shouldShowSettlementButton || shouldShowApproveButton || shouldShowSubmitButton || shouldShowNextStep || allHavePendingRTERViolation;
+ const shouldShowAnyButton =
+ shouldShowSettlementButton || shouldShowApproveButton || shouldShowSubmitButton || shouldShowNextStep || allHavePendingRTERViolation || shouldShowExportIntegrationButton;
const bankAccountRoute = ReportUtils.getBankAccountRoute(chatReport);
const formattedAmount = CurrencyUtils.convertToDisplayString(reimbursableSpend, moneyRequestReport.currency);
const [nonHeldAmount, fullAmount] = ReportUtils.getNonHeldAndFullAmount(moneyRequestReport, policy);
@@ -275,6 +282,15 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
/>
)}
+ {shouldShowExportIntegrationButton && !shouldUseNarrowLayout && (
+
+
+
+ )}
{shouldShowSubmitButton && !shouldUseNarrowLayout && (
)}
+ {shouldShowExportIntegrationButton && shouldUseNarrowLayout && (
+
+ )}
{shouldShowSubmitButton && shouldUseNarrowLayout && (
- {shouldShowSettlementButton && (
+ {shouldShowSettlementButton && !shouldShowExportIntegrationButton && (
)}
+ {shouldShowExportIntegrationButton && (
+
+ )}
{shouldShowSubmitButton && (