Improve search page

This commit is contained in:
Peter Maquiran
2021-01-20 13:52:25 +01:00
parent ef8b2a01df
commit 36e34b21d9
7 changed files with 22 additions and 15 deletions
+3 -3
View File
@@ -3440,9 +3440,9 @@
"dev": true
},
"angular-tag-cloud-module": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/angular-tag-cloud-module/-/angular-tag-cloud-module-5.2.0.tgz",
"integrity": "sha512-F89pvDWmpy4VHMhw1CN5kSwiGjGhBIXS4ektJZraJTBwjxCf9GsTNiw0mjcMWpuqEIxccxcaN3kIx+Z+wvoV3Q==",
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/angular-tag-cloud-module/-/angular-tag-cloud-module-5.2.2.tgz",
"integrity": "sha512-lb/GeK5n0CDH3rjRC7PHBMgRcafc102sovfjyU3W05m9B8JELTDqk6jVEFqiCg+NbLy+zDm7g68Ij7k7LzxmAA==",
"requires": {
"tslib": "^2.0.0"
},
+1
View File
@@ -38,6 +38,7 @@
"@ionic/pwa-elements": "^3.0.1",
"@ionic/storage": "^2.3.1",
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
"angular-tag-cloud-module": "^5.2.2",
"cordova-ios": "6.1.0",
"cordova-plugin-camera": "^5.0.1",
"cordova-plugin-file": "^6.0.2",
-5
View File
@@ -23,16 +23,11 @@
<ion-tab-button tab="publications">
<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>
+3 -3
View File
@@ -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>
+1 -1
View File
@@ -83,7 +83,7 @@ ion-slide{
border-radius: 15px;
}
.button:hover{
.active-category{
background-color: #42b9fe;
color: white;
p{
+13 -2
View File
@@ -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 = "";
}
+1 -1
View File
@@ -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',