Skip to content

Commit e46961d

Browse files
committed
Merge remote-tracking branch 'upstream/main' into 83836-migrate-expensify-cards-settings-version-2
2 parents 9f2d79b + 27926a7 commit e46961d

70 files changed

Lines changed: 815 additions & 391 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/articles/new-expensify/connect-credit-cards/Share-a-Company-Card-Connection-Across-Workspaces.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ Workspace Admins with an email on a private domain can share a company card feed
3434
1. Click the navigation tabs (on the left on web, on the bottom on mobile) and select **Workspaces > [Workspace Name]**
3535
2. Choose **Company cards** to view your company’s card setup page.
3636
- If you don't see **Company cards**, enable the feature under **More features > Company cards**
37-
3. Select your existing card connection.
38-
4. In **From other workspaces**, choose a company card feed to add to the Workspace.
37+
3. Click **Add cards**.
38+
4. Select your existing card connection.
39+
5. In **From other workspaces**, choose a company card feed to add to the Workspace.
3940

4041
---
4142

src/CONST/index.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,13 @@ const CONST = {
738738
PERSONAL: 'PERSONAL',
739739
},
740740
},
741-
NON_USD_BANK_ACCOUNT: {
741+
CORPAY_DOCUMENT: {
742742
ALLOWED_FILE_TYPES: ['pdf', 'jpg', 'jpeg', 'png'],
743743
FILE_LIMIT: 1,
744+
MAX_FILE_SIZE: 2097152,
744745
TOTAL_FILES_SIZE_LIMIT: 5242880,
746+
},
747+
NON_USD_BANK_ACCOUNT: {
745748
PURPOSE_OF_TRANSACTION_ID: 'Intercompany_Payment',
746749
CURRENT_USER_KEY: 'currentUser',
747750
CORPAY_UNDEFINED_OPTION_VALUE: 'Undefined',
@@ -1892,6 +1895,7 @@ const CONST = {
18921895
NATIVE_ID: 'composer',
18931896
MAX_LINES: 16,
18941897
MAX_LINES_SMALL_SCREEN: 6,
1898+
MAX_LINES_LANDSCAPE_MODE: 2,
18951899
MAX_LINES_FULL: -1,
18961900
// The minimum height needed to enable the full screen composer
18971901
FULL_COMPOSER_MIN_HEIGHT: 60,
@@ -7713,6 +7717,7 @@ const CONST = {
77137717
WITHDRAWAL_ID: this.TABLE_COLUMNS.WITHDRAWAL_ID,
77147718
},
77157719
EXPENSE_REPORT: {
7720+
AVATAR: this.TABLE_COLUMNS.AVATAR,
77167721
DATE: this.TABLE_COLUMNS.DATE,
77177722
SUBMITTED: this.TABLE_COLUMNS.SUBMITTED,
77187723
APPROVED: this.TABLE_COLUMNS.APPROVED,
@@ -7758,17 +7763,20 @@ const CONST = {
77587763
get GROUP_CUSTOM_COLUMNS() {
77597764
return {
77607765
FROM: {
7766+
AVATAR: this.TABLE_COLUMNS.AVATAR,
77617767
FROM: this.TABLE_COLUMNS.GROUP_FROM,
77627768
EXPENSES: this.TABLE_COLUMNS.GROUP_EXPENSES,
77637769
TOTAL: this.TABLE_COLUMNS.GROUP_TOTAL,
77647770
},
77657771
CARD: {
7772+
AVATAR: this.TABLE_COLUMNS.AVATAR,
77667773
CARD: this.TABLE_COLUMNS.GROUP_CARD,
77677774
FEED: this.TABLE_COLUMNS.GROUP_FEED,
77687775
EXPENSES: this.TABLE_COLUMNS.GROUP_EXPENSES,
77697776
TOTAL: this.TABLE_COLUMNS.GROUP_TOTAL,
77707777
},
77717778
WITHDRAWAL_ID: {
7779+
AVATAR: this.TABLE_COLUMNS.AVATAR,
77727780
WITHDRAWN: this.TABLE_COLUMNS.GROUP_WITHDRAWN,
77737781
WITHDRAWAL_STATUS: this.TABLE_COLUMNS.GROUP_WITHDRAWAL_STATUS,
77747782
BANK_ACCOUNT: this.TABLE_COLUMNS.GROUP_BANK_ACCOUNT,
@@ -7826,6 +7834,7 @@ const CONST = {
78267834
this.TABLE_COLUMNS.TOTAL_AMOUNT,
78277835
],
78287836
EXPENSE_REPORT: [
7837+
this.TABLE_COLUMNS.AVATAR,
78297838
this.TABLE_COLUMNS.DATE,
78307839
this.TABLE_COLUMNS.STATUS,
78317840
this.TABLE_COLUMNS.TITLE,
@@ -7842,9 +7851,10 @@ const CONST = {
78427851
},
78437852
get GROUP_DEFAULT_COLUMNS() {
78447853
return {
7845-
FROM: [this.TABLE_COLUMNS.GROUP_FROM, this.TABLE_COLUMNS.GROUP_EXPENSES, this.TABLE_COLUMNS.GROUP_TOTAL],
7846-
CARD: [this.TABLE_COLUMNS.GROUP_CARD, this.TABLE_COLUMNS.GROUP_FEED, this.TABLE_COLUMNS.GROUP_EXPENSES, this.TABLE_COLUMNS.GROUP_TOTAL],
7854+
FROM: [this.TABLE_COLUMNS.AVATAR, this.TABLE_COLUMNS.GROUP_FROM, this.TABLE_COLUMNS.GROUP_EXPENSES, this.TABLE_COLUMNS.GROUP_TOTAL],
7855+
CARD: [this.TABLE_COLUMNS.AVATAR, this.TABLE_COLUMNS.GROUP_CARD, this.TABLE_COLUMNS.GROUP_FEED, this.TABLE_COLUMNS.GROUP_EXPENSES, this.TABLE_COLUMNS.GROUP_TOTAL],
78477856
WITHDRAWAL_ID: [
7857+
this.TABLE_COLUMNS.AVATAR,
78487858
this.TABLE_COLUMNS.GROUP_WITHDRAWN,
78497859
this.TABLE_COLUMNS.GROUP_WITHDRAWAL_STATUS,
78507860
this.TABLE_COLUMNS.GROUP_BANK_ACCOUNT,

src/ONYXKEYS.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,9 @@ const ONYXKEYS = {
573573
/** Stores the information about duplicated workspace */
574574
DUPLICATE_WORKSPACE: 'duplicateWorkspace',
575575

576+
/** Stores the state of the bulk Copy Policy Settings flow */
577+
COPY_POLICY_SETTINGS: 'copyPolicySettings',
578+
576579
/** Stores the information about currently edited advanced approval workflow */
577580
APPROVAL_WORKFLOW: 'approvalWorkflow',
578581

@@ -1512,6 +1515,7 @@ type OnyxValuesMapping = {
15121515
[ONYXKEYS.ASSIGN_CARD]: OnyxTypes.AssignCard;
15131516
[ONYXKEYS.RAM_ONLY_MOBILE_SELECTION_MODE]: boolean;
15141517
[ONYXKEYS.DUPLICATE_WORKSPACE]: OnyxTypes.DuplicateWorkspace;
1518+
[ONYXKEYS.COPY_POLICY_SETTINGS]: OnyxTypes.CopyPolicySettings;
15151519
[ONYXKEYS.NVP_FIRST_DAY_FREE_TRIAL]: string;
15161520
[ONYXKEYS.NVP_LAST_DAY_FREE_TRIAL]: string;
15171521
[ONYXKEYS.NVP_BILLING_FUND_ID]: number;

src/ROUTES.ts

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@ const DYNAMIC_ROUTES = {
226226
path: 'qbd-company-card-expense-account-select',
227227
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_QUICKBOOKS_DESKTOP_EXPORT, SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_QUICKBOOKS_DESKTOP_COMPANY_CARD_EXPENSE_ACCOUNT],
228228
},
229+
POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_OUT_OF_POCKET_EXPENSE_ACCOUNT_SELECT: {
230+
path: 'qbd-account-select',
231+
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES],
232+
},
233+
POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_OUT_OF_POCKET_EXPENSE_ENTITY_SELECT: {
234+
path: 'qbd-entity-select',
235+
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES],
236+
},
229237
POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_INVOICE_ACCOUNT_SELECT: {
230238
path: 'invoice-account-select',
231239
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_QUICKBOOKS_ONLINE_EXPORT],
@@ -254,11 +262,23 @@ const DYNAMIC_ROUTES = {
254262
},
255263
POLICY_ACCOUNTING_XERO_EXPORT_BANK_ACCOUNT_SELECT: {
256264
path: 'bank-account-select',
257-
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.XERO_EXPORT],
265+
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_XERO_EXPORT],
258266
},
259267
POLICY_ACCOUNTING_XERO_BILL_STATUS_SELECTOR: {
260268
path: 'purchase-bill-status-selector',
261-
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.XERO_EXPORT],
269+
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_XERO_EXPORT],
270+
},
271+
POLICY_ACCOUNTING_XERO_EXPORT: {
272+
path: 'xero/export',
273+
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.ROOT, SCREENS.WORKSPACE.COMPANY_CARD_EXPORT],
274+
},
275+
POLICY_ACCOUNTING_XERO_PREFERRED_EXPORTER_SELECT: {
276+
path: 'xero-preferred-exporter/select',
277+
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_XERO_EXPORT],
278+
},
279+
POLICY_ACCOUNTING_XERO_EXPORT_PURCHASE_BILL_DATE_SELECT: {
280+
path: 'purchase-bill-date-select',
281+
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_XERO_EXPORT],
262282
},
263283
POLICY_ACCOUNTING_XERO_AUTO_SYNC: {
264284
path: 'xero-autosync',
@@ -2099,28 +2119,6 @@ const ROUTES = {
20992119
return getUrlWithBackToParam(`workspaces/${policyID}/accounting/quickbooks-desktop/export/out-of-pocket-expense` as const, backTo);
21002120
},
21012121
},
2102-
POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES_ACCOUNT_SELECT: {
2103-
route: 'workspaces/:policyID/accounting/quickbooks-desktop/export/out-of-pocket-expense/account-select',
2104-
getRoute: (policyID?: string, backTo?: string) => {
2105-
if (!policyID) {
2106-
Log.warn('Invalid policyID is used to build the POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES_ACCOUNT_SELECT route');
2107-
}
2108-
2109-
// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
2110-
return getUrlWithBackToParam(`workspaces/${policyID}/accounting/quickbooks-desktop/export/out-of-pocket-expense/account-select` as const, backTo);
2111-
},
2112-
},
2113-
POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES_SELECT: {
2114-
route: 'workspaces/:policyID/accounting/quickbooks-desktop/export/out-of-pocket-expense/entity-select',
2115-
getRoute: (policyID?: string, backTo?: string) => {
2116-
if (!policyID) {
2117-
Log.warn('Invalid policyID is used to build the POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES_SELECT route');
2118-
}
2119-
2120-
// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
2121-
return getUrlWithBackToParam(`workspaces/${policyID}/accounting/quickbooks-desktop/export/out-of-pocket-expense/entity-select` as const, backTo);
2122-
},
2123-
},
21242122
POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_EXISTING_CONNECTIONS: {
21252123
route: 'workspaces/:policyID/accounting/quickbooks-desktop/existing-connections',
21262124
getRoute: (policyID: string) => `workspaces/${policyID}/accounting/quickbooks-desktop/existing-connections` as const,
@@ -2953,6 +2951,18 @@ const ROUTES = {
29532951
route: 'workspace/:policyID/duplicate/select-features',
29542952
getRoute: (policyID: string) => `workspace/${policyID}/duplicate/select-features` as const,
29552953
},
2954+
POLICY_COPY_SETTINGS: {
2955+
route: 'policy/:policyID/copy-settings',
2956+
getRoute: (policyID: string) => `policy/${policyID}/copy-settings` as const,
2957+
},
2958+
POLICY_COPY_SETTINGS_SELECT_FEATURES: {
2959+
route: 'policy/:policyID/copy-settings/select-features',
2960+
getRoute: (policyID: string) => `policy/${policyID}/copy-settings/select-features` as const,
2961+
},
2962+
POLICY_COPY_SETTINGS_CONFIRM: {
2963+
route: 'policy/:policyID/copy-settings/confirm',
2964+
getRoute: (policyID: string) => `policy/${policyID}/copy-settings/confirm` as const,
2965+
},
29562966
WORKSPACE_RECEIPT_PARTNERS: {
29572967
route: 'workspaces/:policyID/receipt-partners',
29582968
getRoute: (policyID: string | undefined, backTo?: string) => {
@@ -3519,24 +3529,6 @@ const ROUTES = {
35193529
route: 'workspaces/:policyID/accounting/xero/import/taxes',
35203530
getRoute: (policyID: string) => `workspaces/${policyID}/accounting/xero/import/taxes` as const,
35213531
},
3522-
POLICY_ACCOUNTING_XERO_EXPORT: {
3523-
route: 'workspaces/:policyID/accounting/xero/export',
3524-
3525-
// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
3526-
getRoute: (policyID: string, backTo?: string) => getUrlWithBackToParam(`workspaces/${policyID}/accounting/xero/export` as const, backTo, false),
3527-
},
3528-
POLICY_ACCOUNTING_XERO_PREFERRED_EXPORTER_SELECT: {
3529-
route: 'workspaces/:policyID/connections/xero/export/preferred-exporter/select',
3530-
3531-
// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
3532-
getRoute: (policyID: string, backTo?: string) => getUrlWithBackToParam(`workspaces/${policyID}/connections/xero/export/preferred-exporter/select` as const, backTo),
3533-
},
3534-
POLICY_ACCOUNTING_XERO_EXPORT_PURCHASE_BILL_DATE_SELECT: {
3535-
route: 'workspaces/:policyID/accounting/xero/export/purchase-bill-date-select',
3536-
3537-
// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
3538-
getRoute: (policyID: string, backTo?: string) => getUrlWithBackToParam(`workspaces/${policyID}/accounting/xero/export/purchase-bill-date-select` as const, backTo),
3539-
},
35403532
POLICY_ACCOUNTING_XERO_ADVANCED: {
35413533
route: 'workspaces/:policyID/accounting/xero/advanced',
35423534
getRoute: (policyID: string | undefined) => {

src/SCREENS.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ const SCREENS = {
301301
REPORT_CHANGE_WORKSPACE: 'ReportChangeWorkspace',
302302
WORKSPACE_CONFIRMATION: 'Workspace_Confirmation',
303303
WORKSPACE_DUPLICATE: 'Workspace_Duplicate',
304+
POLICY_COPY_SETTINGS: 'Policy_Copy_Settings',
304305
REPORT_SETTINGS: 'Report_Settings',
305306
REPORT_DESCRIPTION: 'Report_Description',
306307
PARTICIPANTS: 'Participants',
@@ -527,6 +528,11 @@ const SCREENS = {
527528

528529
WORKSPACE_CONFIRMATION: {ROOT: 'Workspace_Confirmation_Root', OWNER_SELECTOR: 'Workspace_Confirmation_Owner_Selector', SUCCESS: 'Workspace_Confirmation_Success'},
529530
WORKSPACE_DUPLICATE: {ROOT: 'Workspace_Duplicate_Root', SELECT_FEATURES: 'Workspace_Duplicate_Select_Features'},
531+
POLICY_COPY_SETTINGS: {
532+
ROOT: 'Policy_Copy_Settings_Root',
533+
SELECT_FEATURES: 'Policy_Copy_Settings_Select_Features',
534+
CONFIRM: 'Policy_Copy_Settings_Confirm',
535+
},
530536

531537
WORKSPACES_LIST: 'Workspaces_List',
532538

@@ -573,8 +579,8 @@ const SCREENS = {
573579
QUICKBOOKS_DESKTOP_EXPORT_DATE_SELECT: 'Workspace_Accounting_Quickbooks_Desktop_Export_Date_Select',
574580
QUICKBOOKS_DESKTOP_EXPORT_PREFERRED_EXPORTER: 'Workspace_Accounting_Quickbooks_Desktop_Export_Preferred_Exporter',
575581
QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES: 'Workspace_Accounting_Quickbooks_Desktop_Export_Out_Of_Pocket_Expenses',
576-
QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES_SELECT: 'Workspace_Accounting_Quickbooks_Desktop_Export_Out_Of_Pocket_Expenses_Select',
577-
QUICKBOOKS_DESKTOP_EXPORT_OUT_OF_POCKET_EXPENSES_ACCOUNT_SELECT: 'Workspace_Accounting_Quickbooks_Desktop_Export_Out_Of_Pocket_Expenses_Account_Select',
582+
DYNAMIC_QUICKBOOKS_DESKTOP_OUT_OF_POCKET_EXPENSE_ENTITY_SELECT: 'Dynamic_Workspace_Accounting_Quickbooks_Desktop_Export_Out_Of_Pocket_Expenses_Select',
583+
DYNAMIC_QUICKBOOKS_DESKTOP_OUT_OF_POCKET_EXPENSE_ACCOUNT_SELECT: 'Dynamic_Workspace_Accounting_Quickbooks_Desktop_Export_Out_Of_Pocket_Expenses_Account_Select',
578584
DYNAMIC_QUICKBOOKS_DESKTOP_EXPORT: 'Dynamic_Workspace_Accounting_Quickbooks_Desktop_Export',
579585
QUICKBOOKS_DESKTOP_REUSE_EXISTING_CONNECTIONS: 'Policy_Accounting_Quickbooks_Desktop_Reuse_Existing_Connections',
580586
QUICKBOOKS_DESKTOP_SETUP_MODAL: 'Policy_Accounting_Quickbooks_Desktop_Setup_Modal',
@@ -595,14 +601,14 @@ const SCREENS = {
595601
XERO_TAXES: 'Policy_Accounting_Xero_Taxes',
596602
XERO_TRACKING_CATEGORIES: 'Policy_Accounting_Xero_Tracking_Categories',
597603
XERO_MAP_TRACKING_CATEGORY: 'Policy_Accounting_Xero_Map_Tracking_Category',
598-
XERO_EXPORT: 'Policy_Accounting_Xero_Export',
599-
XERO_EXPORT_PURCHASE_BILL_DATE_SELECT: 'Policy_Accounting_Xero_Export_Purchase_Bill_Date_Select',
604+
DYNAMIC_XERO_EXPORT: 'Dynamic_Policy_Accounting_Xero_Export',
605+
DYNAMIC_XERO_EXPORT_PURCHASE_BILL_DATE_SELECT: 'Dynamic_Policy_Accounting_Xero_Export_Purchase_Bill_Date_Select',
600606
XERO_ADVANCED: 'Policy_Accounting_Xero_Advanced',
601607
DYNAMIC_XERO_AUTO_SYNC: 'Dynamic_Policy_Accounting_Xero_Auto_Sync',
602608
DYNAMIC_XERO_ACCOUNTING_METHOD: 'Dynamic_Policy_Accounting_Xero_Accounting_Method',
603609
DYNAMIC_XERO_BILL_STATUS_SELECTOR: 'Dynamic_Policy_Accounting_Xero_Export_Bill_Status_Selector',
604610
XERO_INVOICE_ACCOUNT_SELECTOR: 'Policy_Accounting_Xero_Invoice_Account_Selector',
605-
XERO_EXPORT_PREFERRED_EXPORTER_SELECT: 'Workspace_Accounting_Xero_Export_Preferred_Exporter_Select',
611+
DYNAMIC_XERO_EXPORT_PREFERRED_EXPORTER_SELECT: 'Dynamic_Workspace_Accounting_Xero_Export_Preferred_Exporter_Select',
606612
XERO_BILL_PAYMENT_ACCOUNT_SELECTOR: 'Policy_Accounting_Xero_Bill_Payment_Account_Selector',
607613
DYNAMIC_XERO_EXPORT_BANK_ACCOUNT_SELECT: 'Dynamic_Policy_Accounting_Xero_Export_Bank_Account_Select',
608614
NETSUITE_IMPORT_MAPPING: 'Policy_Accounting_NetSuite_Import_Mapping',

0 commit comments

Comments
 (0)