Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 src/pages/iou/request/IOURequestStartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ function IOURequestStartPage({
<IOURequestStepScan
route={route}
navigation={navigation}
isTooltipAllowed
/>
</TabScreenWithFocusTrapWrapper>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function IOURequestStepScan({
},
transaction,
currentUserPersonalDetails,
isTooltipAllowed = false,
}: IOURequestStepScanProps) {
const theme = useTheme();
const styles = useThemeStyles();
Expand Down Expand Up @@ -544,7 +545,7 @@ function IOURequestStepScan({

const {shouldShowProductTrainingTooltip, renderProductTrainingTooltip} = useProductTrainingContext(
CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.SCAN_TEST_TOOLTIP,
!getIsUserSubmittedExpenseOrScannedReceipt() && Permissions.canUseManagerMcTest(betas) && isTabActive && !isUserInvitedToWorkspace(),
isTooltipAllowed && !getIsUserSubmittedExpenseOrScannedReceipt() && Permissions.canUseManagerMcTest(betas) && isTabActive && !isUserInvitedToWorkspace(),
{
onConfirm: setTestReceiptAndNavigate,
onDismiss: () => {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/iou/request/step/IOURequestStepScan/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ function IOURequestStepScan({
},
transaction,
currentUserPersonalDetails,
isTooltipAllowed = false,
}: Omit<IOURequestStepScanProps, 'user'>) {
const theme = useTheme();
const styles = useThemeStyles();
Expand Down Expand Up @@ -604,7 +605,7 @@ function IOURequestStepScan({

const {shouldShowProductTrainingTooltip, renderProductTrainingTooltip} = useProductTrainingContext(
CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.SCAN_TEST_TOOLTIP,
!getIsUserSubmittedExpenseOrScannedReceipt() && Permissions.canUseManagerMcTest(betas) && isTabActive && !isUserInvitedToWorkspace(),
isTooltipAllowed && !getIsUserSubmittedExpenseOrScannedReceipt() && Permissions.canUseManagerMcTest(betas) && isTabActive && !isUserInvitedToWorkspace(),
{
onConfirm: setTestReceiptAndNavigate,
onDismiss: () => {
Expand Down
3 changes: 3 additions & 0 deletions src/pages/iou/request/step/IOURequestStepScan/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ type IOURequestStepScanProps = WithCurrentUserPersonalDetailsProps &
WithWritableReportOrNotFoundProps<typeof SCREENS.MONEY_REQUEST.STEP_SCAN | typeof SCREENS.MONEY_REQUEST.CREATE> & {
/** Holds data related to Money Request view state, rather than the underlying Money Request data. */
transaction: OnyxEntry<OnyxTypes.Transaction>;

/* If the tooltip is allowed to be shown */
isTooltipAllowed?: boolean;
};

export default IOURequestStepScanProps;