diff --git a/.well-known/apple-app-site-association b/.well-known/apple-app-site-association index b3adf0f59b9c..a2c7365f7de8 100644 --- a/.well-known/apple-app-site-association +++ b/.well-known/apple-app-site-association @@ -32,10 +32,6 @@ "/": "/iou/*", "comment": "I Owe You reports" }, - { - "/": "/request/*", - "comment": "Money request" - }, { "/": "/enable-payments/*", "comment": "Payments setup" @@ -54,11 +50,11 @@ }, { "/": "/split/*", - "comment": "Split Bill" + "comment": "Split Expense" }, { "/": "/request/*", - "comment": "Request Money" + "comment": "Submit Expense" }, { "/": "/new/*", @@ -82,7 +78,7 @@ }, { "/": "/send/*", - "comment": "Send money" + "comment": "Pay someone" }, { "/": "/money2020/*", diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ac5f3fdd397e..5a8c67088f16 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1818,7 +1818,7 @@ PODS: - RNGoogleSignin (10.0.1): - GoogleSignIn (~> 7.0) - React-Core - - RNLiveMarkdown (0.1.47): + - RNLiveMarkdown (0.1.62): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1836,9 +1836,9 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNLiveMarkdown/common (= 0.1.47) + - RNLiveMarkdown/common (= 0.1.62) - Yoga - - RNLiveMarkdown/common (0.1.47): + - RNLiveMarkdown/common (0.1.62): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -2547,7 +2547,7 @@ SPEC CHECKSUMS: RNFS: 4ac0f0ea233904cb798630b3c077808c06931688 RNGestureHandler: 1190c218cdaaf029ee1437076a3fbbc3297d89fb RNGoogleSignin: ccaa4a81582cf713eea562c5dd9dc1961a715fd0 - RNLiveMarkdown: f172c7199283dc9d21bccf7e21ea10741fd19e1d + RNLiveMarkdown: 47dfb50244f9ba1caefbc0efc6404ba41bf6620a RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81 rnmapbox-maps: 3e273e0e867a079ec33df9ee33bb0482434b897d RNPermissions: 8990fc2c10da3640938e6db1647cb6416095b729 @@ -2564,7 +2564,7 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 VisionCamera: 3033e0dd5272d46e97bcb406adea4ae0e6907abf - Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70 + Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312 PODFILE CHECKSUM: a25a81f2b50270f0c0bd0aff2e2ebe4d0b4ec06d diff --git a/package-lock.json b/package-lock.json index 9d6267f9430b..4d78c6cfd9a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@dotlottie/react-player": "^1.6.3", - "@expensify/react-native-live-markdown": "0.1.49", + "@expensify/react-native-live-markdown": "0.1.62", "@expo/metro-runtime": "~3.1.1", "@formatjs/intl-datetimeformat": "^6.10.0", "@formatjs/intl-listformat": "^7.2.2", @@ -57,7 +57,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#13de5b0606662df33fa1392ad82cc11daadff52e", + "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#c0f7f3b6558fbeda0527c80d68460d418afef219", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", @@ -3570,9 +3570,9 @@ } }, "node_modules/@expensify/react-native-live-markdown": { - "version": "0.1.49", - "resolved": "https://registry.npmjs.org/@expensify/react-native-live-markdown/-/react-native-live-markdown-0.1.49.tgz", - "integrity": "sha512-5l+/NtUTuSxWkdsT2JOlhKD5NW1hZ+nQcmgrCSz5e/TNIcfkYjJNiW/nEf8qmBV54afiTmTTwKYrh2DwM/BQ0g==", + "version": "0.1.62", + "resolved": "https://registry.npmjs.org/@expensify/react-native-live-markdown/-/react-native-live-markdown-0.1.62.tgz", + "integrity": "sha512-o70/tFIGZJ1U8U8aqTQu1HAZed6nt5LYWk74mrceRxQHOqsKhZgn2q5EuEy8EMIcnCGKjwxuDyZJbuRexgHx/A==", "engines": { "node": ">= 18.0.0" }, @@ -16462,10 +16462,8 @@ }, "node_modules/classnames": { "version": "2.5.0", - "license": "MIT", - "workspaces": [ - "benchmarks" - ] + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.0.tgz", + "integrity": "sha512-FQuRlyKinxrb5gwJlfVASbSrDlikDJ07426TrfPsdGLvtochowmkbnSFdQGJ2aoXrSetq5KqGV9emvWpy+91xA==" }, "node_modules/clean-css": { "version": "5.3.2", @@ -16551,7 +16549,8 @@ }, "node_modules/clipboard": { "version": "2.0.11", - "license": "MIT", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", + "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", "dependencies": { "good-listener": "^1.2.2", "select": "^1.1.2", @@ -18058,7 +18057,8 @@ }, "node_modules/delegate": { "version": "3.2.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" }, "node_modules/delegates": { "version": "1.0.0", @@ -20213,8 +20213,8 @@ }, "node_modules/expensify-common": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/Expensify/expensify-common.git#13de5b0606662df33fa1392ad82cc11daadff52e", - "integrity": "sha512-/NAZoAXqeqFWHvC61dueqq9VjRugF69urUtDdDhsfvu1sQE2PCnBoM7a+ACoAEWRYrnP82cyHHhdSA8e7fPuAg==", + "resolved": "git+ssh://git@github.com/Expensify/expensify-common.git#c0f7f3b6558fbeda0527c80d68460d418afef219", + "integrity": "sha512-zz0/y0apISP1orxXEQOgn+Uod45O4wVypwwtaqcDPV4dH1tC3i4L98NoLSZvLn7Y17EcceSkfN6QCEsscgFTDQ==", "license": "MIT", "dependencies": { "classnames": "2.5.0", @@ -20267,6 +20267,8 @@ }, "node_modules/expensify-common/node_modules/ua-parser-js": { "version": "1.0.37", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", + "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==", "funding": [ { "type": "opencollective", @@ -20281,7 +20283,6 @@ "url": "https://github.com/sponsors/faisalman" } ], - "license": "MIT", "engines": { "node": "*" } @@ -21729,7 +21730,8 @@ }, "node_modules/good-listener": { "version": "1.2.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", "dependencies": { "delegate": "^3.1.2" } @@ -22780,7 +22782,8 @@ }, "node_modules/immediate": { "version": "3.0.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" }, "node_modules/import-fresh": { "version": "3.3.0", @@ -26839,7 +26842,8 @@ }, "node_modules/lie": { "version": "3.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==", "dependencies": { "immediate": "~3.0.5" } @@ -26982,7 +26986,8 @@ }, "node_modules/localforage": { "version": "1.10.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", + "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==", "dependencies": { "lie": "3.1.1" } @@ -33312,7 +33317,8 @@ }, "node_modules/select": { "version": "1.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" }, "node_modules/select-hose": { "version": "2.0.0", diff --git a/package.json b/package.json index 62fbb8d3fc97..7ba21eeb9161 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@dotlottie/react-player": "^1.6.3", - "@expensify/react-native-live-markdown": "0.1.49", + "@expensify/react-native-live-markdown": "0.1.62", "@expo/metro-runtime": "~3.1.1", "@formatjs/intl-datetimeformat": "^6.10.0", "@formatjs/intl-listformat": "^7.2.2", @@ -108,7 +108,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#13de5b0606662df33fa1392ad82cc11daadff52e", + "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#c0f7f3b6558fbeda0527c80d68460d418afef219", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", diff --git a/src/CONFIG.ts b/src/CONFIG.ts index 76ea18d37d5f..9ed4242d7604 100644 --- a/src/CONFIG.ts +++ b/src/CONFIG.ts @@ -48,6 +48,7 @@ export default { EXPENSIFY: { // Note: This will be EXACTLY what is set for EXPENSIFY_URL whether the proxy is enabled or not. EXPENSIFY_URL: expensifyURL, + SECURE_EXPENSIFY_URL: secureExpensifyUrl, NEW_EXPENSIFY_URL: newExpensifyURL, // The DEFAULT API is the API used by most environments, except staging, where we use STAGING (defined below) @@ -72,7 +73,7 @@ export default { IS_USING_LOCAL_WEB: useNgrok || expensifyURLRoot.includes('dev'), PUSHER: { APP_KEY: get(Config, 'PUSHER_APP_KEY', '268df511a204fbb60884'), - SUFFIX: get(Config, 'PUSHER_DEV_SUFFIX', ''), + SUFFIX: ENVIRONMENT === CONST.ENVIRONMENT.DEV ? get(Config, 'PUSHER_DEV_SUFFIX', '') : '', CLUSTER: 'mt1', }, SITE_TITLE: 'New Expensify', diff --git a/src/CONST.ts b/src/CONST.ts index eba68999cc39..a6df33987c8d 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1215,9 +1215,9 @@ const CONST = { NOT_IMPORTED: 'NOT_IMPORTED', IMPORTED: 'IMPORTED', }, - QUICK_BOOKS_ONLINE: 'quickbooksOnline', + QUICKBOOKS_ONLINE: 'quickbooksOnline', - QUICK_BOOKS_IMPORTS: { + QUICKBOOKS_IMPORTS: { SYNC_CLASSES: 'syncClasses', ENABLE_NEW_CATEGORIES: 'enableNewCategories', SYNC_CUSTOMERS: 'syncCustomers', @@ -1363,7 +1363,7 @@ const CONST = { }, KYC_WALL_SOURCE: { - REPORT: 'REPORT', // The user attempted to pay a money request + REPORT: 'REPORT', // The user attempted to pay an expense ENABLE_WALLET: 'ENABLE_WALLET', // The user clicked on the `Enable wallet` button on the Wallet page TRANSFER_BALANCE: 'TRANSFER_BALANCE', // The user attempted to transfer their wallet balance to their bank account or debit card }, @@ -1399,7 +1399,7 @@ const CONST = { }, IOU: { - // This is the transactionID used when going through the create money request flow so that it mimics a real transaction (like the edit flow) + // This is the transactionID used when going through the create expense flow so that it mimics a real transaction (like the edit flow) OPTIMISTIC_TRANSACTION_ID: '1', // Note: These payment types are used when building IOU reportAction message values in the server and should // not be changed. @@ -1614,25 +1614,23 @@ const CONST = { GENERAL_SETTINGS: 'generalSettings', }, CONNECTIONS: { - SYNC_STATUS: { - STARTING: 'starting', - FINISHED: 'finished', - PROGRESS: 'progress', - }, NAME: { // Here we will add other connections names when we add support for them QBO: 'quickbooksOnline', }, SYNC_STAGE_NAME: { STARTING_IMPORT: 'startingImport', - QBO_CUSTOMERS: 'quickbooksOnlineImportCustomers', - QBO_EMPLOYEES: 'quickbooksOnlineImportEmployees', - QBO_ACCOUNTS: 'quickbooksOnlineImportAccounts', - QBO_CLASSES: 'quickbooksOnlineImportClasses', - QBO_LOCATIONS: 'quickbooksOnlineImportLocations', - QBO_PROCESSING: 'quickbooksOnlineImportProcessing', - QBO_PAYMENTS: 'quickbooksOnlineSyncBillPayments', - QBO_TAX_CODES: 'quickbooksOnlineSyncTaxCodes', + QBO_IMPORT_MAIN: 'quickbooksOnlineImportMain', + QBO_IMPORT_CUSTOMERS: 'quickbooksOnlineImportCustomers', + QBO_IMPORT_EMPLOYEES: 'quickbooksOnlineImportEmployees', + QBO_IMPORT_ACCOUNTS: 'quickbooksOnlineImportAccounts', + QBO_IMPORT_CLASSES: 'quickbooksOnlineImportClasses', + QBO_IMPORT_LOCATIONS: 'quickbooksOnlineImportLocations', + QBO_IMPORT_PROCESSING: 'quickbooksOnlineImportProcessing', + QBO_SYNC_PAYMENTS: 'quickbooksOnlineSyncBillPayments', + QBO_IMPORT_TAX_CODES: 'quickbooksOnlineSyncTaxCodes', + QBO_CHECK_CONNECTION: 'quickbooksOnlineCheckConnection', + JOB_DONE: 'jobDone', }, }, }, diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index dc82f542068f..7c9247bcdbd7 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -126,7 +126,7 @@ const ONYXKEYS = { /** The NVP with the last payment method used per policy */ NVP_LAST_PAYMENT_METHOD: 'nvp_private_lastPaymentMethod', - /** This NVP holds to most recent waypoints that a person has used when creating a distance request */ + /** This NVP holds to most recent waypoints that a person has used when creating a distance expense */ NVP_RECENT_WAYPOINTS: 'expensify_recentWaypoints', /** This NVP will be `true` if the user has ever dismissed the engagement modal on either OldDot or NewDot. If it becomes true it should stay true forever. */ @@ -318,7 +318,13 @@ const ONYXKEYS = { POLICY_RECENTLY_USED_CATEGORIES: 'policyRecentlyUsedCategories_', POLICY_TAGS: 'policyTags_', POLICY_RECENTLY_USED_TAGS: 'nvp_recentlyUsedTags_', + // Whether the policy's connection data was attempted to be fetched in + // the current user session. As this state only exists client-side, it + // should not be included as part of the policy object. The policy + // object should mirror the data as it's stored in the database. + POLICY_HAS_CONNECTIONS_DATA_BEEN_FETCHED: 'policyHasConnectionsDataBeenFetched_', OLD_POLICY_RECENTLY_USED_TAGS: 'policyRecentlyUsedTags_', + POLICY_CONNECTION_SYNC_PROGRESS: 'policyConnectionSyncProgress_', WORKSPACE_INVITE_MEMBERS_DRAFT: 'workspaceInviteMembersDraft_', WORKSPACE_INVITE_MESSAGE_DRAFT: 'workspaceInviteMessageDraft_', REPORT: 'report_', @@ -345,13 +351,11 @@ const ONYXKEYS = { PRIVATE_NOTES_DRAFT: 'privateNotesDraft_', NEXT_STEP: 'reportNextStep_', - // Manual request tab selector + // Manual expense tab selector SELECTED_TAB: 'selectedTab_', /** This is deprecated, but needed for a migration, so we still need to include it here so that it will be initialized in Onyx.init */ DEPRECATED_POLICY_MEMBER_LIST: 'policyMemberList_', - - POLICY_CONNECTION_SYNC_PROGRESS: 'policyConnectionSyncProgress_', }, /** List of Form ids */ @@ -525,6 +529,7 @@ type OnyxCollectionValuesMapping = { [ONYXKEYS.COLLECTION.POLICY_CATEGORIES]: OnyxTypes.PolicyCategories; [ONYXKEYS.COLLECTION.POLICY_TAGS]: OnyxTypes.PolicyTagList; [ONYXKEYS.COLLECTION.POLICY_RECENTLY_USED_CATEGORIES]: OnyxTypes.RecentlyUsedCategories; + [ONYXKEYS.COLLECTION.POLICY_HAS_CONNECTIONS_DATA_BEEN_FETCHED]: boolean; [ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST]: OnyxTypes.PolicyEmployeeList; [ONYXKEYS.COLLECTION.WORKSPACE_INVITE_MEMBERS_DRAFT]: OnyxTypes.InvitedEmailsToAccountIDs; [ONYXKEYS.COLLECTION.WORKSPACE_INVITE_MESSAGE_DRAFT]: string; diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 59d2cd797f73..7d73d8e55503 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -563,7 +563,7 @@ const ROUTES = { route: 'settings/workspaces/:policyID/members', getRoute: (policyID: string) => `settings/workspaces/${policyID}/members` as const, }, - WORKSPACE_ACCOUNTING: { + POLICY_ACCOUNTING: { route: 'settings/workspaces/:policyID/accounting', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting` as const, }, @@ -707,27 +707,27 @@ const ROUTES = { route: 'r/:reportID/transaction/:transactionID/receipt', getRoute: (reportID: string, transactionID: string) => `r/${reportID}/transaction/${transactionID}/receipt` as const, }, - WORKSPACE_ACCOUNTING_QUICKBOOKS_ONLINE_IMPORT: { + POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_IMPORT: { route: 'settings/workspaces/:policyID/accounting/quickbooks-online/import', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/quickbooks-online/import` as const, }, - WORKSPACE_ACCOUNTING_QUICKBOOKS_ONLINE_CHART_OF_ACCOUNTS: { + POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_CHART_OF_ACCOUNTS: { route: 'settings/workspaces/:policyID/accounting/quickbooks-online/import/accounts', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/quickbooks-online/import/accounts` as const, }, - WORKSPACE_ACCOUNTING_QUICKBOOKS_ONLINE_CLASSES: { + POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_CLASSES: { route: 'settings/workspaces/:policyID/accounting/quickbooks-online/import/classes', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/quickbooks-online/import/classes` as const, }, - WORKSPACE_ACCOUNTING_QUICKBOOKS_ONLINE_CUSTOMERS: { + POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_CUSTOMERS: { route: 'settings/workspaces/:policyID/accounting/quickbooks-online/import/customers', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/quickbooks-online/import/customers` as const, }, - WORKSPACE_ACCOUNTING_QUICKBOOKS_ONLINE_LOCATIONS: { + POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_LOCATIONS: { route: 'settings/workspaces/:policyID/accounting/quickbooks-online/import/locations', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/quickbooks-online/import/locations` as const, }, - WORKSPACE_ACCOUNTING_QUICKBOOKS_ONLINE_TAXES: { + POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_TAXES: { route: 'settings/workspaces/:policyID/accounting/quickbooks-online/import/taxes', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/quickbooks-online/import/taxes` as const, }, diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 5ff8b272e56f..d474945d332e 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -203,6 +203,15 @@ const SCREENS = { }, WORKSPACE: { + ACCOUNTING: { + ROOT: 'Policy_Accounting', + QUICKBOOKS_ONLINE_IMPORT: 'Policy_Accounting_Quickbooks_Online_Import', + QUICKBOOKS_ONLINE_CHART_OF_ACCOUNTS: 'Policy_Accounting_Quickbooks_Online_Import_Chart_Of_Accounts', + QUICKBOOKS_ONLINE_CLASSES: 'Policy_Accounting_Quickbooks_Online_Import_Classes', + QUICKBOOKS_ONLINE_CUSTOMERS: 'Policy_Accounting_Quickbooks_Online_Import_Customers', + QUICKBOOKS_ONLINE_LOCATIONS: 'Policy_Accounting_Quickbooks_Online_Import_Locations', + QUICKBOOKS_ONLINE_TAXES: 'Policy_Accounting_Quickbooks_Online_Import_Taxes', + }, INITIAL: 'Workspace_Initial', PROFILE: 'Workspace_Profile', CARD: 'Workspace_Card', @@ -214,7 +223,6 @@ 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', @@ -254,12 +262,6 @@ const SCREENS = { DISTANCE_RATES: 'Distance_Rates', CREATE_DISTANCE_RATE: 'Create_Distance_Rate', DISTANCE_RATES_SETTINGS: 'Distance_Rates_Settings', - QUICKBOOKS_ONLINE_IMPORT: 'Workspace_Accounting_Quickbooks_Online_Import', - QUICKBOOKS_ONLINE_CHART_OF_ACCOUNTS: 'Workspace_Accounting_Quickbooks_Online_Import_Chart_Of_Accounts', - QUICKBOOKS_ONLINE_CLASSES: 'Workspace_Accounting_Quickbooks_Online_Import_Classes', - QUICKBOOKS_ONLINE_CUSTOMERS: 'Workspace_Accounting_Quickbooks_Online_Import_Customers', - QUICKBOOKS_ONLINE_LOCATIONS: 'Workspace_Accounting_Quickbooks_Online_Import_Locations', - QUICKBOOKS_ONLINE_TAXES: 'Workspace_Accounting_Quickbooks_Online_Import_Taxes', DISTANCE_RATE_DETAILS: 'Distance_Rate_Details', DISTANCE_RATE_EDIT: 'Distance_Rate_Edit', }, diff --git a/src/components/ConfirmedRoute.tsx b/src/components/ConfirmedRoute.tsx index 17c5097b8154..351129a5ee3e 100644 --- a/src/components/ConfirmedRoute.tsx +++ b/src/components/ConfirmedRoute.tsx @@ -24,7 +24,7 @@ type ConfirmedRoutePropsOnyxProps = { }; type ConfirmedRouteProps = ConfirmedRoutePropsOnyxProps & { - /** Transaction that stores the distance request data */ + /** Transaction that stores the distance expense data */ transaction: OnyxEntry; }; diff --git a/src/components/ConnectToQuickbooksOnlineButton/index.native.tsx b/src/components/ConnectToQuickbooksOnlineButton/index.native.tsx new file mode 100644 index 000000000000..4d482cb92ead --- /dev/null +++ b/src/components/ConnectToQuickbooksOnlineButton/index.native.tsx @@ -0,0 +1,68 @@ +import React, {useState} from 'react'; +import type {OnyxEntry} from 'react-native-onyx'; +import {withOnyx} from 'react-native-onyx'; +import {WebView} from 'react-native-webview'; +import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView'; +import Button from '@components/Button'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Modal from '@components/Modal'; +import useLocalize from '@hooks/useLocalize'; +import {getQuickBooksOnlineSetupLink} from '@libs/actions/connections/QuickBooksOnline'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import type {Session} from '@src/types/onyx'; +import type {ConnectToQuickbooksOnlineButtonProps} from './types'; + +type ConnectToQuickbooksOnlineButtonOnyxProps = { + /** Session info for the currently logged in user. */ + session: OnyxEntry; +}; + +const renderLoading = () => ; + +function ConnectToQuickbooksOnlineButton({policyID, session}: ConnectToQuickbooksOnlineButtonProps & ConnectToQuickbooksOnlineButtonOnyxProps) { + const [isModalOpen, setIsModalOpen] = useState(false); + const {translate} = useLocalize(); + + return ( + <> +