-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #41475 from rushatgabhane/advanced-page
[Wave Collect][Xero] Main advanced settings page
- 9.1.10-0
- 9.1.9-8
- 9.1.9-7
- 9.1.9-6
- 9.1.9-5
- 9.1.9-4
- 9.1.9-3
- 9.1.9-2
- 9.1.9-1
- 9.1.9-0
- 9.1.8-1
- 9.1.8-0
- 9.1.7-2
- 9.1.7-1
- 9.1.7-0
- 9.1.6-1
- 9.1.6-0
- 9.1.5-5
- 9.1.5-4
- 9.1.5-3
- 9.1.5-2
- 9.1.5-1
- 9.1.5-0
- 9.1.4-4
- 9.1.4-3
- 9.1.4-2
- 9.1.4-1
- 9.1.4-0
- 9.1.3-4
- 9.1.3-3
- 9.1.3-2
- 9.1.3-1
- 9.1.3-0
- 9.1.2-1
- 9.1.2-0
- 9.1.1-6
- 9.1.1-4
- 9.1.1-3
- 9.1.1-2
- 9.1.1-1
- 9.1.1-0
- 9.1.0-2
- 9.1.0-1
- 9.1.0-0
- 9.0.99-2
- 9.0.99-1
- 9.0.99-0
- 9.0.98-8
- 9.0.98-7
- 9.0.98-6
- 9.0.98-5
- 9.0.98-4
- 9.0.98-3
- 9.0.98-2
- 9.0.98-1
- 9.0.98-0
- 9.0.97-1
- 9.0.97-0
- 9.0.96-1
- 9.0.96-0
- 9.0.95-6
- 9.0.95-5
- 9.0.95-3
- 9.0.95-1
- 9.0.95-0
- 9.0.94-25
- 9.0.94-24
- 9.0.94-23
- 9.0.94-17
- 9.0.94-16
- 9.0.94-10
- 9.0.94-8
- 9.0.94-7
- 9.0.94-5
- 9.0.94-4
- 9.0.94-2
- 9.0.94-1
- 9.0.94-0
- 9.0.93-3
- 9.0.93-2
- 9.0.93-1
- 9.0.93-0
- 9.0.92-6
- 9.0.92-5
- 9.0.92-4
- 9.0.92-2
- 9.0.92-1
- 9.0.92-0
- 9.0.91-2
- 9.0.91-1
- 9.0.91-0
- 9.0.90-6
- 9.0.90-5
- 9.0.90-3
- 9.0.90-2
- 9.0.90-1
- 9.0.90-0
- 9.0.89-8
- 9.0.89-7
- 9.0.89-6
- 9.0.89-5
- 9.0.89-4
- 9.0.89-3
- 9.0.89-2
- 9.0.89-1
- 9.0.89-0
- 9.0.88-7
- 9.0.88-6
- 9.0.88-5
- 9.0.88-4
- 9.0.88-3
- 9.0.88-2
- 9.0.88-1
- 9.0.88-0
- 9.0.87-3
- 9.0.87-2
- 9.0.87-1
- 9.0.87-0
- 9.0.86-3
- 9.0.86-2
- 9.0.86-1
- 9.0.86-0
- 9.0.85-4
- 9.0.85-3
- 9.0.85-1
- 9.0.85-0
- 9.0.84-7
- 9.0.84-6
- 9.0.84-5
- 9.0.84-4
- 9.0.84-3
- 9.0.84-2
- 9.0.84-1
- 9.0.84-0
- 9.0.83-5
- 9.0.83-4
- 9.0.83-3
- 9.0.83-2
- 9.0.83-1
- 9.0.83-0
- 9.0.82-12
- 9.0.82-11
- 9.0.82-9
- 9.0.82-8
- 9.0.82-7
- 9.0.82-6
- 9.0.82-5
- 9.0.82-4
- 9.0.82-3
- 9.0.82-2
- 9.0.82-1
- 9.0.82-0
- 9.0.81-6
- 9.0.81-5
- 9.0.81-4
- 9.0.81-3
- 9.0.81-2
- 9.0.81-1
- 9.0.81-0
- 9.0.80-6
- 9.0.80-4
- 9.0.80-3
- 9.0.80-2
- 9.0.80-1
- 9.0.79-5
- 9.0.79-4
- 9.0.79-3
- 9.0.79-2
- 9.0.79-1
- 9.0.79-0
- 9.0.78-6
- 9.0.78-5
- 9.0.78-4
- 9.0.78-3
- 9.0.78-2
- 9.0.78-1
- 9.0.78-0
- 9.0.77-6
- 9.0.77-5
- 9.0.77-4
- 9.0.77-3
- 9.0.77-2
- 9.0.77-1
- 9.0.77-0
- 9.0.76-12
- 9.0.76-11
- 9.0.76-10
- 9.0.76-9
- 9.0.76-8
- 9.0.76-7
- 9.0.76-6
- 9.0.76-3
- 9.0.76-2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.0.58-1
- 9.0.58-0
- 9.0.57-10
- 9.0.57-9
- 9.0.57-8
- 9.0.57-7
- 9.0.57-4
- 9.0.57-3
- 9.0.57-2
- 9.0.57-1
- 9.0.57-0
- 9.0.56-9
- 9.0.56-8
- 9.0.56-7
- 9.0.56-6
- 9.0.56-5
- 9.0.56-4
- 9.0.56-3
- 9.0.56-2
- 9.0.56-0
- 9.0.55-10
- 9.0.55-9
- 9.0.55-8
- 9.0.55-7
- 9.0.55-6
- 9.0.55-5
- 9.0.55-4
- 9.0.55-3
- 9.0.55-2
- 9.0.55-1
- 9.0.55-0
- 9.0.54-11
- 9.0.54-10
- 9.0.54-9
- 9.0.54-8
- 9.0.54-7
- 9.0.54-6
- 9.0.54-2
- 9.0.54-1
- 9.0.54-0
- 9.0.53-1
- 9.0.53-0
- 9.0.52-5
- 9.0.52-4
- 9.0.52-3
- 9.0.52-2
- 9.0.52-1
- 9.0.52-0
- 9.0.51-4
- 9.0.51-3
- 9.0.51-2
- 9.0.51-1
- 9.0.51-0
- 9.0.50-8
- 9.0.50-7
- 9.0.50-6
- 9.0.50-5
- 9.0.50-4
- 9.0.50-3
- 9.0.50-2
- 9.0.50-1
- 9.0.50-0
- 9.0.49-2
- 9.0.49-1
- 9.0.49-0
- 9.0.48-2
- 9.0.48-1
- 9.0.48-0
- 9.0.47-4
- 9.0.47-3
- 9.0.47-2
- 9.0.47-1
- 9.0.47-0
- 9.0.46-5
- 9.0.46-4
- 9.0.46-3
- 9.0.46-2
- 9.0.46-1
- 9.0.46-0
- 9.0.45-4
- 9.0.45-3
- 9.0.45-2
- 9.0.45-1
- 9.0.45-0
- 9.0.44-12
- 9.0.44-11
- 9.0.44-10
- 9.0.44-9
- 9.0.44-8
- 9.0.44-7
- 9.0.44-6
- 9.0.44-5
- 9.0.44-4
- 9.0.44-3
- 9.0.44-2
- 9.0.44-1
- 9.0.44-0
- 9.0.43-6
- 9.0.43-5
- 9.0.43-4
- 9.0.43-3
- 9.0.43-2
- 9.0.43-1
- 9.0.43-0
- 9.0.42-3
- 9.0.42-2
- 9.0.42-1
- 9.0.42-0
- 9.0.41-10
- 9.0.41-9
- 9.0.41-8
- 9.0.41-7
- 9.0.41-6
- 9.0.41-5
- 9.0.41-4
- 9.0.41-3
- 9.0.41-2
- 9.0.41-1
- 9.0.41-0
- 9.0.40-6
- 9.0.40-5
- 9.0.40-4
- 9.0.40-3
- 9.0.40-2
- 9.0.40-1
- 9.0.40-0
- 9.0.39-5
- 9.0.39-4
- 9.0.39-3
- 9.0.39-2
- 9.0.39-1
- 9.0.39-0
- 9.0.38-4
- 9.0.38-3
- 9.0.38-2
- 9.0.38-1
- 9.0.38-0
- 9.0.37-4
- 9.0.37-3
- 9.0.37-1
- 9.0.37-0
- 9.0.36-2
- 9.0.36-1
- 9.0.36-0
- 9.0.35-7
- 9.0.35-6
- 9.0.35-5
- 9.0.35-4
- 9.0.35-3
- 9.0.35-2
- 9.0.35-1
- 9.0.35-0
- 9.0.34-3
- 9.0.34-2
- 9.0.34-1
- 9.0.34-0
- 9.0.33-4
- 9.0.33-3
- 9.0.33-2
- 9.0.33-1
- 9.0.33-0
- 9.0.32-4
- 9.0.32-3
- 9.0.32-1
- 9.0.32-0
- 9.0.31-26
- 9.0.31-25
- 9.0.31-24
- 9.0.31-23
- 9.0.31-22
- 9.0.31-21
- 9.0.31-20
- 9.0.31-19
- 9.0.31-18
- 9.0.31-17
- 9.0.31-16
- 9.0.31-15
- 9.0.31-14
- 9.0.31-13
- 9.0.31-12
- 9.0.31-11
- 9.0.31-8
- 9.0.31-7
- 9.0.31-6
- 9.0.31-5
- 9.0.31-4
- 9.0.31-3
- 9.0.31-2
- 9.0.31-1
- 9.0.31-0
- 9.0.30-19
- 9.0.30-18
- 9.0.30-17
- 9.0.30-15
- 9.0.30-14
- 9.0.30-13
- 9.0.30-12
- 9.0.30-11
- 9.0.30-10
- 9.0.30-9
- 9.0.30-7
- 9.0.30-6
- 9.0.30-4
- 9.0.30-3
- 9.0.30-2
- 9.0.30-1
- 9.0.30-0
- 9.0.29-12
- 9.0.29-11
- 9.0.29-10
- 9.0.29-9
- 9.0.29-8
- 9.0.29-7
- 9.0.29-6
- 9.0.29-5
- 9.0.29-4
- 9.0.29-3
- 9.0.29-2
- 9.0.29-1
- 9.0.29-0
- 9.0.28-3
- 9.0.28-2
- 9.0.28-1
- 9.0.28-0
- 9.0.27-1
- 9.0.27-0
- 9.0.26-6
- 9.0.26-5
- 9.0.26-4
- 9.0.26-3
- 9.0.26-2
- 9.0.26-1
- 9.0.26-0
- 9.0.25-15
- 9.0.25-14
- 9.0.25-13
- 9.0.25-12
- 9.0.25-11
- 9.0.25-10
- 9.0.25-9
- 9.0.25-8
- 9.0.25-7
- 9.0.25-6
- 9.0.25-5
- 9.0.25-4
- 9.0.25-3
- 9.0.25-2
- 9.0.25-1
- 9.0.25-0
- 9.0.24-5
- 9.0.24-4
- 9.0.24-2
- 9.0.24-1
- 9.0.24-0
- 9.0.23-0
- 9.0.22-9
- 9.0.22-8
- 9.0.22-7
- 9.0.22-6
- 9.0.22-5
- 9.0.22-4
- 9.0.22-3
- 9.0.22-2
- 9.0.22-1
- 9.0.22-0
- 9.0.21-4
- 9.0.21-3
- 9.0.21-2
- 9.0.21-1
- 9.0.21-0
- 9.0.20-6
- 9.0.20-5
- 9.0.20-4
- 9.0.20-3
- 9.0.20-2
- 9.0.20-1
- 9.0.20-0
- 9.0.19-11
- 9.0.19-10
- 9.0.19-9
- 9.0.19-8
- 9.0.19-7
- 9.0.19-6
- 9.0.19-5
- 9.0.19-4
- 9.0.19-3
- 9.0.19-2
- 9.0.19-0
- 9.0.18-10
- 9.0.18-9
- 9.0.18-8
- 9.0.18-7
- 9.0.18-6
- 9.0.18-4
- 9.0.18-3
- 9.0.18-2
- 9.0.18-1
- 9.0.18-0
- 9.0.17-2
- 9.0.17-1
- 9.0.17-0
- 9.0.16-8
- 9.0.16-7
- 9.0.16-6
- 9.0.16-5
- 9.0.16-4
- 9.0.16-3
- 9.0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.4.76-6
- 1.4.76-5
- 1.4.76-4
- 1.4.76-3
- 1.4.76-2
- 1.4.76-1
- 1.4.76-0
- 1.4.75-1
- 1.4.75-0
- 1.4.74-6
- 1.4.74-5
- 1.4.74-4
- 1.4.74-3
- 1.4.74-2
- 1.4.74-1
- 1.4.74-0
- 1.4.73-7
- 1.4.73-6
- 1.4.73-5
- 1.4.73-4
- 1.4.73-3
- 1.4.73-2
- 1.4.73-1
- 1.4.73-0
- 1.4.72-1
- 1.4.72-0
- 1.4.71-6
- 1.4.71-5
- 1.4.71-4
- 1.4.71-3
- 1.4.71-2
- 1.4.71-1
- 1.4.71-0
Showing
13 changed files
with
149 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
src/pages/workspace/accounting/xero/advanced/XeroAdvancedPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import React from 'react'; | ||
import ConnectionLayout from '@components/ConnectionLayout'; | ||
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; | ||
import OfflineWithFeedback from '@components/OfflineWithFeedback'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import * as Connections from '@libs/actions/connections'; | ||
import * as ErrorUtils from '@libs/ErrorUtils'; | ||
import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnections'; | ||
import withPolicyConnections from '@pages/workspace/withPolicyConnections'; | ||
import ToggleSettingOptionRow from '@pages/workspace/workflows/ToggleSettingsOptionRow'; | ||
import * as Policy from '@userActions/Policy'; | ||
import CONST from '@src/CONST'; | ||
|
||
function XeroAdvancedPage({policy}: WithPolicyConnectionsProps) { | ||
const styles = useThemeStyles(); | ||
const {translate} = useLocalize(); | ||
|
||
const policyID = policy?.id ?? ''; | ||
const xeroConfig = policy?.connections?.xero?.config; | ||
const {autoSync, pendingFields, sync} = xeroConfig ?? {}; | ||
const xeroData = policy?.connections?.xero?.data; | ||
|
||
return ( | ||
<ConnectionLayout | ||
displayName={XeroAdvancedPage.displayName} | ||
headerTitle="workspace.xero.advancedConfig.advanced" | ||
accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]} | ||
policyID={policyID} | ||
featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED} | ||
> | ||
<ToggleSettingOptionRow | ||
key={translate('workspace.xero.advancedConfig.autoSync')} | ||
title={translate('workspace.xero.advancedConfig.autoSync')} | ||
subtitle={translate('workspace.xero.advancedConfig.autoSyncDescription')} | ||
shouldPlaceSubtitleBelowSwitch | ||
wrapperStyle={styles.mv3} | ||
isActive={Boolean(autoSync?.enabled)} | ||
onToggle={() => | ||
Connections.updatePolicyConnectionConfig(policyID, CONST.POLICY.CONNECTIONS.NAME.XERO, CONST.XERO_CONFIG.AUTO_SYNC, { | ||
enabled: !autoSync?.enabled, | ||
}) | ||
} | ||
pendingAction={pendingFields?.autoSync} | ||
errors={ErrorUtils.getLatestErrorField(xeroConfig ?? {}, CONST.XERO_CONFIG.AUTO_SYNC)} | ||
onCloseError={() => Policy.clearXeroErrorField(policyID, CONST.XERO_CONFIG.AUTO_SYNC)} | ||
/> | ||
<OfflineWithFeedback pendingAction={pendingFields?.export}> | ||
<MenuItemWithTopDescription | ||
shouldShowRightIcon | ||
title={xeroConfig?.export.billStatus.purchase} | ||
description={translate('workspace.xero.advancedConfig.purchaseBillStatusTitle')} | ||
key={translate('workspace.xero.advancedConfig.purchaseBillStatusTitle')} | ||
wrapperStyle={[styles.sectionMenuItemTopDescription]} | ||
onPress={() => {}} | ||
/> | ||
</OfflineWithFeedback> | ||
<ToggleSettingOptionRow | ||
key={translate('workspace.xero.advancedConfig.reimbursedReports')} | ||
title={translate('workspace.xero.advancedConfig.reimbursedReports')} | ||
subtitle={translate('workspace.xero.advancedConfig.reimbursedReportsDescription')} | ||
shouldPlaceSubtitleBelowSwitch | ||
wrapperStyle={styles.mv3} | ||
isActive={Boolean(sync?.syncReimbursedReports)} | ||
onToggle={() => | ||
Connections.updatePolicyConnectionConfig(policyID, CONST.POLICY.CONNECTIONS.NAME.XERO, CONST.XERO_CONFIG.SYNC, { | ||
syncReimbursedReports: !sync?.syncReimbursedReports, | ||
}) | ||
} | ||
pendingAction={pendingFields?.sync} | ||
errors={ErrorUtils.getLatestErrorField(xeroConfig ?? {}, CONST.XERO_CONFIG.SYNC)} | ||
onCloseError={() => Policy.clearXeroErrorField(policyID, CONST.XERO_CONFIG.SYNC)} | ||
/> | ||
{sync?.syncReimbursedReports && ( | ||
<> | ||
<OfflineWithFeedback pendingAction={pendingFields?.sync}> | ||
<MenuItemWithTopDescription | ||
shouldShowRightIcon | ||
title={String(xeroData?.bankAccounts)} | ||
description={translate('workspace.xero.advancedConfig.xeroBillPaymentAccount')} | ||
key={translate('workspace.xero.advancedConfig.xeroBillPaymentAccount')} | ||
wrapperStyle={[styles.sectionMenuItemTopDescription]} | ||
onPress={() => {}} | ||
/> | ||
</OfflineWithFeedback> | ||
<OfflineWithFeedback pendingAction={pendingFields?.sync}> | ||
<MenuItemWithTopDescription | ||
shouldShowRightIcon | ||
title={String(xeroData?.bankAccounts)} | ||
description={translate('workspace.xero.advancedConfig.xeroInvoiceCollectionAccount')} | ||
key={translate('workspace.xero.advancedConfig.xeroInvoiceCollectionAccount')} | ||
wrapperStyle={[styles.sectionMenuItemTopDescription]} | ||
onPress={() => {}} | ||
/> | ||
</OfflineWithFeedback> | ||
</> | ||
)} | ||
</ConnectionLayout> | ||
); | ||
} | ||
|
||
XeroAdvancedPage.displayName = 'XeroAdvancedPage'; | ||
|
||
export default withPolicyConnections(XeroAdvancedPage); |