This commit is contained in:
Peter Maquiran
2022-10-06 15:45:38 +01:00
parent 42005b731b
commit 2ec28c95de
4 changed files with 31 additions and 31 deletions
+25 -10
View File
@@ -12,6 +12,7 @@ import { ThemeService } from '../../services/theme.service';
import { RouteService } from 'src/app/services/route.service';
import { PermissionList } from 'src/app/models/permission/permissionList';
import { PermissionService } from 'src/app/services/permission.service';
import { models } from 'beast-orm';
@Component({
selector: 'app-header',
@@ -51,6 +52,7 @@ export class HeaderPage implements OnInit {
router.events.subscribe((val) => {
this.showSearch = false;
this.isProfileOpen = false
this.canOpenSearch = true;
});
@@ -108,6 +110,7 @@ export class HeaderPage implements OnInit {
}
}
canOpenSearch = true
async openSearch() {
let classs, showSearchInput, type;
@@ -130,16 +133,28 @@ export class HeaderPage implements OnInit {
type = "AccoesPresidenciais"
}
const modal = await this.modalController.create({
component: SearchPage,
cssClass: classs,
componentProps: {
type: type,
showSearchInput: showSearchInput,
select: false
}
});
return await modal.present();
if(this.canOpenSearch) {
this.canOpenSearch = false
const modal = await this.modalController.create({
component: SearchPage,
cssClass: classs,
componentProps: {
type: type,
showSearchInput: showSearchInput,
select: false
}
});
await modal.present();
modal.onDidDismiss().then(() => {
this.canOpenSearch = true;
});
}
}
changeRoute(path) {