From 7d89088b9d2aea80a0e9f5085e947e1e64a10131 Mon Sep 17 00:00:00 2001 From: Etotaziba Olei Date: Thu, 14 Mar 2024 07:46:09 +0100 Subject: [PATCH 01/84] add initial english strings --- src/languages/es.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/languages/es.ts b/src/languages/es.ts index 267581f043ee..e8ecc9b6364a 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1769,6 +1769,7 @@ export default { invoices: 'Enviar facturas', travel: 'Viajes', members: 'Miembros', + accounting: 'Accounting', plan: 'Plan', profile: 'Perfil', bankAccount: 'Cuenta bancaria', @@ -1908,6 +1909,12 @@ export default { invitedBySecondaryLogin: ({secondaryLogin}) => `Agregado por nombre de usuario secundario ${secondaryLogin}.`, membersListTitle: 'Directorio de todos los miembros del espacio de trabajo.', }, + accounting: { + title: 'Connections', + subtitle: 'Connect to your accounting system to code transactions with your chart of accounts, auto-match payments and keep your finances in sync.', + qbo: 'Quickbooks Online', + setup: 'Set up', + }, card: { header: 'Desbloquea Tarjetas Expensify gratis', headerWithEcard: '¡Tus tarjetas están listas!', From 3492e28b5e3b691e65315faaa19a1afdc0f54d25 Mon Sep 17 00:00:00 2001 From: Etotaziba Olei Date: Thu, 14 Mar 2024 07:46:24 +0100 Subject: [PATCH 02/84] add initial spanish strings --- src/languages/en.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/languages/en.ts b/src/languages/en.ts index 7e442eee2236..2bd96e310b9a 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1745,6 +1745,7 @@ export default { invoices: 'Invoices', travel: 'Travel', members: 'Members', + accounting: 'Accounting', plan: 'Plan', profile: 'Profile', bankAccount: 'Bank account', @@ -1918,6 +1919,12 @@ export default { invalidRateError: 'Please enter a valid rate', lowRateError: 'Rate must be greater than 0', }, + accounting: { + title: 'Connections', + subtitle: 'Connect to your accounting system to code transactions with your chart of accounts, auto-match payments and keep your finances in sync.', + qbo: 'Quickbooks Online', + setup: 'Set up', + }, bills: { manageYourBills: 'Manage your bills', askYourVendorsBeforeEmail: 'Ask your vendors to forward their invoices to ', From 6edddee6d9f8cdd6c0b71b89a416361139202e24 Mon Sep 17 00:00:00 2001 From: Etotaziba Olei Date: Thu, 14 Mar 2024 07:47:58 +0100 Subject: [PATCH 03/84] add accounting navigation param type --- src/libs/Navigation/types.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index a1ec30fa303e..d1421addca47 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -530,6 +530,9 @@ type WorkspacesCentralPaneNavigatorParamList = { [SCREENS.WORKSPACE.MEMBERS]: { policyID: string; }; + [SCREENS.WORKSPACE.ACCOUNTING]: { + policyID: string; + }; [SCREENS.WORKSPACE.CATEGORIES]: { policyID: string; }; From 917451c66e6eb00df732a16902a62ffa3896248e Mon Sep 17 00:00:00 2001 From: Etotaziba Olei Date: Thu, 14 Mar 2024 07:49:24 +0100 Subject: [PATCH 04/84] add accounting to workspace screens --- src/SCREENS.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 4db5fd9115a5..ad9c6eab2137 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -213,6 +213,7 @@ const SCREENS = { INVOICES: 'Workspace_Invoices', TRAVEL: 'Workspace_Travel', MEMBERS: 'Workspace_Members', + ACCOUNTING: 'Workspace_Accounting', INVITE: 'Workspace_Invite', INVITE_MESSAGE: 'Workspace_Invite_Message', CATEGORIES: 'Workspace_Categories', From 7f529e502996987702a9f76ecfa89c9ff8ba5705 Mon Sep 17 00:00:00 2001 From: Etotaziba Olei Date: Thu, 14 Mar 2024 07:50:47 +0100 Subject: [PATCH 05/84] add workspace acoounting route --- src/ROUTES.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ROUTES.ts b/src/ROUTES.ts index defb945ba8c2..9735b22cfd3d 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -549,6 +549,10 @@ const ROUTES = { route: 'settings/workspaces/:policyID/members', getRoute: (policyID: string) => `settings/workspaces/${policyID}/members` as const, }, + WORKSPACE_ACCOUNTING: { + route: 'settings/workspaces/:policyID/accounting', + getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting` as const, + }, WORKSPACE_CATEGORIES: { route: 'settings/workspaces/:policyID/categories', getRoute: (policyID: string) => `settings/workspaces/${policyID}/categories` as const, From e4ba2b03bb5892959969da2543467c9f8bcdab91 Mon Sep 17 00:00:00 2001 From: Etotaziba Olei Date: Thu, 14 Mar 2024 07:51:32 +0100 Subject: [PATCH 06/84] add workspace accounting to workspace setting navigator --- src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx index 7df1da23d068..ade6ca103701 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx @@ -196,6 +196,7 @@ const WorkspaceSettingsModalStackNavigator = createModalStackNavigator( [SCREENS.WORKSPACE.INVOICES]: () => require('../../../pages/workspace/invoices/WorkspaceInvoicesPage').default as React.ComponentType, [SCREENS.WORKSPACE.TRAVEL]: () => require('../../../pages/workspace/travel/WorkspaceTravelPage').default as React.ComponentType, [SCREENS.WORKSPACE.MEMBERS]: () => require('../../../pages/workspace/WorkspaceMembersPage').default as React.ComponentType, + [SCREENS.WORKSPACE.ACCOUNTING]: () => require('../../../pages/workspace/accounting/PolicyAccountingPage').default as React.ComponentType, [SCREENS.WORKSPACE.CATEGORIES]: () => require('../../../pages/workspace/categories/WorkspaceCategoriesPage').default as React.ComponentType, [SCREENS.WORKSPACE.MORE_FEATURES]: () => require('../../../pages/workspace/WorkspaceMoreFeaturesPage').default as React.ComponentType, [SCREENS.WORKSPACE.TAGS]: () => require('../../../pages/workspace/tags/WorkspaceTagsPage').default as React.ComponentType, From 4bfc37172c0faec2cd27266d618dd163b2e8dd3a Mon Sep 17 00:00:00 2001 From: Etotaziba Olei Date: Thu, 14 Mar 2024 07:52:15 +0100 Subject: [PATCH 07/84] add workspace accounting to link to screens --- src/libs/Navigation/linkingConfig/config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts index 1461c27e03e0..c096cc5df04c 100644 --- a/src/libs/Navigation/linkingConfig/config.ts +++ b/src/libs/Navigation/linkingConfig/config.ts @@ -573,6 +573,9 @@ const config: LinkingOptions['config'] = { [SCREENS.WORKSPACE.MEMBERS]: { path: ROUTES.WORKSPACE_MEMBERS.route, }, + [SCREENS.WORKSPACE.ACCOUNTING]: { + path: ROUTES.WORKSPACE_ACCOUNTING.route, + }, [SCREENS.WORKSPACE.CATEGORIES]: { path: ROUTES.WORKSPACE_CATEGORIES.route, }, From e05a0b0ba60f55398709d30ab9383777ad3a3acf Mon Sep 17 00:00:00 2001 From: Etotaziba Olei Date: Thu, 14 Mar 2024 07:53:19 +0100 Subject: [PATCH 08/84] add workspace accounting Page --- .../accounting/PolicyAccountingPage.tsx | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 src/pages/workspace/accounting/PolicyAccountingPage.tsx diff --git a/src/pages/workspace/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx new file mode 100644 index 000000000000..da482ac7837c --- /dev/null +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -0,0 +1,91 @@ +import React, {useMemo} from 'react'; +import {View} from 'react-native'; +import Button from '@components/Button'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import MenuItemList from '@components/MenuItemList'; +import ScreenWrapper from '@components/ScreenWrapper'; +import ScrollView from '@components/ScrollView'; +import Section from '@components/Section'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import useWaitForNavigation from '@hooks/useWaitForNavigation'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import Navigation from '@libs/Navigation/Navigation'; +import type {TranslationPaths} from '@src/languages/types'; +import ROUTES from '@src/ROUTES'; + +function PolicyAccountingPage() { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + const waitForNavigate = useWaitForNavigation(); + const {isSmallScreenWidth} = useWindowDimensions(); + + const menuItems = useMemo(() => { + const baseMenuItems = [ + { + translationKey: 'workspace.accounting.qbo', + icon: Expensicons.Shield, + action: waitForNavigate(() => Navigation.navigate(ROUTES.SETTINGS_2FA.getRoute())), + }, + ]; + + return baseMenuItems.map((item) => ({ + key: item.translationKey, + title: translate(item.translationKey as TranslationPaths), + icon: item.icon, + onPress: item.action, + shouldShowRightIcon: false, + + link: '', + shouldShowRightComponent: true, + rightComponent: ( +