Skip to content

Commit

Permalink
remove some TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhenjaHorbach committed Oct 7, 2024
1 parent bbfb8f8 commit bfc726e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ function QuickbooksDesktopExportPage({policy}: WithPolicyConnectionsProps) {
},
{
description: translate('workspace.accounting.exportOutOfPocket'),
onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT_OUT_OF_POCKET_EXPENSES.getRoute(policyID)),
title: qbdConfig?.reimbursableExpensesExportDestination ? translate(`workspace.qbo.accounts.${qbdConfig?.reimbursableExpensesExportDestination}`) : undefined, // TODO: should be updated to use new routes
onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES.getRoute(policyID)),
title: qbdConfig?.reimbursableExpensesExportDestination ? translate(`workspace.qbo.accounts.${qbdConfig?.reimbursableExpensesExportDestination}`) : undefined,
subscribedSettings: [CONST.QUICKBOOKS_CONFIG.REIMBURSABLE_EXPENSES_EXPORT_DESTINATION, CONST.QUICKBOOKS_CONFIG.REIMBURSABLE_EXPENSES_ACCOUNT],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,10 @@ function QuickbooksDesktopOutOfPocketExpenseAccountSelectPage({policy}: WithPoli
[translate, styles.pb10],
);

const accessVariants = canUseNewDotQBD ? [] : [CONST.POLICY.ACCESS_VARIANTS.ADMIN];

return (
<SelectionScreen
policyID={policyID}
accessVariants={accessVariants}
accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]}
featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED}
displayName={QuickbooksDesktopOutOfPocketExpenseAccountSelectPage.displayName}
sections={data.length ? [{data}] : []}
Expand All @@ -120,6 +118,7 @@ function QuickbooksDesktopOutOfPocketExpenseAccountSelectPage({policy}: WithPoli
onSelectRow={selectExportAccount}
initiallyFocusedOptionKey={data.find((mode) => mode.isSelected)?.keyForList}
title={title}
shouldBeBlocked={!canUseNewDotQBD} // TODO: remove it once the QBD beta is done
connectionName={CONST.POLICY.CONNECTIONS.NAME.QBO} // TODO: should be updated to use the new connection
pendingAction={PolicyUtils.settingsPendingAction([CONST.QUICKBOOKS_DESKTOP_CONFIG.REIMBURSABLE_EXPENSES_ACCOUNT], qbdConfig?.pendingFields)}
errors={ErrorUtils.getLatestErrorField(qbdConfig, CONST.QUICKBOOKS_DESKTOP_CONFIG.REIMBURSABLE_EXPENSES_ACCOUNT)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,19 @@ function QuickbooksDesktopOutOfPocketExpenseConfigurationPage({policy}: WithPoli
: []),
];

const accessVariants = canUseNewDotQBD ? [] : [CONST.POLICY.ACCESS_VARIANTS.ADMIN];

return (
<ConnectionLayout
displayName={QuickbooksDesktopOutOfPocketExpenseConfigurationPage.displayName}
headerTitle="workspace.accounting.exportOutOfPocket"
title="workspace.qbd.exportOutOfPocketExpensesDescription"
accessVariants={accessVariants}
accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]}
policyID={policyID}
featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED}
contentContainerStyle={styles.pb2}
titleStyle={styles.ph5}
shouldBeBlocked={!canUseNewDotQBD} // TODO: remove it once the QBD beta is done
connectionName={CONST.POLICY.CONNECTIONS.NAME.QBO} // TODO: should be updated to use the new connection
onBackButtonPress={() => Navigation.goBack(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT.getRoute(policyID))} // TODO: should be updated to use new routes
onBackButtonPress={() => Navigation.goBack(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_EXPORT.getRoute(policyID))}
>
{sections.map((section, index) => (
<OfflineWithFeedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,10 @@ function QuickbooksDesktopOutOfPocketExpenseEntitySelectPage({policy}: WithPolic
[qbdConfig?.reimbursableExpensesExportDestination, policyID, qbdConfig?.reimbursableExpensesAccount],
);

const accessVariants = canUseNewDotQBD ? [] : [CONST.POLICY.ACCESS_VARIANTS.ADMIN];

return (
<SelectionScreen
policyID={policyID}
accessVariants={accessVariants}
accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]}
featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED}
displayName={QuickbooksDesktopOutOfPocketExpenseEntitySelectPage.displayName}
sections={sections}
Expand All @@ -120,6 +118,7 @@ function QuickbooksDesktopOutOfPocketExpenseEntitySelectPage({policy}: WithPolic
shouldSingleExecuteRowSelect
initiallyFocusedOptionKey={data.find((mode) => mode.isSelected)?.keyForList}
title="workspace.accounting.exportAs"
shouldBeBlocked={!canUseNewDotQBD} // TODO: remove it once the QBD beta is done
connectionName={CONST.POLICY.CONNECTIONS.NAME.QBO} // TODO: should be updated to use the new connection
pendingAction={PolicyUtils.settingsPendingAction(
[CONST.QUICKBOOKS_DESKTOP_CONFIG.REIMBURSABLE_EXPENSES_EXPORT_DESTINATION, CONST.QUICKBOOKS_DESKTOP_CONFIG.REIMBURSABLE_EXPENSES_ACCOUNT],
Expand Down

0 comments on commit bfc726e

Please sign in to comment.