Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7728a6f
add sage intacct connection types
SzymczakJ Jun 19, 2024
ad884f5
add code so that connected Sage Intacct is visible
SzymczakJ Jun 19, 2024
bd484c5
add sage intacct import page
SzymczakJ Jun 19, 2024
d815a06
add mapping pages
SzymczakJ Jun 20, 2024
3dac032
add translations
SzymczakJ Jun 21, 2024
a111402
replace hard coded strings with translations
SzymczakJ Jun 24, 2024
3f241e9
add missing translations
SzymczakJ Jun 25, 2024
2010faf
add user defined dimensions mocked screens
SzymczakJ Jun 25, 2024
d00f979
add user dimensions page
SzymczakJ Jun 26, 2024
48d2388
import page clean up
SzymczakJ Jul 1, 2024
3f6db5e
Merge branch 'main' into @szymczak/sage-intacct-import-page
SzymczakJ Jul 1, 2024
469b296
add offline state
SzymczakJ Jul 1, 2024
51920b5
add translations
SzymczakJ Jul 1, 2024
c722e80
add spanish translations
SzymczakJ Jul 1, 2024
14e9d02
remove debuging code
SzymczakJ Jul 1, 2024
125c79e
fix typecheck
SzymczakJ Jul 1, 2024
97a5b62
fix PR comments
SzymczakJ Jul 2, 2024
3928801
change offline state logic
SzymczakJ Jul 2, 2024
b40f1d4
Merge branch 'main' into @szymczak/sage-intacct-import-page
SzymczakJ Jul 2, 2024
ae74bdb
add remove user dimension logic
SzymczakJ Jul 2, 2024
6b80a51
show UDDs number on import page
SzymczakJ Jul 2, 2024
c9426a5
fix error state logic
SzymczakJ Jul 2, 2024
bdfe133
fix PR comments
SzymczakJ Jul 3, 2024
140681d
fix translations
SzymczakJ Jul 3, 2024
eeee3d0
fix translations
SzymczakJ Jul 4, 2024
cb74a7c
Merge branch 'main' into @szymczak/sage-intacct-import-page
SzymczakJ Jul 4, 2024
9e84c9b
modify styles
SzymczakJ Jul 4, 2024
40a0af9
fix typecheck
SzymczakJ Jul 4, 2024
773d8f6
fix PR comments
SzymczakJ Jul 4, 2024
f2dafdd
Merge branch 'main' into @szymczak/sage-intacct-import-page
SzymczakJ Jul 5, 2024
96a4b14
fix typecheck
SzymczakJ Jul 5, 2024
3414777
fix typecheck
SzymczakJ Jul 5, 2024
52df299
add "Not imported" label
SzymczakJ Jul 8, 2024
93406b2
fix undefined access bugs
SzymczakJ Jul 8, 2024
7b8a3f3
fix Sage Intacct API call
SzymczakJ Jul 9, 2024
de48a5e
make Sage intacct api param generic
SzymczakJ Jul 9, 2024
70c7488
fix naming and translations
SzymczakJ Jul 9, 2024
488a02f
Merge branch 'main' into @szymczak/sage-intacct-import-page
SzymczakJ Jul 9, 2024
f9b47d1
fix PR comments
SzymczakJ Jul 9, 2024
b204fb0
Merge branch 'main' into @szymczak/sage-intacct-import-page
SzymczakJ Jul 9, 2024
d6fc5ae
Merge branch 'main' into @szymczak/sage-intacct-import-page
SzymczakJ Jul 9, 2024
48d8df4
fix typecheck
SzymczakJ Jul 9, 2024
acdcbf5
fix typecheck
SzymczakJ Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions assets/images/product-illustrations/folder-with-papers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ const CONST = {
TRAVEL_TERMS_URL: `${USE_EXPENSIFY_URL}/travelterms`,
EXPENSIFY_PACKAGE_FOR_SAGE_INTACCT: 'https://www.expensify.com/tools/integrations/downloadPackage',
EXPENSIFY_PACKAGE_FOR_SAGE_INTACCT_FILE_NAME: 'ExpensifyPackageForSageIntacct',
SAGE_INTACCT_INSTRUCTIONS: 'https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Sage-Intacct',
HOW_TO_CONNECT_TO_SAGE_INTACCT: 'https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Sage-Intacct#how-to-connect-to-sage-intacct',
PRICING: `https://www.expensify.com/pricing`,

Expand Down Expand Up @@ -1345,7 +1346,23 @@ const CONST = {
},
},

