merge developer to feature/search

This commit is contained in:
Peter Maquiran
2021-01-20 10:41:38 +01:00
4444 changed files with 1390485 additions and 29 deletions
+9 -6
View File
@@ -75,8 +75,8 @@
<div class="d-flex ion-justify-content-center ion-text-center">
<!-- SLIDE -->
<ion-slides class="slide" pager="false" [options]="slideOpts">
<ion-slide *ngFor="let category of searchCategories">
<div class="button" (click)="filterDocList(category.Name)">
<ion-slide *ngFor="let category of searchCategories; index as i;">
<div class="button" (click)="filterDocList(category.Name)" [ngClass]="{'active-category': category.Active}">
<p>{{ category.Name }}</p>
<ion-label class="label">{{ category.Qtd }}</ion-label>
</div>
@@ -88,7 +88,6 @@
<ion-icon src="assets/images/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
</button>
</div>
</div>
<div class="d-flex ion-wrap word-searh-result-container">
@@ -103,11 +102,15 @@
<div class="header">
<div class="d-flex ion-justify-content-between ion-align-items-center">
<div class="d-flex sort-by ion-justify-content-center">
<p><span class="order">Order por:</span><span class="order-labal">Mais Recente</span></p>
<p>
<span class="order">Order por:</span>
<span *ngIf="ordinance == 'recent'" class="order-labal">Mais Recente</span>
<span *ngIf="ordinance == 'old'" class="order-labal">Mais Antigo</span>
</p>
</div>
<div>
<ion-icon *ngIf="ordinance == 'recent'" (click)="changeOrder('old')" src="assets/images/icons-arrow-arrow-up.svg"></ion-icon>
<ion-icon *ngIf="ordinance == 'old'" (click)="changeOrder('recent')" src="assets/images/icons-arrow-arrow-down-25.svg"></ion-icon>
<ion-icon *ngIf="ordinance == 'recent'" (click)="reorderList('old')" src="assets/images/icons-arrow-arrow-up.svg"></ion-icon>
<ion-icon *ngIf="ordinance == 'old'" (click)="reorderList('recent')" src="assets/images/icons-arrow-arrow-down-25.svg"></ion-icon>
</div>
</div>
</div>
+15 -5
View File
@@ -61,13 +61,21 @@ export class SearchPage implements OnInit {
ngOnInit() {
}
close(){
this.modalController.dismiss();
}
changeOrder(order: string){
this.ordinance = order;
reorderList(orderBy: string){
this.ordinance = orderBy;
if(this.ordinance == 'recent'){
this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments);
} else {
this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments).reverse();
}
}
sortArrayISODate(myArray: any){
@@ -82,15 +90,17 @@ export class SearchPage implements OnInit {
*/
basicSearch(){
console.log(this.searchDocumentDate);
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId).subscribe(res=>{
res.Categories.forEach( e => {
e['Active'] = false;
});
// bind respose
this.searchCategories = res.Categories;
this.searchDocuments = this.sortArrayISODate(res.Documents);
this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments);
// hide show document
if(this.searchDocuments.length >= 1){