@@ -618,12 +618,12 @@ const ROUTES = {
618618 ) ,
619619 } ,
620620 MONEY_REQUEST_STEP_AMOUNT : {
621- route : ':action/:iouType/amount/:transactionID/:reportID/:pageIndex?/:backToReport?' ,
622- getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , pageIndex : string , backTo = '' ) => {
621+ route : ':action/:iouType/amount/:transactionID/:reportID/:reportActionID?/: pageIndex?/:backToReport?' ,
622+ getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , reportActionID ?: string , pageIndex ? : string , backTo = '' ) => {
623623 if ( ! transactionID || ! reportID ) {
624624 Log . warn ( 'Invalid transactionID or reportID is used to build the MONEY_REQUEST_STEP_AMOUNT route' ) ;
625625 }
626- return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /amount/${ transactionID } /${ reportID } /${ pageIndex } ` , backTo ) ;
626+ return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /amount/${ transactionID } /${ reportID } /${ reportActionID ? ` ${ reportActionID } /` : '' } ${ pageIndex } ` , backTo ) ;
627627 } ,
628628 } ,
629629 MONEY_REQUEST_STEP_TAX_RATE : {
@@ -707,9 +707,9 @@ const ROUTES = {
707707 getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /subrate/${ transactionID } /${ reportID } /edit/${ pageIndex } ` , backTo ) ,
708708 } ,
709709 MONEY_REQUEST_STEP_REPORT : {
710- route : ':action/:iouType/report/:transactionID/:reportID' ,
711- getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string , reportID : string , backTo = '' ) =>
712- getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /report/${ transactionID } /${ reportID } ` , backTo ) ,
710+ route : ':action/:iouType/report/:transactionID/:reportID/:reportActionID? ' ,
711+ getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string , reportID : string , backTo = '' , reportActionID ?: string ) =>
712+ getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /report/${ transactionID } /${ reportID } ${ reportActionID ? `/ ${ reportActionID } ` : '' } ` , backTo ) ,
713713 } ,
714714 MONEY_REQUEST_EDIT_REPORT : {
715715 route : ':action/:iouType/report/:reportID/edit' ,
@@ -835,30 +835,30 @@ const ROUTES = {
835835 } ,
836836 } ,
837837 MONEY_REQUEST_STEP_DISTANCE : {
838- route : ':action/:iouType/distance/:transactionID/:reportID' ,
839- getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , backTo = '' ) => {
838+ route : ':action/:iouType/distance/:transactionID/:reportID/:reportActionID? ' ,
839+ getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , backTo = '' , reportActionID ?: string ) => {
840840 if ( ! transactionID || ! reportID ) {
841841 Log . warn ( 'Invalid transactionID or reportID is used to build the MONEY_REQUEST_STEP_DISTANCE route' ) ;
842842 }
843- return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /distance/${ transactionID } /${ reportID } ` , backTo ) ;
843+ return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /distance/${ transactionID } /${ reportID } ${ reportActionID ? `/ ${ reportActionID } ` : '' } ` , backTo ) ;
844844 } ,
845845 } ,
846846 MONEY_REQUEST_STEP_DISTANCE_RATE : {
847- route : ':action/:iouType/distanceRate/:transactionID/:reportID' ,
848- getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , backTo = '' ) => {
847+ route : ':action/:iouType/distanceRate/:transactionID/:reportID/:reportActionID? ' ,
848+ getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , backTo = '' , reportActionID ?: string ) => {
849849 if ( ! transactionID || ! reportID ) {
850850 Log . warn ( 'Invalid transactionID or reportID is used to build the MONEY_REQUEST_STEP_DISTANCE_RATE route' ) ;
851851 }
852- return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /distanceRate/${ transactionID } /${ reportID } ` , backTo ) ;
852+ return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /distanceRate/${ transactionID } /${ reportID } ${ reportActionID ? `/ ${ reportActionID } ` : '' } ` , backTo ) ;
853853 } ,
854854 } ,
855855 MONEY_REQUEST_STEP_MERCHANT : {
856- route : ':action/:iouType/merchant/:transactionID/:reportID' ,
857- getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , backTo = '' ) => {
856+ route : ':action/:iouType/merchant/:transactionID/:reportID/:reportActionID? ' ,
857+ getRoute : ( action : IOUAction , iouType : IOUType , transactionID : string | undefined , reportID : string | undefined , backTo = '' , reportActionID ?: string ) => {
858858 if ( ! transactionID || ! reportID ) {
859859 Log . warn ( 'Invalid transactionID or reportID is used to build the MONEY_REQUEST_STEP_MERCHANT route' ) ;
860860 }
861- return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /merchant/${ transactionID } /${ reportID } ` , backTo ) ;
861+ return getUrlWithBackToParam ( `${ action as string } /${ iouType as string } /merchant/${ transactionID } /${ reportID } ${ reportActionID ? `/ ${ reportActionID } ` : '' } ` , backTo ) ;
862862 } ,
863863 } ,
864864 MONEY_REQUEST_STEP_PARTICIPANTS : {
0 commit comments