mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve search page
This commit is contained in:
@@ -24,15 +24,10 @@
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
|
||||
<ion-label>Acções</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="search">
|
||||
<ion-icon name="search"></ion-icon>
|
||||
<ion-label>Pesquisa</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="chat">
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-chat-inactive.svg"></ion-icon>
|
||||
<ion-label>Chat</ion-label>
|
||||
</ion-tab-button>
|
||||
-->
|
||||
</ion-tab-bar>
|
||||
|
||||
</ion-tabs>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<!-- SLIDE -->
|
||||
<ion-slides class="slide" pager="false" [options]="slideOpts">
|
||||
<ion-slide *ngFor="let category of searchCategories; index as i;">
|
||||
<div class="button" (click)="filterDocList(category.Name)" [ngClass]="{'active-category': category.Active}">
|
||||
<div class="button" (click)="filterDocList(category.Name)" (click)="activeCategoty(i)"[ngClass]="{'active-category': category.Active}">
|
||||
<p>{{ category.Name }}</p>
|
||||
<ion-label class="label">{{ category.Qtd }}</ion-label>
|
||||
</div>
|
||||
@@ -109,8 +109,8 @@
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<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>
|
||||
<ion-icon *ngIf="ordinance == 'old'" (click)="reorderList('recent')" src="assets/images/icons-arrow-arrow-up.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ordinance == 'recent'" (click)="reorderList('old')" src="assets/images/icons-arrow-arrow-down-25.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -83,7 +83,7 @@ ion-slide{
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.button:hover{
|
||||
.active-category{
|
||||
background-color: #42b9fe;
|
||||
color: white;
|
||||
p{
|
||||
|
||||
@@ -72,9 +72,9 @@ export class SearchPage implements OnInit {
|
||||
this.ordinance = orderBy;
|
||||
|
||||
if(this.ordinance == 'recent'){
|
||||
this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments);
|
||||
} else {
|
||||
this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments).reverse();
|
||||
} else {
|
||||
this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,8 @@ export class SearchPage implements OnInit {
|
||||
|
||||
this.searchDocuments = this.sortArrayISODate(res.Documents);
|
||||
|
||||
this.reorderList(this.ordinance);
|
||||
|
||||
// hide show document
|
||||
if(this.searchDocuments.length >= 1){
|
||||
this.showDocuments = true;
|
||||
@@ -130,6 +132,15 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
activeCategoty(i){
|
||||
|
||||
this.searchCategories.forEach((e) => {
|
||||
e['Active'] = false;
|
||||
})
|
||||
|
||||
this.searchCategories[i]['Active'] = true;
|
||||
}
|
||||
|
||||
clearInputRemetente(){
|
||||
this.searchSender = "";
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
apiURL: 'https://equilibrium.dyndns.info/GabineteDigital.Services/V3/api/',
|
||||
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V3/api/',
|
||||
apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/',
|
||||
domain: 'gabinetedigital.local',
|
||||
defaultuser: 'paulo.pinto',
|
||||
|
||||
Reference in New Issue
Block a user