diff --git a/android/app/src/main/assets/capacitor.config.json b/android/app/src/main/assets/capacitor.config.json
index 2399c4927..e3cb1e5e5 100644
--- a/android/app/src/main/assets/capacitor.config.json
+++ b/android/app/src/main/assets/capacitor.config.json
@@ -16,5 +16,8 @@
"sound"
]
}
+ },
+ "server": {
+ "url": "http://192.168.0.64:8101"
}
}
diff --git a/src/app/pages/search/search.page.html b/src/app/pages/search/search.page.html
index 10a12fac7..2bb5c894b 100644
--- a/src/app/pages/search/search.page.html
+++ b/src/app/pages/search/search.page.html
@@ -141,7 +141,7 @@
-
Assuntos mais recebidos
+
{{searchResult}}
diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts
index 45078e16b..0c1207814 100644
--- a/src/app/pages/search/search.page.ts
+++ b/src/app/pages/search/search.page.ts
@@ -37,6 +37,7 @@ export class SearchPage implements OnInit {
showLoader: boolean;
currentPath: string
+ searchResult = "Assuntos mais recebidos";
// See http://idangero.us/swiper/api/ for valid options.
slideOpts = {
@@ -219,29 +220,31 @@ export class SearchPage implements OnInit {
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{
-
- res.Categories.forEach( e => {
- e['Active'] = false;
- });
-
- // bind respose
- this.searchCategories = res.Categories;
-
- this.searchDocuments = this.sortArrayISODate(res.Documents);
-
- this.reorderList(this.ordinance);
-
- // hide show document
- if(this.searchDocuments.length >= 1){
- this.showDocuments = true;
- } else {
- this.showDocuments = false
- }
-
- this.showLoader = false;
- this.loadWordCloud();
+ res.Categories.forEach( e => {
+ e['Active'] = false;
+ });
+
+ // bind respose
+ this.searchCategories = res.Categories;
+
+ this.searchDocuments = this.sortArrayISODate(res.Documents);
+
+ this.reorderList(this.ordinance);
+
+ // hide show document
+ if(this.searchDocuments.length >= 1){
+ this.showDocuments = true;
+ } else {
+ this.showDocuments = false
+ }
+
+ this.showLoader = false;
+ this.loadWordCloud();
+ },error => {
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
});
}
else if ( this.type == "AccoesPresidenciais & ArquivoDespachoElect"){
@@ -286,6 +289,9 @@ export class SearchPage implements OnInit {
}
this.loadWordCloud();
+ },error => {
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
});
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender
@@ -317,6 +323,9 @@ export class SearchPage implements OnInit {
if(counter ==2){
this.showLoader = false;
}
+ },error => {
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
});
} else {
@@ -353,6 +362,9 @@ export class SearchPage implements OnInit {
}
this.loadWordCloud();
+ },error => {
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
});
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
@@ -385,6 +397,9 @@ export class SearchPage implements OnInit {
this.showLoader = false;
}
this.loadWordCloud();
+ },error => {
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
});
}
}
@@ -432,7 +447,10 @@ export class SearchPage implements OnInit {
}
this.showLoader = false;
this.loadWordCloud();
- });
+ },error => {
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
+ });
} else {
let counter = 0;
@@ -468,6 +486,9 @@ export class SearchPage implements OnInit {
}
this.loadWordCloud();
+ },error => {
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
});
}
}
@@ -500,6 +521,9 @@ export class SearchPage implements OnInit {
this.showLoader = false;
this.loadWordCloud();
+ },error => {
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
});
}