mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Add response effect in search page
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<!-- 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="d-flex search-input-container ion-justify-content-between" >
|
||||
<div class="icon" (click)="basicSearch()">
|
||||
<ion-icon class="icon-z" slot="end" name="search"></ion-icon>
|
||||
</div>
|
||||
@@ -18,7 +18,7 @@
|
||||
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open" (click)="showHideAdvanceSearch(true)">
|
||||
<ion-icon src="assets/images/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
|
||||
</div>
|
||||
<div *ngIf="showAdvanceSearch" class="icon-z icon-most-searched-word-open" (click)="advanceSearch()" >
|
||||
<div *ngIf="showAdvanceSearch" class="icon-z icon-most-searched-word-open" (click)="showHideAdvanceSearch(false)" >
|
||||
<ion-icon src="assets/images/advance-search-show-modal.svg" class="icon" slot="end"></ion-icon>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
padding: 5px 18px;
|
||||
padding-bottom: 2px;
|
||||
padding-top: 25px;
|
||||
ion-form{
|
||||
width: 100%;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.search-input-container{
|
||||
max-width: 309px;
|
||||
background-color: white;
|
||||
border-radius: 27.5px;
|
||||
border: solid 1px #ebebeb;
|
||||
|
||||
@@ -17,7 +17,6 @@ export class SearchPage implements OnInit {
|
||||
|
||||
// https params
|
||||
private searchSubject: string;
|
||||
private advanceSearchSubject: string;
|
||||
private searchDocumentDate: string;
|
||||
private searchSender: string;
|
||||
private searchOrganicEntiry: string;
|
||||
@@ -28,8 +27,6 @@ export class SearchPage implements OnInit {
|
||||
showDocuments = false;
|
||||
showAdvanceSearch = false;
|
||||
|
||||
|
||||
|
||||
options: CloudOptions = {
|
||||
// if width is between 0 and 1 it will be set to the width of the upper element multiplied by the value
|
||||
width: 1000,
|
||||
@@ -63,31 +60,13 @@ export class SearchPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description Basic search
|
||||
*/
|
||||
basicSearch(){
|
||||
// search in API
|
||||
|
||||
this.search.basicSearch(this.searchSubject, "", "", "", "").subscribe(res=>{
|
||||
|
||||
// bind respose
|
||||
this.searchCategories = res.Categories;
|
||||
this.searchDocuments = res.Documents;
|
||||
|
||||
// hide show document
|
||||
if(this.searchDocuments.length >= 1){
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
advanceSearch(){
|
||||
|
||||
this.search.basicSearch(this.advanceSearchSubject, this.searchDocumentDate, this.searchSender
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId).subscribe(res=>{
|
||||
|
||||
// bind respose
|
||||
@@ -133,7 +112,7 @@ export class SearchPage implements OnInit {
|
||||
this.searchSender = "";
|
||||
this.searchOrganicEntiry = "";
|
||||
this.searchDocTypeId = "";
|
||||
this.advanceSearchSubject = "";
|
||||
this.searchSubject = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user