SAGE_INTACCT_MAPPING_VALUE: {
NONE: 'NONE',
DEFAULT: 'DEFAULT',
TAG: 'TAG',
REPORT_FIELD: 'REPORT_FIELD',
},

SAGE_INTACCT_CONFIG: {
MAPPINGS: {
DEPARTMENTS: 'departments',
CLASSES: 'classes',
LOCATIONS: 'locations',
CUSTOMERS: 'customers',
PROJECTS: 'projects',
},
SYNC_ITEMS: 'syncItems',
TAX: 'tax',
EXPORT: 'export',
EXPORT_DATE: 'exportDate',
NON_REIMBURSABLE_CREDIT_CARD_VENDOR: 'nonReimbursableCreditCardChargeDefaultVendor',
Expand Down
3 changes: 3 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ const ONYXKEYS = {
NETSUITE_TOKEN_INPUT_FORM_DRAFT: 'netsuiteTokenInputFormDraft',
NETSUITE_CUSTOM_FORM_ID_FORM: 'netsuiteCustomFormIDForm',
NETSUITE_CUSTOM_FORM_ID_FORM_DRAFT: 'netsuiteCustomFormIDFormDraft',
SAGE_INTACCT_DIMENSION_TYPE_FORM: 'sageIntacctDimensionTypeForm',
SAGE_INTACCT_DIMENSION_TYPE_FORM_DRAFT: 'sageIntacctDimensionTypeFormDraft',
},
} as const;

Expand Down Expand Up @@ -629,6 +631,7 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.SAGE_INTACCT_CREDENTIALS_FORM]: FormTypes.SageIntactCredentialsForm;
[ONYXKEYS.FORMS.NETSUITE_TOKEN_INPUT_FORM]: FormTypes.NetSuiteTokenInputForm;
[ONYXKEYS.FORMS.NETSUITE_CUSTOM_FORM_ID_FORM]: FormTypes.NetSuiteCustomFormIDForm;
[ONYXKEYS.FORMS.SAGE_INTACCT_DIMENSION_TYPE_FORM]: FormTypes.SageIntacctDimensionForm;
};

