diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 37280338cbf2..b428c7f7ea91 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -848,6 +848,7 @@ function MoneyRequestView({ isASAPSubmitBetaEnabled, parentReportNextStep, delegateAccountID, + reportPolicyTags, isTrackIntentUser, }); }); diff --git a/src/libs/actions/IOU/UpdateMoneyRequest.ts b/src/libs/actions/IOU/UpdateMoneyRequest.ts index 63fd59a8f2cf..d133c39ad07b 100644 --- a/src/libs/actions/IOU/UpdateMoneyRequest.ts +++ b/src/libs/actions/IOU/UpdateMoneyRequest.ts @@ -904,6 +904,7 @@ type UpdateMoneyRequestTaxRateParams = { isASAPSubmitBetaEnabled: boolean; parentReportNextStep: OnyxEntry; delegateAccountID: number | undefined; + reportPolicyTags: OnyxEntry; isTrackIntentUser: boolean | undefined; }; @@ -924,6 +925,7 @@ function updateMoneyRequestTaxRate({ isASAPSubmitBetaEnabled, parentReportNextStep, delegateAccountID, + reportPolicyTags, isTrackIntentUser, }: UpdateMoneyRequestTaxRateParams) { const transactionChanges = { @@ -939,8 +941,7 @@ function updateMoneyRequestTaxRate({ transactionChanges, policy, policyTagList, - // TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook - reportPolicyTags: getPolicyTagsData(parentReport?.policyID), + reportPolicyTags, policyCategories, currentUserAccountIDParam, currentUserEmailParam, diff --git a/src/pages/iou/request/step/IOURequestStepTaxRatePage.tsx b/src/pages/iou/request/step/IOURequestStepTaxRatePage.tsx index aa4c0c20572a..77028c9a215f 100644 --- a/src/pages/iou/request/step/IOURequestStepTaxRatePage.tsx +++ b/src/pages/iou/request/step/IOURequestStepTaxRatePage.tsx @@ -67,6 +67,7 @@ function IOURequestStepTaxRatePage({ const [policyTags] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policy?.id}`); const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(report?.parentReportID)}`); const [parentReportNextStep] = useOnyx(`${ONYXKEYS.COLLECTION.NEXT_STEP}${getNonEmptyStringOnyxID(report?.parentReportID)}`); + const [reportPolicyTags] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${getNonEmptyStringOnyxID(parentReport?.policyID)}`); const [iouReportOwnerLogin] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {selector: personalDetailsLoginSelector(parentReport?.ownerAccountID)}); const [splitDraftTransaction] = useOnyx(`${ONYXKEYS.COLLECTION.SPLIT_TRANSACTION_DRAFT}${transactionID}`); @@ -114,6 +115,7 @@ function IOURequestStepTaxRatePage({ isASAPSubmitBetaEnabled, parentReportNextStep, delegateAccountID, + reportPolicyTags, isTrackIntentUser, };