mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
1 line
22 KiB
JSON
1 line
22 KiB
JSON
|
|
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { __decorate } from \"tslib\";\nimport __NG_CLI_RESOURCE__0 from \"./header.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./header.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { AnimationController, ModalController, Platform } from '@ionic/angular';\nimport { SearchPage } from 'src/app/pages/search/search.page';\nimport { Router } from '@angular/router';\nimport { StorageService } from '../../services/storage.service';\nimport { SessionStore } from 'src/app/store/session.service';\nimport { environment } from 'src/environments/environment';\nimport { ThemeService } from '../../services/theme.service';\nimport { RouteService } from 'src/app/services/route.service';\nimport { PermissionList } from 'src/app/models/permission/permissionList';\nimport { PermissionService } from 'src/app/services/permission.service';\nimport { EventTrigger } from 'src/app/services/eventTrigger.service';\nimport { ActiveTabService } from 'src/app/services/active-tab.service';\nimport { NotificationsService } from 'src/app/services/notifications.service';\nimport { TinymcePage } from 'src/app/tinymce/tinymce.page';\nlet HeaderPage = class HeaderPage {\n constructor(router, modalController, animationController, storageservice, platform, ThemeService, RouteService, p, eventTriger, ActiveTabService, notificationService) {\n this.router = router;\n this.modalController = modalController;\n this.animationController = animationController;\n this.storageservice = storageservice;\n this.platform = platform;\n this.ThemeService = ThemeService;\n this.RouteService = RouteService;\n this.p = p;\n this.eventTriger = eventTriger;\n this.ActiveTabService = ActiveTabService;\n this.notificationService = notificationService;\n this.searchSubject = '';\n this.showSearch = false;\n this.hideSearchBtn = false;\n this.notificationdata = [];\n this.DataArray = [];\n this.notificationLength = 0;\n this.SessionStore = SessionStore;\n this.production = environment.production;\n this.environment = environment;\n this.canOpenSearch = false;\n this.showProfileModal = false;\n this.permissionList = new PermissionList();\n this.notificationCount = 0;\n this.loggeduser = SessionStore.user;\n router.events.subscribe(val => {\n this.hideSearch();\n this.showSearch = false;\n this.canOpenSearch = true;\n this.showProfileModal = false;\n });\n this.eventTriger.getObservable().subscribe(event => {\n if (event.notification == \"recive\") {\n console.log('header', event.notification);\n this.notificationLength++;\n } else if (event.notification == \"deleted\") {\n console.log('header', event.notification);\n this.notificationLength--;\n }\n });\n /* this.notificationService.notificationReceived.subscribe(() => {\r\n console.log('header', 'event.notification')\r\n this.notificationLengthData()\r\n }); */\n }\n\n ngOnInit() {\n var _this = this;\n return _asyncToGenerator(function* () {\n _this.hideSearch();\n _this.notificationLengthData();\n })();\n }\n notificationLengthData() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n yield _this2.storageservice.get(\"Notifications\").then(value => {\n /* var data = JSON.parse(value); */\n _this2.notificationLength = value.length;\n }).catch(error => {\n if (!error) {\n _this2.notificationLength = 0;\n } else {\n console.error('header storage get notification', error);\n }\n });\n })();\n }\n hideSearch() {\n if (this.router.url.startsWith('/home/events') || this.router.url.startsWith('/home/chat')) {\n this.hideSearchBtn = true;\n } else {\n this.hideSearchBtn = false;\n }\n }\n openSearch() {\n var _this3 =
|