mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Improve responsiveness and improve search
This commit is contained in:
@@ -141,7 +141,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<ul>
|
||||
<li *ngFor="let searchDocument of showSearchDocuments" (click)="viewDetail(searchDocument.Id); selectItem(searchDocument)" class="d-flex">
|
||||
<li *ngFor="let searchDocument of showSearchDocuments" (click)="viewDetail( searchDocument); selectItem(searchDocument)" class="d-flex">
|
||||
<div class="icon">
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' "
|
||||
src="assets/images/icons-search-document.svg"></ion-icon>
|
||||
|
||||
@@ -67,14 +67,13 @@ export class SearchPage implements OnInit {
|
||||
this.type = this.navParams.get('type');
|
||||
|
||||
this.type = this.navParams.get('type');
|
||||
this.select = this.navParams.get('select');
|
||||
|
||||
this.showSearchInput = this.navParams.get('showSearchInput');
|
||||
|
||||
|
||||
if(this.type == null || this.type == undefined) {
|
||||
|
||||
this.select = false;
|
||||
|
||||
if(this.currentPath == '/home/agenda') {
|
||||
this.type = "Agenda"
|
||||
} else if (this.currentPath =='/home/gabinete-digital') {
|
||||
@@ -83,13 +82,10 @@ export class SearchPage implements OnInit {
|
||||
} else if (this.currentPath == '/home/publications') {
|
||||
this.type = "AccoesPresidenciais"
|
||||
} else {
|
||||
this.select = false
|
||||
console.log('search bug!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||
}
|
||||
} else {
|
||||
this.select = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +95,8 @@ export class SearchPage implements OnInit {
|
||||
selected: item
|
||||
});
|
||||
}
|
||||
|
||||
return this.select;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -476,31 +474,36 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
async viewDetail(id:any) {
|
||||
console.log(id);
|
||||
async viewDetail(searchDocument: SearchDocument) {
|
||||
|
||||
const ApplicationType = searchDocument.ApplicationType.toString()
|
||||
const Id = searchDocument.Id
|
||||
|
||||
if(!this.selectItem){
|
||||
if(window.location.pathname == '/home/agenda'){
|
||||
if(this.select == false){
|
||||
if(this.type == "Agenda") {
|
||||
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: ViewEventPage,
|
||||
componentProps:{
|
||||
eventId: id
|
||||
eventId: Id
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{});
|
||||
|
||||
} else if(window.location.pathname == '/home/publications'){
|
||||
} else if(this.type == "AccoesPresidenciais"){
|
||||
|
||||
this.viewPublicationDetail(id);
|
||||
this.viewPublicationDetail(Id);
|
||||
}
|
||||
else if(window.location.pathname == '/home/gabinete-digital'){
|
||||
else if(this.type == "AccoesPresidenciais & ArquivoDespachoElect"){
|
||||
console.log('OPEN DOC');
|
||||
this.viewDocumentDetail(id,'');
|
||||
this.viewDocumentDetail(Id, ApplicationType);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!', this.select)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user