mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
merge developer to feature/search
This commit is contained in:
@@ -86,9 +86,16 @@ export class ChatPage implements OnInit {
|
||||
getDirectMessages(){
|
||||
this.showLoader = true;
|
||||
|
||||
this.result = this.chatService.getAllDirectMessages().subscribe((res:any)=>{
|
||||
this.userDirectMessages = res.ims;
|
||||
console.log(res);
|
||||
/* this.result = */
|
||||
this.chatService.getAllDirectMessages().subscribe((res:any)=>{
|
||||
console.log(res.ims);
|
||||
|
||||
this.userDirectMessages = res.ims.sort((a,b)=>{
|
||||
var dateA = new Date(a.lastMessage._updatedAt).getTime();
|
||||
var dateB = new Date(b.lastMessage._updatedAt).getTime();
|
||||
return dateB - dateB;
|
||||
});
|
||||
console.log(this.userDirectMessages);
|
||||
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
@@ -104,6 +104,11 @@ export class EventsPage implements OnInit {
|
||||
|
||||
} */
|
||||
|
||||
this.storageService.get(AuthConnstants.USER).then(res=>{
|
||||
console.log(res);
|
||||
|
||||
});
|
||||
|
||||
this.showGreeting();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
|
||||
@@ -55,14 +55,14 @@ export class LoginPage implements OnInit {
|
||||
await alert.present();
|
||||
}
|
||||
|
||||
loginRocketChat(){
|
||||
/* loginRocketChat(){
|
||||
this.authService.loginChat(this.postData).subscribe((res: any) =>{
|
||||
this.storageService.store(AuthConnstants.AUTH, res.data);
|
||||
console.log('Login to Rocket chat OK');
|
||||
},(error:any) =>{
|
||||
console.log('Network error');
|
||||
});
|
||||
}
|
||||
} */
|
||||
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ export class LoginPage implements OnInit {
|
||||
BasicAuthKey: ""
|
||||
}
|
||||
if (await this.authService.login(this.userattempt)){
|
||||
this.loginRocketChat();
|
||||
this.router.navigate(['/home/events']);this.presentAlert('1');
|
||||
/* this.loginRocketChat(); */
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user