mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user