mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Improve search page
This commit is contained in:
@@ -7,6 +7,9 @@ import { SearchDocument } from "src/app/models/search-document";
|
||||
import { formatDate } from '@angular/common';
|
||||
import { CloudData, CloudOptions } from 'angular-tag-cloud-module';
|
||||
import { SenderPage } from 'src/app/pages/search/sender/sender.page';
|
||||
import { OrganicEntityPage } from 'src/app/pages/search/organic-entity/organic-entity.page';
|
||||
|
||||
import { NgModel } from '@angular/forms';
|
||||
@Component({
|
||||
selector: 'app-search',
|
||||
templateUrl: './search.page.html',
|
||||
@@ -20,6 +23,7 @@ export class SearchPage implements OnInit {
|
||||
private searchSender: string;
|
||||
private searchOrganicEntiry: string;
|
||||
private searchDocTypeId: string;
|
||||
private ordinance: string;
|
||||
|
||||
searchCategories: SearchCategory[];
|
||||
showSearchDocuments: SearchDocument[];
|
||||
@@ -52,7 +56,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
constructor(private modalController: ModalController,
|
||||
private search: SearchService) {
|
||||
|
||||
this.ordinance = "recent";
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -62,6 +66,10 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
changeOrder(order: string){
|
||||
this.ordinance = order;
|
||||
}
|
||||
|
||||
sortArrayISODate(myArray: any){
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.Data < b.Data) ? -1 : ((a.Data > b.Data) ? 1 : 0);
|
||||
@@ -129,12 +137,6 @@ export class SearchPage implements OnInit {
|
||||
*/
|
||||
showHideAdvanceSearch(show:boolean) {
|
||||
this.showAdvanceSearch = show;
|
||||
/* Clear inputs */
|
||||
this.searchDocumentDate = "";
|
||||
this.searchSender = "";
|
||||
this.searchOrganicEntiry = "";
|
||||
this.searchDocTypeId = "";
|
||||
this.searchSubject = "";
|
||||
}
|
||||
|
||||
async openAdvanceSearchSelection() {
|
||||
@@ -146,7 +148,30 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
return await modal.present();
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
this.searchSender = data.data;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
async openOrganicEntitySelection(){
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: OrganicEntityPage,
|
||||
cssClass: 'organicEnity',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
this.searchOrganicEntiry = data.data;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user