type OnyxFormDraftValuesMapping = {
Expand Down
25 changes: 25 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type CONST from './CONST';
import type {IOUAction, IOUType} from './CONST';
import type {IOURequestType} from './libs/actions/IOU';
import type {AuthScreensParamList} from './libs/Navigation/types';
import type {SageIntacctMappingName} from './types/onyx/Policy';
import type {SearchQuery} from './types/onyx/SearchResults';
import type AssertTypesNotEqual from './types/utils/AssertTypesNotEqual';

Expand Down Expand Up @@ -1121,6 +1122,30 @@ const ROUTES = {
route: 'settings/workspaces/:policyID/accounting/sage-intacct/existing-connections',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/existing-connections` as const,
},
POLICY_ACCOUNTING_SAGE_INTACCT_IMPORT: {
route: 'settings/workspaces/:policyID/accounting/sage-intacct/import',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/import` as const,
},
POLICY_ACCOUNTING_SAGE_INTACCT_TOGGLE_MAPPINGS: {
route: 'settings/workspaces/:policyID/accounting/sage-intacct/import/toggle-mapping/:mapping',
getRoute: (policyID: string, mapping: SageIntacctMappingName) => `settings/workspaces/${policyID}/accounting/sage-intacct/import/toggle-mapping/${mapping}` as const,
},
POLICY_ACCOUNTING_SAGE_INTACCT_MAPPINGS_TYPE: {
route: 'settings/workspaces/:policyID/accounting/sage-intacct/import/mapping-type/:mapping',
getRoute: (policyID: string, mapping: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/import/mapping-type/${mapping}` as const,
},
POLICY_ACCOUNTING_SAGE_INTACCT_USER_DIMENSIONS: {
route: 'settings/workspaces/:policyID/accounting/sage-intacct/import/user-dimensions',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/import/user-dimensions` as const,
},
POLICY_ACCOUNTING_SAGE_INTACCT_ADD_USER_DIMENSION: {
route: 'settings/workspaces/:policyID/accounting/sage-intacct/import/add-user-dimension',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/import/add-user-dimension` as const,
},
POLICY_ACCOUNTING_SAGE_INTACCT_EDIT_USER_DIMENSION: {
route: 'settings/workspaces/:policyID/accounting/sage-intacct/import/edit-user-dimension/:dimensionName',
getRoute: (policyID: string, dimensionName: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/import/edit-user-dimension/${dimensionName}` as const,
},
POLICY_ACCOUNTING_SAGE_INTACCT_EXPORT: {
route: 'settings/workspaces/:policyID/accounting/sage-intacct/export',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/export` as const,
Expand Down
6 changes: 6 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,12 @@ const SCREENS = {
SAGE_INTACCT_PREREQUISITES: 'Policy_Accounting_Sage_Intacct_Prerequisites',
ENTER_SAGE_INTACCT_CREDENTIALS: 'Policy_Enter_Sage_Intacct_Credentials',
EXISTING_SAGE_INTACCT_CONNECTIONS: 'Policy_Existing_Sage_Intacct_Connections',
SAGE_INTACCT_IMPORT: 'Policy_Accounting_Sage_Intacct_Import',
SAGE_INTACCT_TOGGLE_MAPPING: 'Policy_Accounting_Sage_Intacct_Toggle_Mapping',
SAGE_INTACCT_MAPPING_TYPE: 'Policy_Accounting_Sage_Intacct_Mapping_Type',
SAGE_INTACCT_USER_DIMENSIONS: 'Policy_Accounting_Sage_Intacct_User_Dimensions',
SAGE_INTACCT_ADD_USER_DIMENSION: 'Policy_Accounting_Sage_Intacct_Add_User_Dimension',
SAGE_INTACCT_EDIT_USER_DIMENSION: 'Policy_Accounting_Sage_Intacct_Edit_User_Dimension',
SAGE_INTACCT_EXPORT: 'Policy_Accounting_Sage_Intacct_Export',
SAGE_INTACCT_PREFERRED_EXPORTER: 'Policy_Accounting_Sage_Intacct_Preferred_Exporter',
SAGE_INTACCT_EXPORT_DATE: 'Policy_Accounting_Sage_Intacct_Export_Date',
Expand Down
2 changes: 2 additions & 0 deletions src/components/Form/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import type TextInput from '@components/TextInput';
import type TextPicker from '@components/TextPicker';
import type ValuePicker from '@components/ValuePicker';
import type BusinessTypePicker from '@pages/ReimbursementAccount/BusinessInfo/substeps/TypeBusiness/BusinessTypePicker';
import type DimensionTypeSelector from '@pages/workspace/accounting/intacct/import/DimensionTypeSelector';
import type {Country} from '@src/CONST';
import type {OnyxFormKey, OnyxValues} from '@src/ONYXKEYS';
import type {BaseForm} from '@src/types/form/Form';
Expand All @@ -39,6 +40,7 @@ type ValidInputs =
| typeof CurrencySelector
| typeof AmountForm
| typeof BusinessTypePicker
| typeof DimensionTypeSelector
| typeof StateSelector
| typeof RoomNameInput
| typeof ValuePicker
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Illustrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ConciergeExclamation from '@assets/images/product-illustrations/concierge
import CreditCardsBlue from '@assets/images/product-illustrations/credit-cards--blue.svg';
import EmptyStateExpenses from '@assets/images/product-illustrations/emptystate__expenses.svg';
import EmptyStateTravel from '@assets/images/product-illustrations/emptystate__travel.svg';
import FolderWithPapers from '@assets/images/product-illustrations/folder-with-papers.svg';
import GpsTrackOrange from '@assets/images/product-illustrations/gps-track--orange.svg';
import Hands from '@assets/images/product-illustrations/home-illustration-hands.svg';
import InvoiceOrange from '@assets/images/product-illustrations/invoice--orange.svg';
Expand Down Expand Up @@ -197,5 +198,6 @@ export {
CheckmarkCircle,
CreditCardEyes,
LockClosedOrange,
FolderWithPapers,
VirtualCard,
};
42 changes: 41 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {CONST as COMMON_CONST, Str} from 'expensify-common';
import {startCase} from 'lodash';
import CONST from '@src/CONST';
import type {Country} from '@src/CONST';
import type {ConnectionName, PolicyConnectionSyncStage} from '@src/types/onyx/Policy';
import type {ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy';
import type {
AddressLineParams,
AdminCanceledRequestParams,
Expand Down Expand Up @@ -2005,6 +2005,7 @@ export default {
categories: 'Categories',
tags: 'Tags',
reportFields: 'Report fields',
reportField: 'Report field',
taxes: 'Taxes',
bills: 'Bills',
invoices: 'Invoices',
Expand Down Expand Up @@ -2037,6 +2038,9 @@ export default {
welcomeNote: ({workspaceName}: WelcomeNoteParams) =>
`You have been invited to ${workspaceName || 'a workspace'}! Download the Expensify mobile app at use.expensify.com/download to start tracking your expenses.`,
subscription: 'Subscription',
lineItemLevel: 'Line-item level',
reportLevel: 'Report level',
appliedOnExport: 'Not imported into Expensify, applied on export',
},
qbo: {
importDescription: 'Choose which coding configurations to import from QuickBooks Online to Expensify.',
Expand Down Expand Up @@ -2506,6 +2510,42 @@ export default {
reuseExistingConnection: 'Reuse existing connection',
existingConnections: 'Existing connections',
sageIntacctLastSync: (formattedDate: string) => `Sage Intacct - Last synced ${formattedDate}`,
employeeDefault: 'Sage Intacct employee default',
employeeDefaultDescription: "The employee's default department will be applied to their expenses in Sage Intacct if one exists.",
displayedAsTagDescription: "Department will be selectable for each individual expense on an employee's report.",
displayedAsReportFieldDescription: "Department selection will apply to all expenses on an employee's report.",
toggleImportTitleFirstPart: 'Choose how to handle Sage Intacct ',
toggleImportTitleSecondPart: ' in Expensify.',
expenseTypes: 'Expense types',
expenseTypesDescription: 'Sage Intacct expense types import into Expensify as categories.',
importTaxDescription: 'Import purchase tax rate from Sage Intacct.',
userDefinedDimensions: 'User-defined dimensions',
addUserDefinedDimension: 'Add user-defined dimension',
integrationName: 'Integration name',
dimensionExists: 'A dimension with this name already exists.',
removeDimension: 'Remove user-defined dimension',
removeDimensionPrompt: 'Are you sure you want to remove this user-defined dimension?',
userDefinedDimension: 'User-defined dimension',
addAUserDefinedDimension: 'Add a user-defined dimension',
detailedInstructionsLink: 'View detailed instructions',
detailedInstructionsRestOfSentence: ' on adding user-defined dimensions.',
userDimensionsAdded: (dimensionsCount: number) => `${dimensionsCount} ${Str.pluralize('UDD', `UDDs`, dimensionsCount)} added`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just stumbled into this. UDD is a user facing term?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe so. Here's screenshot from Figma:
Screenshot 2024-09-27 at 15 37 41

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, thanks! Seemed weird

mappingTitle: (mappingName: SageIntacctMappingName): string => {
switch (mappingName) {
case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.DEPARTMENTS:
return 'departments';
case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.CLASSES:
return 'classes';
case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.LOCATIONS:
return 'locations';
case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.CUSTOMERS:
return 'customers';
case CONST.SAGE_INTACCT_CONFIG.MAPPINGS.PROJECTS:
return 'projects (jobs)';
default:
return 'mappings';
}
},
},
type: {
free: 'Free',
Expand Down
Loading