File tree 4 files changed +11
-3
lines changed
4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,7 @@ export default {
337
337
notFound : {
338
338
chatYouLookingForCannotBeFound : 'The chat you are looking for cannot be found.' ,
339
339
getMeOutOfHere : 'Get me out of here' ,
340
+ iouReportNotFound : 'The payment details you are looking for cannot be found.' ,
340
341
} ,
341
342
setPasswordPage : {
342
343
enterPassword : 'Enter a password' ,
Original file line number Diff line number Diff line change @@ -335,8 +335,9 @@ export default {
335
335
createGroup : 'Crear Grupo' ,
336
336
} ,
337
337
notFound : {
338
- chatYouLookingForCannotBeFound : 'No se pudo encontrar el chat que estabas buscando .' ,
338
+ chatYouLookingForCannotBeFound : 'El chat que estás buscando no se ha podido encontrar .' ,
339
339
getMeOutOfHere : 'Sácame de aquí' ,
340
+ iouReportNotFound : 'Los detalles del pago que estás buscando no se han podido encontrar.' ,
340
341
} ,
341
342
setPasswordPage : {
342
343
enterPassword : 'Escribe una contraseña' ,
Original file line number Diff line number Diff line change @@ -461,11 +461,17 @@ function removeOptimisticActions(reportID) {
461
461
*
462
462
* @param {Number } iouReportID - ID of the report we are fetching
463
463
* @param {Number } chatReportID - associated chatReportID, set as an iouReport field
464
+ * @param {Boolean } [shouldRedirectIfEmpty=false] - Whether to redirect to Active Report Screen if IOUReport is empty
464
465
* @returns {Promise }
465
466
*/
466
- function fetchIOUReportByID ( iouReportID , chatReportID ) {
467
+ function fetchIOUReportByID ( iouReportID , chatReportID , shouldRedirectIfEmpty = false ) {
467
468
return fetchIOUReport ( iouReportID , chatReportID )
468
469
. then ( ( iouReportObject ) => {
470
+ if ( ! iouReportObject && shouldRedirectIfEmpty ) {
471
+ Growl . error ( translateLocal ( 'notFound.iouReportNotFound' ) ) ;
472
+ Navigation . navigate ( ROUTES . REPORT ) ;
473
+ return ;
474
+ }
469
475
setLocalIOUReportData ( iouReportObject ) ;
470
476
return iouReportObject ;
471
477
} ) ;
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ class IOUDetailsModal extends Component {
107
107
108
108
componentDidMount ( ) {
109
109
this . isComponentMounted = true ;
110
- fetchIOUReportByID ( this . props . route . params . iouReportID , this . props . route . params . chatReportID ) ;
110
+ fetchIOUReportByID ( this . props . route . params . iouReportID , this . props . route . params . chatReportID , true ) ;
111
111
this . addVenmoPaymentOptionIfAvailable ( ) ;
112
112
this . addExpensifyPaymentOptionIfAvailable ( ) ;
113
113
}
You can’t perform that action at this time.
0 commit comments