mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
improve search loader and chat user flow
This commit is contained in:
@@ -158,7 +158,7 @@ export class SearchPage implements OnInit {
|
||||
this.searchSubject = search;
|
||||
}
|
||||
|
||||
window['searchTriger'] = () =>{
|
||||
window['searchTriger'] = () => {
|
||||
this.basicSearch();
|
||||
}
|
||||
|
||||
@@ -170,8 +170,6 @@ export class SearchPage implements OnInit {
|
||||
|
||||
const container = document.querySelector('.seach-wrapper');
|
||||
|
||||
// container.setAttribute('style',`width: ${window.innerWidth}px`);
|
||||
|
||||
const highest= res[0].Hits;
|
||||
const lowest = res[res.length-1].Hits;
|
||||
const range = highest - lowest;
|
||||
@@ -263,6 +261,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{
|
||||
|
||||
@@ -292,7 +291,7 @@ export class SearchPage implements OnInit {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
else if ( this.type == "AccoesPresidenciais & ArquivoDespachoElect"){
|
||||
else if ( this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
@@ -336,7 +335,12 @@ export class SearchPage implements OnInit {
|
||||
this.loadWordCloud();
|
||||
},error => {
|
||||
this.searchResult = "Registo não encontrado"
|
||||
console.log(error)
|
||||
|
||||
counter++;
|
||||
console.log('application 8 failed', error)
|
||||
if(counter ==2) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
});
|
||||
|
||||
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
@@ -369,8 +373,14 @@ export class SearchPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}
|
||||
},error => {
|
||||
counter++;
|
||||
|
||||
if(counter ==2) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
this.searchResult = "Registo não encontrado"
|
||||
console.log(error)
|
||||
|
||||
console.log('application 361 failed', error);
|
||||
});
|
||||
|
||||
} else {
|
||||
@@ -378,7 +388,6 @@ export class SearchPage implements OnInit {
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
e['Active'] = false;
|
||||
this.searchCategories.push(e)
|
||||
@@ -408,8 +417,13 @@ export class SearchPage implements OnInit {
|
||||
|
||||
this.loadWordCloud();
|
||||
},error => {
|
||||
console.log('application 8 failed', error)
|
||||
this.searchResult = "Registo não encontrado"
|
||||
console.log(error)
|
||||
counter++;
|
||||
|
||||
if(counter ==2){
|
||||
this.showLoader = false;
|
||||
}
|
||||
});
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
@@ -444,7 +458,12 @@ export class SearchPage implements OnInit {
|
||||
this.loadWordCloud();
|
||||
},error => {
|
||||
this.searchResult = "Registo não encontrado"
|
||||
console.log(error)
|
||||
counter++;
|
||||
|
||||
console.log('application 361 faield', error);
|
||||
if(counter ==2){
|
||||
this.showLoader = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user