Skip to content
Merged
3 changes: 3 additions & 0 deletions src/libs/actions/IOU/Split.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,9 @@ function updateSplitTransactions({
transactionChanges,
policy,
policyTagList: policyTags ?? null,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(transactionIOUReport?.policyID),
policyCategories: policyCategories ?? null,
newTransactionReportID: splitExpense?.reportID,
policyRecentlyUsedCategories,
Expand Down
47 changes: 43 additions & 4 deletions src/libs/actions/IOU/UpdateMoneyRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ function updateMoneyRequestDate({
transactionChanges,
policy,
policyTagList: policyTags,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
currentUserAccountIDParam,
currentUserEmailParam,
Expand Down Expand Up @@ -155,6 +158,9 @@ function updateMoneyRequestBillable({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
currentUserAccountIDParam,
currentUserEmailParam,
Expand Down Expand Up @@ -202,6 +208,9 @@ function updateMoneyRequestReimbursable({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
currentUserAccountIDParam,
currentUserEmailParam,
Expand Down Expand Up @@ -252,6 +261,9 @@ function updateMoneyRequestMerchant({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
currentUserAccountIDParam,
currentUserEmailParam,
Expand Down Expand Up @@ -301,6 +313,9 @@ function updateMoneyRequestAttendees({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
violations,
currentUserAccountIDParam,
Expand Down Expand Up @@ -354,6 +369,9 @@ function updateMoneyRequestTag({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyRecentlyUsedTags,
policyCategories,
hash,
Expand Down Expand Up @@ -401,6 +419,9 @@ function updateMoneyRequestTaxAmount({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
currentUserAccountIDParam,
currentUserEmailParam,
Expand Down Expand Up @@ -454,6 +475,9 @@ function updateMoneyRequestTaxRate({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
currentUserAccountIDParam,
currentUserEmailParam,
Expand Down Expand Up @@ -525,6 +549,9 @@ function updateMoneyRequestDistance({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
currentUserAccountIDParam,
currentUserEmailParam,
Expand Down Expand Up @@ -625,6 +652,9 @@ function updateMoneyRequestCategory({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
policyRecentlyUsedCategories,
currentUserAccountIDParam,
Expand Down Expand Up @@ -678,6 +708,9 @@ function updateMoneyRequestDescription({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
currentUserAccountIDParam,
currentUserEmailParam,
Expand Down Expand Up @@ -754,6 +787,9 @@ function updateMoneyRequestDistanceRate({
transactionChanges,
policy,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories,
currentUserAccountIDParam,
currentUserEmailParam,
Expand Down Expand Up @@ -830,7 +866,10 @@ function updateMoneyRequestAmountAndCurrency({
iouReport: parentReport,
transactionChanges,
policy,
policyTagList: policyTagList ?? null,
policyTagList,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(parentReport?.policyID),
policyCategories: policyCategories ?? null,
allowNegative,
currentUserAccountIDParam,
Expand All @@ -851,6 +890,7 @@ type GetUpdateMoneyRequestParamsType = {
transactionChanges: TransactionChanges;
policy: OnyxEntry<OnyxTypes.Policy>;
policyTagList: OnyxTypes.OnyxInputOrEntry<OnyxTypes.PolicyTagLists>;
reportPolicyTags: OnyxEntry<OnyxTypes.PolicyTagLists>;
policyRecentlyUsedTags?: OnyxEntry<RecentlyUsedTags>;
policyCategories: OnyxTypes.OnyxInputOrEntry<OnyxTypes.PolicyCategories>;
policyRecentlyUsedCategories?: OnyxEntry<OnyxTypes.RecentlyUsedCategories>;
Expand Down Expand Up @@ -890,6 +930,7 @@ function getUpdateMoneyRequestParams(params: GetUpdateMoneyRequestParamsType): U
transactionChanges,
policy,
policyTagList,
reportPolicyTags,
policyRecentlyUsedTags,
policyCategories,
policyRecentlyUsedCategories,
Expand Down Expand Up @@ -1188,9 +1229,7 @@ function getUpdateMoneyRequestParams(params: GetUpdateMoneyRequestParamsType): U
const hasModifiedTag = 'tag' in transactionChanges;
if (hasModifiedTag) {
const optimisticPolicyRecentlyUsedTags = buildOptimisticPolicyRecentlyUsedTags({
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) and getPolicyRecentlyUsedTagsData (https://github.com/Expensify/App/issues/71491) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
policyTags: getPolicyTagsData(iouReport?.policyID),
policyTags: reportPolicyTags ?? {},
policyRecentlyUsedTags,
transactionTags: transactionChanges.tag,
});
Expand Down
4 changes: 4 additions & 0 deletions src/libs/actions/MergeTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {isDistanceRequest, isTransactionPendingDelete} from '@src/libs/Transacti
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type {CardList, MergeTransaction, Policy, PolicyCategories, PolicyTagLists, Report, ReportNextStepDeprecated, Transaction, TransactionViolations} from '@src/types/onyx';
import {getPolicyTagsData} from './IOU';
import type {UpdateMoneyRequestData} from './IOU';
import {getCleanUpTransactionThreadReportOnyxData} from './IOU/DeleteMoneyRequest';
import {getDeleteTrackExpenseInformation} from './IOU/TrackExpense';
Expand Down Expand Up @@ -271,6 +272,9 @@ function getOnyxTargetTransactionData({
transactionChanges: filteredTransactionChanges,
policy,
policyTagList: policyTags,
// TODO: Replace getPolicyTagsData (https://github.com/Expensify/App/issues/72721) with useOnyx hook
// eslint-disable-next-line @typescript-eslint/no-deprecated
reportPolicyTags: getPolicyTagsData(targetTransactionThreadParentReport?.policyID),
policyCategories,
violations: targetTransactionViolations ?? [],
shouldBuildOptimisticModifiedExpenseReportAction,
Expand Down
Loading
Loading