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

Feat/ Dupe detection review page #41093

Merged
merged 69 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
f16c1e8
wip
kubabutkiewicz Apr 19, 2024
7e90c81
feat: added new routes
kubabutkiewicz Apr 19, 2024
75bdf99
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Apr 19, 2024
4826ba4
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Apr 22, 2024
7a8e5f3
feat: added navigation config for review dupe detection, created init…
kubabutkiewicz Apr 22, 2024
2badafd
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Apr 24, 2024
93c8864
feat: added new pages for duplicate transaction flow, added new endpo…
kubabutkiewicz Apr 25, 2024
48ddf2a
feat: add new entry in onyxkeys and create review duplicates form
kubabutkiewicz Apr 26, 2024
88bd59c
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Apr 26, 2024
4a7bd5b
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz May 6, 2024
cd92dea
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz May 6, 2024
6ca2855
feat: added failure data to DissmisViolation endpoint, save progress …
kubabutkiewicz May 7, 2024
635108b
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz May 9, 2024
6a71395
fix: did some refactor
kubabutkiewicz May 9, 2024
6a9df94
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz May 14, 2024
9a16926
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz May 15, 2024
a5c0d6c
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz May 16, 2024
9173bf2
fix: dismissViolation optimistic data
kubabutkiewicz May 17, 2024
10c1dd0
fix: some fixes
kubabutkiewicz May 17, 2024
eb78187
fix: remove transaction id from money request view
kubabutkiewicz May 17, 2024
e8afcb5
fix
kubabutkiewicz May 17, 2024
04079ae
fix
kubabutkiewicz May 17, 2024
94d82ce
fix: types
kubabutkiewicz May 17, 2024
fe3fca7
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz May 17, 2024
6b0ff1d
fix: lint
kubabutkiewicz May 17, 2024
a16260e
fix: form type
kubabutkiewicz May 17, 2024
d68b2a2
fixes
kubabutkiewicz May 17, 2024
7549ba9
fixes
kubabutkiewicz May 17, 2024
0f7703e
fix: added some small fixes
kubabutkiewicz May 20, 2024
14076e4
fix: resolve review comments
kubabutkiewicz May 20, 2024
88c013e
fix: resolve review comment
kubabutkiewicz May 20, 2024
bbcadfe
fix: resolve review comments
kubabutkiewicz May 21, 2024
9159418
resolve lint problem
kubabutkiewicz May 22, 2024
9a08953
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz May 24, 2024
19ba200
fix: types
kubabutkiewicz May 24, 2024
fb7abdc
feat: add optimistic report action
kubabutkiewicz May 24, 2024
cd366a3
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz May 27, 2024
7d46080
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 3, 2024
146708c
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 5, 2024
b679794
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 7, 2024
5840c37
fix: lint and typecheck
kubabutkiewicz Jun 7, 2024
7ff4c33
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 10, 2024
a9a34ce
fix: resolve comments
kubabutkiewicz Jun 10, 2024
7d80cf5
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 11, 2024
03a5d42
fix: lint
kubabutkiewicz Jun 11, 2024
1d6c762
fix: resolve comments
kubabutkiewicz Jun 11, 2024
4abd84a
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 12, 2024
a4574d0
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 13, 2024
097b51a
fix: resolve comment
kubabutkiewicz Jun 13, 2024
d7022a3
fix: typecheck
kubabutkiewicz Jun 13, 2024
8785917
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 14, 2024
51a2675
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 17, 2024
c989464
fix: disable context menu on long press, changed a message text, add …
kubabutkiewicz Jun 17, 2024
008f67c
fix: create optimistic report action for each of transactions
kubabutkiewicz Jun 18, 2024
f7dc696
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 18, 2024
b68f75f
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 19, 2024
38450ce
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 20, 2024
e2c54bd
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 20, 2024
9233eed
fix: ts issue
kubabutkiewicz Jun 20, 2024
19bd7b0
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 20, 2024
9ba3a88
fix: typecheck
kubabutkiewicz Jun 20, 2024
8a40eae
fix: lint error
kubabutkiewicz Jun 20, 2024
1c829a3
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 21, 2024
b7dd5b9
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into f…
kubabutkiewicz Jun 21, 2024
596c39a
fix: typecheck
kubabutkiewicz Jun 21, 2024
01c37c1
fix: lint
kubabutkiewicz Jun 21, 2024
47f1375
fix: resolve comment
kubabutkiewicz Jun 21, 2024
8b1550b
fix: lint
kubabutkiewicz Jun 21, 2024
bae8223
fix: resolve comment
kubabutkiewicz Jun 21, 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
4 changes: 4 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ const ONYXKEYS = {
/** Holds the checks used while transferring the ownership of the workspace */
POLICY_OWNERSHIP_CHANGE_CHECKS: 'policyOwnershipChangeChecks',

/** Stores info during review duplicates flow */
REVIEW_DUPLICATES: 'reviewDuplicates',
kubabutkiewicz marked this conversation as resolved.
Show resolved Hide resolved

/** Collection Keys */
COLLECTION: {
DOWNLOAD: 'download_',
Expand Down Expand Up @@ -719,6 +722,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.CACHED_PDF_PATHS]: Record<string, string>;
[ONYXKEYS.POLICY_OWNERSHIP_CHANGE_CHECKS]: Record<string, OnyxTypes.PolicyOwnershipChangeChecks>;
[ONYXKEYS.NVP_QUICK_ACTION_GLOBAL_CREATE]: OnyxTypes.QuickAction;
[ONYXKEYS.REVIEW_DUPLICATES]: OnyxTypes.ReviewDuplicates;
[ONYXKEYS.NVP_FIRST_DAY_FREE_TRIAL]: string;
[ONYXKEYS.NVP_LAST_DAY_FREE_TRIAL]: string;
[ONYXKEYS.NVP_BILLING_FUND_ID]: number;
Expand Down
5 changes: 5 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,11 @@ const ROUTES = {
route: 'r/:reportID/transaction/:transactionID/receipt',
getRoute: (reportID: string, transactionID: string) => `r/${reportID}/transaction/${transactionID}/receipt` as const,
},
TRANSACTION_DUPLICATE_REVIEW_PAGE: {
route: 'r/:threadReportID/duplicates/review',
getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/review` as const,
},

POLICY_ACCOUNTING_XERO_IMPORT: {
route: 'settings/workspaces/:policyID/accounting/xero/import',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/xero/import` as const,
Expand Down
5 changes: 5 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ const SCREENS = {
ROOM_INVITE: 'RoomInvite',
REFERRAL: 'Referral',
PROCESS_MONEY_REQUEST_HOLD: 'ProcessMoneyRequestHold',
TRANSACTION_DUPLICATE: 'TransactionDuplicate',
TRAVEL: 'Travel',
SEARCH_REPORT: 'SearchReport',
SETTINGS_CATEGORIES: 'SettingsCategories',
Expand Down Expand Up @@ -179,6 +180,10 @@ const SCREENS = {
STATE_SELECTOR: 'Money_Request_State_Selector',
},

TRANSACTION_DUPLICATE: {
REVIEW: 'Transaction_Duplicate_Review',
},

IOU_SEND: {
ADD_BANK_ACCOUNT: 'IOU_Send_Add_Bank_Account',
ADD_DEBIT_CARD: 'IOU_Send_Add_Debit_Card',
Expand Down
7 changes: 6 additions & 1 deletion src/components/MoneyRequestHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function MoneyRequestHeader({report, parentReportAction, policy, shouldUseNarrow
const isApprover = ReportUtils.isMoneyRequestReport(moneyRequestReport) && moneyRequestReport?.managerID !== null && session?.accountID === moneyRequestReport?.managerID;
const hasAllPendingRTERViolations = TransactionUtils.allHavePendingRTERViolation([transaction?.transactionID ?? '-1']);
const shouldShowMarkAsCashButton = isDraft && hasAllPendingRTERViolations;

const deleteTransaction = useCallback(() => {
if (parentReportAction) {
const iouTransactionID = ReportActionsUtils.isMoneyRequestAction(parentReportAction) ? ReportActionsUtils.getOriginalMessage(parentReportAction)?.IOUTransactionID ?? '-1' : '-1';
Expand Down Expand Up @@ -245,6 +244,9 @@ function MoneyRequestHeader({report, parentReportAction, policy, shouldUseNarrow
medium
text={translate('iou.reviewDuplicates')}
style={[styles.p0]}
onPress={() => {
Navigation.navigate(ROUTES.TRANSACTION_DUPLICATE_REVIEW_PAGE.getRoute(report.reportID));
}}
/>
)}
</HeaderWithBackButton>
Expand All @@ -266,6 +268,9 @@ function MoneyRequestHeader({report, parentReportAction, policy, shouldUseNarrow
medium
text={translate('iou.reviewDuplicates')}
style={[styles.w100, styles.pr0]}
onPress={() => {
Navigation.navigate(ROUTES.TRANSACTION_DUPLICATE_REVIEW_PAGE.getRoute(report.reportID));
}}
/>
</View>
)}
Expand Down
6 changes: 5 additions & 1 deletion src/components/ReportActionItem/MoneyRequestAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ type MoneyRequestActionProps = MoneyRequestActionOnyxProps & {

/** Styles to be assigned to Container */
style?: StyleProp<ViewStyle>;

/** Whether context menu should be shown on press */
shouldDisplayContextMenu?: boolean;
};

function MoneyRequestAction({
Expand All @@ -75,11 +78,11 @@ function MoneyRequestAction({
isHovered = false,
style,
isWhisper = false,
shouldDisplayContextMenu = true,
}: MoneyRequestActionProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const {isOffline} = useNetwork();

const isSplitBillAction = ReportActionsUtils.isSplitBillAction(action);
const isTrackExpenseAction = ReportActionsUtils.isTrackExpenseAction(action);

Expand Down Expand Up @@ -132,6 +135,7 @@ function MoneyRequestAction({
containerStyles={[styles.cursorPointer, isHovered ? styles.reportPreviewBoxHoverBorder : undefined, style]}
isHovered={isHovered}
isWhisper={isWhisper}
shouldDisplayContextMenu={shouldDisplayContextMenu}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import {useRoute} from '@react-navigation/native';
import lodashSortBy from 'lodash/sortBy';
import truncate from 'lodash/truncate';
import React, {useMemo} from 'react';
import {View} from 'react-native';
import type {GestureResponderEvent} from 'react-native';
import Button from '@components/Button';
import Icon from '@components/Icon';
import * as Expensicons from '@components/Icon/Expensicons';
import {ReceiptScan} from '@components/Icon/Expensicons';
Expand Down Expand Up @@ -35,7 +37,10 @@ import ViolationsUtils from '@libs/Violations/ViolationsUtils';
import variables from '@styles/variables';
import * as PaymentMethods from '@userActions/PaymentMethods';
import * as Report from '@userActions/Report';
import * as Transaction from '@userActions/Transaction';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import SCREENS from '@src/SCREENS';
import type {OriginalMessageIOU} from '@src/types/onyx/OriginalMessage';
import type {EmptyObject} from '@src/types/utils/EmptyObject';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
Expand All @@ -60,12 +65,14 @@ function MoneyRequestPreviewContent({
isHovered = false,
isWhisper = false,
transactionViolations,
shouldDisplayContextMenu = true,
}: MoneyRequestPreviewProps) {
const theme = useTheme();
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const {translate} = useLocalize();
const {windowWidth} = useWindowDimensions();
const route = useRoute();
const {shouldUseNarrowLayout} = useResponsiveLayout();

const sessionAccountID = session?.accountID;
Expand Down Expand Up @@ -111,12 +118,23 @@ function MoneyRequestPreviewContent({
const isCardTransaction = TransactionUtils.isCardTransaction(transaction);
const isSettled = ReportUtils.isSettled(iouReport?.reportID);
const isDeleted = action?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
const isReviewDuplicateTransactionPage = route.name === SCREENS.TRANSACTION_DUPLICATE.REVIEW;

const isFullySettled = isSettled && !isSettlementOrApprovalPartial;
const isFullyApproved = ReportUtils.isReportApproved(iouReport) && !isSettlementOrApprovalPartial;
const shouldShowRBR = hasNoticeTypeViolations || hasViolations || hasFieldErrors || (!isFullySettled && !isFullyApproved && isOnHold);
const showCashOrCard = isCardTransaction ? translate('iou.card') : translate('iou.cash');
const shouldShowHoldMessage = !(isSettled && !isSettlementOrApprovalPartial) && isOnHold;

// Get transaction violations for given transaction id from onyx, find duplicated transactions violations and get duplicates
const duplicates = useMemo(
() =>
transactionViolations?.[`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transaction?.transactionID}`]?.find(
(violation) => violation.name === CONST.VIOLATIONS.DUPLICATED_TRANSACTION,
)?.data?.duplicates ?? [],
[transaction?.transactionID, transactionViolations],
);

/*
Show the merchant for IOUs and expenses only if:
- the merchant is not empty, is custom, or is not related to scanning smartscan;
Expand Down Expand Up @@ -145,6 +163,9 @@ function MoneyRequestPreviewContent({
};

const showContextMenu = (event: GestureResponderEvent) => {
if (!shouldDisplayContextMenu) {
return;
}
showContextMenuForReport(event, contextMenuAnchor, reportID, action, checkIfContextMenuActive);
};

Expand Down Expand Up @@ -382,6 +403,17 @@ function MoneyRequestPreviewContent({
]}
>
{childContainer}
{isReviewDuplicateTransactionPage && (
<Button
text={translate('violations.keepThisOne')}
success
medium
style={styles.p4}
onPress={() => {
Transaction.setReviewDuplicatesKey(transaction?.transactionID ?? '', duplicates);
}}
/>
)}
</PressableWithoutFeedback>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ type MoneyRequestPreviewProps = MoneyRequestPreviewOnyxProps & {

/** Whether a message is a whisper */
isWhisper?: boolean;

/** Whether context menu should be shown on press */
shouldDisplayContextMenu?: boolean;
};

type NoPendingProps = {shouldShow: false};
Expand Down
2 changes: 1 addition & 1 deletion src/components/ShowContextMenuContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ShowContextMenuContextProps = {
anchor: ContextMenuAnchor;
report: OnyxEntry<Report>;
action: OnyxEntry<ReportAction>;
transactionThreadReport: OnyxEntry<Report>;
transactionThreadReport?: OnyxEntry<Report>;
checkIfContextMenuActive: () => void;
};

Expand Down
5 changes: 5 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ export default {
expenseOnHold: 'This expense was put on hold. Review the comments for next steps.',
expenseDuplicate: 'This expense has the same details as another one. Review the duplicates to remove the hold.',
reviewDuplicates: 'Review duplicates',
keepAll: 'Keep all',
confirmApprove: 'Confirm approval amount',
confirmApprovalAmount: "Approve what's not on hold, or approve the entire report.",
confirmPay: 'Confirm payment amount',
Expand Down Expand Up @@ -3167,12 +3168,16 @@ export default {
taxOutOfPolicy: ({taxName}: ViolationsTaxOutOfPolicyParams) => `${taxName ?? 'Tax'} no longer valid`,
taxRateChanged: 'Tax rate was modified',
taxRequired: 'Missing tax rate',
keepThisOne: 'Keep this one',
hold: 'Hold',
},
violationDismissal: {
rter: {
manual: 'marked this receipt as cash.',
},
duplicatedTransaction: {
manual: 'resolved the duplicate',
},
},
videoPlayer: {
play: 'Play',
Expand Down
5 changes: 5 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ export default {
expenseOnHold: 'Este gasto está bloqueado. Revisa los comentarios para saber como proceder.',
expenseDuplicate: 'Esta solicitud tiene los mismos detalles que otra. Revise los duplicados para eliminar la retención.',
kubabutkiewicz marked this conversation as resolved.
Show resolved Hide resolved
kubabutkiewicz marked this conversation as resolved.
Show resolved Hide resolved
reviewDuplicates: 'Revisar duplicados',
keepAll: 'Mantener todos',
confirmApprove: 'Confirmar importe a aprobar',
confirmApprovalAmount: 'Aprueba lo que no está bloqueado, o aprueba todo el informe.',
confirmPay: 'Confirmar importe de pago',
Expand Down Expand Up @@ -3671,12 +3672,16 @@ export default {
taxOutOfPolicy: ({taxName}: ViolationsTaxOutOfPolicyParams) => `${taxName ?? 'El impuesto'} ya no es válido`,
taxRateChanged: 'La tasa de impuesto fue modificada',
taxRequired: 'Falta la tasa de impuesto',
keepThisOne: 'Mantener éste',
hold: 'Bloqueada',
},
violationDismissal: {
rter: {
manual: 'marcó el recibo como pagado en efectivo.',
},
duplicatedTransaction: {
manual: 'resuelto el duplicado',
},
},
videoPlayer: {
play: 'Reproducir',
Expand Down
6 changes: 6 additions & 0 deletions src/libs/API/parameters/DismissViolationParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type DismissViolationParams = {
name: string;
transactionIDList: string;
};

export default DismissViolationParams;
1 change: 1 addition & 0 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export type {default as ShareTrackedExpenseParams} from './ShareTrackedExpensePa
export type {default as CategorizeTrackedExpenseParams} from './CategorizeTrackedExpenseParams';
export type {default as LeavePolicyParams} from './LeavePolicyParams';
export type {default as OpenPolicyAccountingPageParams} from './OpenPolicyAccountingPageParams';
export type {default as DismissViolationParams} from './DismissViolationParams';
export type {default as SearchParams} from './Search';
export type {default as SendInvoiceParams} from './SendInvoiceParams';
export type {default as PayInvoiceParams} from './PayInvoiceParams';
Expand Down
2 changes: 2 additions & 0 deletions src/libs/API/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ const WRITE_COMMANDS = {
CATEGORIZE_TRACKED_EXPENSE: 'CategorizeTrackedExpense',
SHARE_TRACKED_EXPENSE: 'ShareTrackedExpense',
LEAVE_POLICY: 'LeavePolicy',
DISMISS_VIOLATION: 'DismissViolation',
ACCEPT_SPOTNANA_TERMS: 'AcceptSpotnanaTerms',
SEND_INVOICE: 'SendInvoice',
PAY_INVOICE: 'PayInvoice',
Expand Down Expand Up @@ -445,6 +446,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.CATEGORIZE_TRACKED_EXPENSE]: Parameters.CategorizeTrackedExpenseParams;
[WRITE_COMMANDS.SHARE_TRACKED_EXPENSE]: Parameters.ShareTrackedExpenseParams;
[WRITE_COMMANDS.LEAVE_POLICY]: Parameters.LeavePolicyParams;
[WRITE_COMMANDS.DISMISS_VIOLATION]: Parameters.DismissViolationParams;
[WRITE_COMMANDS.ACCEPT_SPOTNANA_TERMS]: EmptyObject;
[WRITE_COMMANDS.SEND_INVOICE]: Parameters.SendInvoiceParams;
[WRITE_COMMANDS.PAY_INVOICE]: Parameters.PayInvoiceParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import type {
SplitDetailsNavigatorParamList,
TaskDetailsNavigatorParamList,
TeachersUniteNavigatorParamList,
TransactionDuplicateNavigatorParamList,
TravelNavigatorParamList,
WalletStatementNavigatorParamList,
} from '@navigation/types';
Expand Down Expand Up @@ -368,6 +369,10 @@ const ProcessMoneyRequestHoldStackNavigator = createModalStackNavigator({
[SCREENS.PROCESS_MONEY_REQUEST_HOLD_ROOT]: () => require('../../../../pages/ProcessMoneyRequestHoldPage').default as React.ComponentType,
});

const TransactionDuplicateStackNavigator = createModalStackNavigator<TransactionDuplicateNavigatorParamList>({
[SCREENS.TRANSACTION_DUPLICATE.REVIEW]: () => require('../../../../pages/TransactionDuplicate/Review').default as React.ComponentType,
});

const SearchReportModalStackNavigator = createModalStackNavigator<SearchReportParamList>({
[SCREENS.SEARCH.REPORT_RHP]: () => require('../../../../pages/home/ReportScreen').default as React.ComponentType,
});
Expand Down Expand Up @@ -399,5 +404,6 @@ export {
SplitDetailsModalStackNavigator,
TaskModalStackNavigator,
WalletStatementStackNavigator,
TransactionDuplicateStackNavigator,
SearchReportModalStackNavigator,
};
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ function RightModalNavigator({navigation}: RightModalNavigatorProps) {
name="ProcessMoneyRequestHold"
component={ModalStackNavigators.ProcessMoneyRequestHoldStackNavigator}
/>
<Stack.Screen
name={SCREENS.RIGHT_MODAL.TRANSACTION_DUPLICATE}
component={ModalStackNavigators.TransactionDuplicateStackNavigator}
/>
<Stack.Screen
name={SCREENS.RIGHT_MODAL.TRAVEL}
component={ModalStackNavigators.TravelModalStackNavigator}
Expand Down
8 changes: 8 additions & 0 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,14 @@ const config: LinkingOptions<RootStackParamList>['config'] = {
[SCREENS.IOU_SEND.ADD_DEBIT_CARD]: ROUTES.IOU_SEND_ADD_DEBIT_CARD,
},
},
[SCREENS.RIGHT_MODAL.TRANSACTION_DUPLICATE]: {
screens: {
[SCREENS.TRANSACTION_DUPLICATE.REVIEW]: {
path: ROUTES.TRANSACTION_DUPLICATE_REVIEW_PAGE.route,
exact: true,
},
},
},
[SCREENS.RIGHT_MODAL.SPLIT_DETAILS]: {
screens: {
[SCREENS.SPLIT_DETAILS.ROOT]: ROUTES.SPLIT_BILL_DETAILS.route,
Expand Down
8 changes: 8 additions & 0 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,12 @@ type PrivateNotesNavigatorParamList = {
};
};

type TransactionDuplicateNavigatorParamList = {
[SCREENS.TRANSACTION_DUPLICATE.REVIEW]: {
threadReportID: string;
};
};

type LeftModalNavigatorParamList = {
[SCREENS.LEFT_MODAL.CHAT_FINDER]: undefined;
[SCREENS.LEFT_MODAL.WORKSPACE_SWITCHER]: undefined;
Expand Down Expand Up @@ -768,6 +774,7 @@ type RightModalNavigatorParamList = {
[SCREENS.RIGHT_MODAL.PROCESS_MONEY_REQUEST_HOLD]: NavigatorScreenParams<ProcessMoneyRequestHoldNavigatorParamList>;
[SCREENS.RIGHT_MODAL.REFERRAL]: NavigatorScreenParams<ReferralDetailsNavigatorParamList>;
[SCREENS.RIGHT_MODAL.PRIVATE_NOTES]: NavigatorScreenParams<PrivateNotesNavigatorParamList>;
[SCREENS.RIGHT_MODAL.TRANSACTION_DUPLICATE]: NavigatorScreenParams<TransactionDuplicateNavigatorParamList>;
[SCREENS.RIGHT_MODAL.TRAVEL]: NavigatorScreenParams<TravelNavigatorParamList>;
[SCREENS.RIGHT_MODAL.SEARCH_REPORT]: NavigatorScreenParams<SearchReportParamList>;
};
Expand Down Expand Up @@ -1006,5 +1013,6 @@ export type {
TeachersUniteNavigatorParamList,
WalletStatementNavigatorParamList,
WelcomeVideoModalNavigatorParamList,
TransactionDuplicateNavigatorParamList,
SearchReportParamList,
};
Loading
Loading