@@ -175,11 +175,11 @@ const DYNAMIC_ROUTES = {
175175 } ,
176176 WORKSPACE_CONFIRMATION_CURRENCY : {
177177 path : 'currency' ,
178- entryScreens : [ SCREENS . WORKSPACE_CONFIRMATION . DYNAMIC_ROOT , SCREENS . TRAVEL . WORKSPACE_CONFIRMATION , SCREENS . MONEY_REQUEST . STEP_UPGRADE ] ,
178+ entryScreens : [ SCREENS . WORKSPACE_CONFIRMATION . DYNAMIC_ROOT , SCREENS . TRAVEL . WORKSPACE_CONFIRMATION , SCREENS . MONEY_REQUEST . DYNAMIC_STEP_UPGRADE ] ,
179179 } ,
180180 WORKSPACE_CONFIRMATION_PLAN_TYPE : {
181181 path : 'plan-type' ,
182- entryScreens : [ SCREENS . WORKSPACE_CONFIRMATION . DYNAMIC_ROOT , SCREENS . TRAVEL . WORKSPACE_CONFIRMATION , SCREENS . MONEY_REQUEST . STEP_UPGRADE ] ,
182+ entryScreens : [ SCREENS . WORKSPACE_CONFIRMATION . DYNAMIC_ROOT , SCREENS . TRAVEL . WORKSPACE_CONFIRMATION , SCREENS . MONEY_REQUEST . DYNAMIC_STEP_UPGRADE ] ,
183183 } ,
184184 MIGRATED_USER_WELCOME : {
185185 path : 'migrated-user-welcome' ,
@@ -473,7 +473,7 @@ const DYNAMIC_ROUTES = {
473473 SCREENS . WORKSPACE_CONFIRMATION . OWNER_SELECTOR ,
474474 SCREENS . WORKSPACE_DUPLICATE . ROOT ,
475475 SCREENS . TRAVEL . WORKSPACE_CONFIRMATION ,
476- SCREENS . MONEY_REQUEST . STEP_UPGRADE ,
476+ SCREENS . MONEY_REQUEST . DYNAMIC_STEP_UPGRADE ,
477477 SCREENS . REPORT_DETAILS . DYNAMIC_ROOT ,
478478 ] ,
479479 } ,
@@ -1646,6 +1646,18 @@ const DYNAMIC_ROUTES = {
16461646 getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string , reportID : string | undefined ) => getUrlWithParams ( 'taxAmount' , { action, iouType, transactionID, reportID} ) ,
16471647 queryParams : [ 'action' , 'iouType' , 'transactionID' , 'reportID' ] ,
16481648 } ,
1649+ MONEY_REQUEST_ACCOUNTANT : {
1650+ path : 'accountant' ,
1651+ entryScreens : [
1652+ SCREENS . REPORT ,
1653+ SCREENS . RIGHT_MODAL . SEARCH_REPORT ,
1654+ SCREENS . RIGHT_MODAL . EXPENSE_REPORT ,
1655+ SCREENS . RIGHT_MODAL . SEARCH_MONEY_REQUEST_REPORT ,
1656+ SCREENS . REPORT_DETAILS . DYNAMIC_ROOT ,
1657+ ] ,
1658+ getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string , reportID : string | undefined ) => getUrlWithParams ( 'accountant' , { action, iouType, transactionID, reportID} ) ,
1659+ queryParams : [ 'action' , 'iouType' , 'transactionID' , 'reportID' ] ,
1660+ } ,
16491661 MONEY_REQUEST_STEP_CATEGORY : {
16501662 path : 'category' ,
16511663 entryScreens : [
@@ -1685,6 +1697,23 @@ const DYNAMIC_ROUTES = {
16851697 getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string , reportID : string | undefined ) => getUrlWithParams ( 'attendees' , { action, iouType, transactionID, reportID} ) ,
16861698 queryParams : [ 'action' , 'iouType' , 'transactionID' , 'reportID' ] ,
16871699 } ,
1700+ MONEY_REQUEST_UPGRADE : {
1701+ path : 'money-request-upgrade' ,
1702+ entryScreens : [ '*' ] ,
1703+ getRoute : ( params : { action : IOUAction ; iouType : IOUType ; transactionID : string ; reportID : string ; upgradeBackTo ?: string ; shouldSubmitExpense ?: boolean ; upgradePath ?: string } ) => {
1704+ const { action, iouType, transactionID, reportID, upgradeBackTo, shouldSubmitExpense, upgradePath} = params ;
1705+ return getUrlWithParams ( 'money-request-upgrade' , {
1706+ action,
1707+ iouType,
1708+ transactionID,
1709+ reportID,
1710+ upgradeBackTo,
1711+ shouldSubmitExpense : shouldSubmitExpense ? 'true' : undefined ,
1712+ upgradePath,
1713+ } ) ;
1714+ } ,
1715+ queryParams : [ 'action' , 'iouType' , 'transactionID' , 'reportID' , 'upgradeBackTo' , 'shouldSubmitExpense' , 'upgradePath' ] ,
1716+ } ,
16881717} as const satisfies DynamicRoutes ;
16891718
16901719const ROUTES = {
@@ -2404,30 +2433,6 @@ const ROUTES = {
24042433 return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /amount/${ transactionID } /${ reportID } /${ reportActionID ? `${ reportActionID } /` : '' } ${ pageIndex } ` , backTo ) ;
24052434 } ,
24062435 } ,
2407- MONEY_REQUEST_ACCOUNTANT : {
2408- route : ':action/:iouType/accountant/:transactionID/:reportID' ,
2409- getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , backTo = '' ) => {
2410- if ( ! transactionID || ! reportID ) {
2411- Log . warn ( 'Invalid transactionID or reportID is used to build the MONEY_REQUEST_ACCOUNTANT route' ) ;
2412- }
2413-
2414- return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /accountant/${ transactionID } /${ reportID } ` , backTo ) ;
2415- } ,
2416- } ,
2417- MONEY_REQUEST_UPGRADE : {
2418- route : ':action/:iouType/upgrade/:transactionID/:reportID/:upgradePath?' ,
2419- getRoute : ( params : { action : IOUAction ; iouType : IOUType ; transactionID : string ; reportID : string ; backTo ?: string ; shouldSubmitExpense ?: boolean ; upgradePath ?: string } ) => {
2420- const { action, iouType, transactionID, reportID, backTo = '' , shouldSubmitExpense = false , upgradePath} = params ;
2421- const upgradePathParam = upgradePath ? `/${ upgradePath } ` : '' ;
2422- const baseURL = `${ action as string } /${ iouType as string } /upgrade/${ transactionID } /${ reportID } ${ upgradePathParam } ` as const ;
2423-
2424- if ( shouldSubmitExpense ) {
2425- return getUrlWithBackToParam ( `${ baseURL } ?shouldSubmitExpense=${ shouldSubmitExpense } ` as const , backTo ) ;
2426- }
2427-
2428- return getUrlWithBackToParam ( baseURL , backTo ) ;
2429- } ,
2430- } ,
24312436 MONEY_REQUEST_STEP_VENDOR : {
24322437 route : ':action/:iouType/vendor/:transactionID/:reportID/:reportActionID?' ,
24332438 getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , backTo = '' , reportActionID ?: string ) => {
0 commit comments