diff --git a/assets/images/expensify-card.svg b/assets/images/expensify-card.svg index 52f55778b2bd..2989f5025ae4 100644 --- a/assets/images/expensify-card.svg +++ b/assets/images/expensify-card.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/CONST.ts b/src/CONST.ts index c8cbe72bc39e..9ee9ec4d9147 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -2452,6 +2452,7 @@ const CONST = { }, }, EXPENSIFY_CARD: { + NAME: 'expensifyCard', BANK: 'Expensify Card', FRAUD_TYPES: { DOMAIN: 'domain', diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 9b351bd31899..c0ec944b71e1 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -878,6 +878,10 @@ const ROUTES = { route: 'settings/workspaces/:policyID/members/:accountID', getRoute: (policyID: string, accountID: number) => `settings/workspaces/${policyID}/members/${accountID}` as const, }, + WORKSPACE_MEMBER_NEW_CARD: { + route: 'settings/workspaces/:policyID/members/:accountID/new-card', + getRoute: (policyID: string, accountID: number) => `settings/workspaces/${policyID}/members/${accountID}/new-card` as const, + }, WORKSPACE_MEMBER_ROLE_SELECTION: { route: 'settings/workspaces/:policyID/members/:accountID/role-selection', getRoute: (policyID: string, accountID: number) => `settings/workspaces/${policyID}/members/${accountID}/role-selection` as const, @@ -960,10 +964,6 @@ const ROUTES = { route: 'settings/workspaces/:policyID/company-cards/select-feed', getRoute: (policyID: string) => `settings/workspaces/${policyID}/company-cards/select-feed` as const, }, - WORKSPACE_EXPENSIFY_CARD: { - route: 'settings/workspaces/:policyID/expensify-card', - getRoute: (policyID: string) => `settings/workspaces/${policyID}/expensify-card` as const, - }, WORKSPACE_COMPANY_CARDS_ASSIGN_CARD: { route: 'settings/workspaces/:policyID/company-cards/:feed/assign-card', getRoute: (policyID: string, feed: string) => `settings/workspaces/${policyID}/company-cards/${feed}/assign-card` as const, @@ -980,6 +980,10 @@ const ROUTES = { route: 'settings/workspaces/:policyID/company-cards/:bank/:cardID/edit/export', getRoute: (policyID: string, cardID: string, bank: string) => `settings/workspaces/${policyID}/company-cards/${bank}/${cardID}/edit/export` as const, }, + WORKSPACE_EXPENSIFY_CARD: { + route: 'settings/workspaces/:policyID/expensify-card', + getRoute: (policyID: string) => `settings/workspaces/${policyID}/expensify-card` as const, + }, WORKSPACE_EXPENSIFY_CARD_DETAILS: { route: 'settings/workspaces/:policyID/expensify-card/:cardID', getRoute: (policyID: string, cardID: string, backTo?: string) => getUrlWithBackToParam(`settings/workspaces/${policyID}/expensify-card/${cardID}`, backTo), diff --git a/src/SCREENS.ts b/src/SCREENS.ts index da92d2b0940d..920bd48dd42e 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -463,6 +463,7 @@ const SCREENS = { CATEGORIES_IMPORTED: 'Categories_Imported', MORE_FEATURES: 'Workspace_More_Features', MEMBER_DETAILS: 'Workspace_Member_Details', + MEMBER_NEW_CARD: 'Workspace_Member_NewCard', OWNER_CHANGE_CHECK: 'Workspace_Owner_Change_Check', OWNER_CHANGE_SUCCESS: 'Workspace_Owner_Change_Success', OWNER_CHANGE_ERROR: 'Workspace_Owner_Change_Error', diff --git a/src/languages/en.ts b/src/languages/en.ts index 4cfe7c59e6cc..7844d12e764a 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2881,6 +2881,7 @@ export default { startTransactionDate: 'Start transaction date', cardName: 'Card name', assignedYouCard: (assigner: string) => `${assigner} assigned you a company card! Imported transactions will appear in this chat.`, + chooseCardFeed: 'Choose card feed', }, expensifyCard: { issueAndManageCards: 'Issue and manage your Expensify Cards', diff --git a/src/languages/es.ts b/src/languages/es.ts index d6b3c6b20758..362fe5575dd0 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2926,6 +2926,7 @@ export default { startTransactionDate: 'Fecha de inicio de transacciones', cardName: 'Nombre de la tarjeta', assignedYouCard: (assigner: string) => `¡${assigner} te ha asignado una tarjeta de empresa! Las transacciones importadas aparecerán en este chat.`, + chooseCardFeed: 'Elige feed de tarjetas', }, expensifyCard: { issueAndManageCards: 'Emitir y gestionar Tarjetas Expensify', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index 864d810a4469..4108addac0f3 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -242,6 +242,7 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../../pages/workspace/categories/ImportedCategoriesPage').default, [SCREENS.WORKSPACE.UPGRADE]: () => require('../../../../pages/workspace/upgrade/WorkspaceUpgradePage').default, [SCREENS.WORKSPACE.MEMBER_DETAILS]: () => require('../../../../pages/workspace/members/WorkspaceMemberDetailsPage').default, + [SCREENS.WORKSPACE.MEMBER_NEW_CARD]: () => require('../../../../pages/workspace/members/WorkspaceMemberNewCardPage').default, [SCREENS.WORKSPACE.OWNER_CHANGE_CHECK]: () => require('@pages/workspace/members/WorkspaceOwnerChangeWrapperPage').default, [SCREENS.WORKSPACE.OWNER_CHANGE_SUCCESS]: () => require('../../../../pages/workspace/members/WorkspaceOwnerChangeSuccessPage').default, [SCREENS.WORKSPACE.OWNER_CHANGE_ERROR]: () => require('../../../../pages/workspace/members/WorkspaceOwnerChangeErrorPage').default, diff --git a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts index e092380e18fb..6d8871e5a38a 100755 --- a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts +++ b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts @@ -7,6 +7,7 @@ const FULL_SCREEN_TO_RHP_MAPPING: Partial> = { SCREENS.WORKSPACE.INVITE, SCREENS.WORKSPACE.INVITE_MESSAGE, SCREENS.WORKSPACE.MEMBER_DETAILS, + SCREENS.WORKSPACE.MEMBER_NEW_CARD, SCREENS.WORKSPACE.OWNER_CHANGE_CHECK, SCREENS.WORKSPACE.OWNER_CHANGE_SUCCESS, SCREENS.WORKSPACE.OWNER_CHANGE_ERROR, diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts index 69bbe12c857b..f90ddbe2f818 100644 --- a/src/libs/Navigation/linkingConfig/config.ts +++ b/src/libs/Navigation/linkingConfig/config.ts @@ -611,6 +611,9 @@ const config: LinkingOptions['config'] = { [SCREENS.WORKSPACE.MEMBER_DETAILS]: { path: ROUTES.WORKSPACE_MEMBER_DETAILS.route, }, + [SCREENS.WORKSPACE.MEMBER_NEW_CARD]: { + path: ROUTES.WORKSPACE_MEMBER_NEW_CARD.route, + }, [SCREENS.WORKSPACE.OWNER_CHANGE_SUCCESS]: { path: ROUTES.WORKSPACE_OWNER_CHANGE_SUCCESS.route, }, diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index e3a4def63e8b..1326a0c86709 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -358,6 +358,10 @@ type SettingsNavigatorParamList = { policyID: string; accountID: string; }; + [SCREENS.WORKSPACE.MEMBER_NEW_CARD]: { + policyID: string; + accountID: string; + }; [SCREENS.WORKSPACE.OWNER_CHANGE_SUCCESS]: { policyID: string; accountID: number; diff --git a/src/pages/workspace/companyCards/assignCard/AssigneeStep.tsx b/src/pages/workspace/companyCards/assignCard/AssigneeStep.tsx index 5be837840390..a57395d69cec 100644 --- a/src/pages/workspace/companyCards/assignCard/AssigneeStep.tsx +++ b/src/pages/workspace/companyCards/assignCard/AssigneeStep.tsx @@ -21,7 +21,6 @@ import Navigation from '@navigation/Navigation'; import * as CompanyCards from '@userActions/CompanyCards'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import ROUTES from '@src/ROUTES'; import type * as OnyxTypes from '@src/types/onyx'; const MINIMUM_MEMBER_TO_SHOW_SEARCH = 8; @@ -68,7 +67,7 @@ function AssigneeStep({policy}: AssigneeStepProps) { CompanyCards.setAssignCardStepAndData({currentStep: CONST.COMPANY_CARD.STEP.CONFIRMATION, isEditing: false}); return; } - Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(policy?.id ?? '-1')); + Navigation.goBack(); }; const shouldShowSearchInput = policy?.employeeList && Object.keys(policy.employeeList).length >= MINIMUM_MEMBER_TO_SHOW_SEARCH; diff --git a/src/pages/workspace/companyCards/assignCard/TransactionStartDateStep.tsx b/src/pages/workspace/companyCards/assignCard/TransactionStartDateStep.tsx index cfdb09e3df83..9c53889d6519 100644 --- a/src/pages/workspace/companyCards/assignCard/TransactionStartDateStep.tsx +++ b/src/pages/workspace/companyCards/assignCard/TransactionStartDateStep.tsx @@ -99,25 +99,25 @@ function TransactionStartDateStep() { shouldSingleExecuteRowSelect initiallyFocusedOptionKey={dateOptionSelected} shouldUpdateFocusedIndex - containerStyle={[styles.flex0, styles.flexShrink0, styles.flexBasisAuto, styles.pb0]} - // containerStyle={[styles.flexReset, styles.pb0]} + listFooterContent={ + dateOptionSelected === CONST.COMPANY_CARD.TRANSACTION_START_DATE_OPTIONS.CUSTOM ? ( + <> + setIsModalOpened(true)} + /> + setIsModalOpened(false)} + /> + + ) : null + } /> - {dateOptionSelected === CONST.COMPANY_CARD.TRANSACTION_START_DATE_OPTIONS.CUSTOM && ( - <> - setIsModalOpened(true)} - /> - setIsModalOpened(false)} - /> - - )}