mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Add search button event
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
<!-- HEADER-->
|
||||
<ion-header class="ion-no-border header-main d-flex ion-justify-content-between">
|
||||
<ion-form>
|
||||
<div class="d-flex search-input-container">
|
||||
<div class="icon">
|
||||
<div class="d-flex search-input-container" >
|
||||
<div class="icon" (click)="basicSearch()">
|
||||
<ion-icon class="icon-z" slot="end" name="search"></ion-icon>
|
||||
</div>
|
||||
<div class="input-text d-flex ion-align-items-center">
|
||||
<ion-input class="search-input" type="search" placeholder="Pesquisar"></ion-input>
|
||||
<ion-input [(ngModel)]='searchSubject' class="search-input" type="search" placeholder="Pesquisar"></ion-input>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<ion-icon name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
align-items: center;
|
||||
}
|
||||
.icon-z{
|
||||
width: 15px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
.icon-z{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,7 +36,7 @@ export class SearchService {
|
||||
// set https params
|
||||
console.log(subject);
|
||||
|
||||
params = params.set("assunto", 'actividades');
|
||||
params = params.set("assunto", subject);
|
||||
params = params.set("data", date);
|
||||
params = params.set("remetente", sender);
|
||||
params = params.set("entidadeOrganica", organicEntity);
|
||||
|
||||
Reference in New Issue
Block a user