|
@@ -3685,10 +3685,12 @@ let transactionFilter = {
|
|
|
})
|
|
})
|
|
|
.then(response => response.json())
|
|
.then(response => response.json())
|
|
|
.then((response)=>{
|
|
.then((response)=>{
|
|
|
|
|
+ let transactions = [];
|
|
|
if(typeof(response) === "string"){
|
|
if(typeof(response) === "string"){
|
|
|
banner.createError(response);
|
|
banner.createError(response);
|
|
|
|
|
+ }else if(response.length === 0){
|
|
|
|
|
+ banner.createError("NO TRANSACTIONS MATCH YOUR SEARCH");
|
|
|
}else{
|
|
}else{
|
|
|
- let transactions = [];
|
|
|
|
|
for(let i = 0; i < response.length; i++){
|
|
for(let i = 0; i < response.length; i++){
|
|
|
transactions.push(new Transaction(
|
|
transactions.push(new Transaction(
|
|
|
response[i]._id,
|
|
response[i]._id,
|
|
@@ -3697,9 +3699,9 @@ let transactionFilter = {
|
|
|
merchant
|
|
merchant
|
|
|
));
|
|
));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- controller.openStrand("transactions", transactions);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ controller.openStrand("transactions", transactions);
|
|
|
})
|
|
})
|
|
|
.catch((err)=>{
|
|
.catch((err)=>{
|
|
|
banner.createError("SOMETHING WENT WRONG. PLEASE REFRESH THE PAGE");
|
|
banner.createError("SOMETHING WENT WRONG. PLEASE REFRESH THE PAGE");
|