mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Add search button event
This commit is contained in:
@@ -25,17 +25,6 @@ export class SearchPage implements OnInit {
|
||||
constructor(private modalController: ModalController,
|
||||
private search: SearchService) {
|
||||
|
||||
// search in API
|
||||
this.search.basicSearch(this.searchSubject, this.searchDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId).subscribe(res=>{
|
||||
|
||||
this.searchCategories = res.Categories;
|
||||
this.searchDocuments = res.Documents;
|
||||
|
||||
console.log(this.searchDocuments);
|
||||
console.log(this.searchCategories);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -44,6 +33,27 @@ export class SearchPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @description get respose from the server
|
||||
* @returns repn
|
||||
*/
|
||||
basicSearch(){
|
||||
// search in API
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId).subscribe(res=>{
|
||||
|
||||
// binde respose
|
||||
this.searchCategories = res.Categories;
|
||||
this.searchDocuments = res.Documents;
|
||||
|
||||
console.log(this.searchCategories);
|
||||
console.log(this.searchDocuments);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isoDate String Iso date
|
||||
* @returns date in formate MM/DD/YYYY
|
||||
|
||||
Reference in New Issue
Block a user