Skip to content

Commit b5e20ea

Browse files
committed
fix: enable report fields when impoing xero tracking categories
1 parent 39f3cf4 commit b5e20ea

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/pages/workspace/accounting/xero/XeroMapTrackingCategoryConfigurationPage.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ function XeroMapTrackingCategoryConfigurationPage({policy}: WithPolicyProps) {
7474
categoryId ? {[`${CONST.XERO_CONFIG.TRACKING_CATEGORY_PREFIX}${categoryId}`]: option.value} : {},
7575
categoryId ? {[`${CONST.XERO_CONFIG.TRACKING_CATEGORY_PREFIX}${categoryId}`]: currentTrackingCategoryValue} : {},
7676
);
77+
if (option.value === CONST.XERO_CONFIG.TRACKING_CATEGORY_OPTIONS.REPORT_FIELD) {
78+
Policy.enablePolicyReportFields(policyID, true);
79+
}
80+
if (currentTrackingCategoryValue === CONST.XERO_CONFIG.TRACKING_CATEGORY_OPTIONS.REPORT_FIELD) {
81+
Policy.enablePolicyReportFields(policyID, false);
82+
}
7783
}
7884
Navigation.goBack(ROUTES.POLICY_ACCOUNTING_XERO_TRACKING_CATEGORIES.getRoute(policyID));
7985
},

0 commit comments

Comments
 (0)