Files
doneit-web/.angular/cache/14.2.12/babel-webpack/19d6bdcdadd03ac53f72aa581032b926.json
T

1 line
20 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"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 \"./event-list.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./event-list.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { ModalController } from '@ionic/angular';\nimport { ApproveEventModalPage } from './approve-event-modal/approve-event-modal.page';\nimport { NavigationStart, Router } from '@angular/router';\nimport { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';\nimport { BackgroundService } from '../../../services/background.service';\nimport { SortService } from 'src/app/services/functions/sort.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { RouteService } from 'src/app/services/route.service';\nimport { EventsService } from 'src/app/services/events.service';\nimport { SessionStore } from 'src/app/store/session.service';\nimport { environment } from 'src/environments/environment';\nlet EventListPage = class EventListPage {\n constructor(processes, modalController, router, sortService, backgroundservice, ThemeService, RouteService, eventService) {\n this.processes = processes;\n this.modalController = modalController;\n this.router = router;\n this.sortService = sortService;\n this.backgroundservice = backgroundservice;\n this.ThemeService = ThemeService;\n this.RouteService = RouteService;\n this.eventService = eventService;\n this.eventsPRList = [];\n this.eventsMDGPRList = [];\n this.skeletonLoader = true;\n this.eventoaprovacaostore = EventoAprovacaoStore;\n this.eventsList = [];\n this.environment = environment;\n this.filterName = 'Todos';\n this.showFilter = false;\n this.showSearch = false;\n this.searchSubject = '';\n this.list = [];\n this.ordinance = 'old';\n }\n ngOnInit() {\n if (window.location.pathname.includes('gabinete-digital')) {\n this.showFilter = true;\n }\n if (!this.segment) {\n if (this.eventService.calendarNamesAry.includes('Meu calendario')) {\n this.segment = 'Meu calendario';\n } else {\n this.segment = this.eventService.calendarNamesAry[0].OwnerUserId;\n }\n // select pr by default\n // const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n // if(pr) {\n // this.segment = pr.OwnerUserId\n // }\n }\n\n const location = window.location;\n const pathname = location.pathname + location.search;\n this.LoadToApproveEvents();\n this.router.events.forEach(event => {\n if (event instanceof NavigationStart && event.url.startsWith(pathname)) {\n if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {\n this.refreshing();\n } else {\n this.LoadToApproveEvents();\n }\n }\n });\n this.backgroundservice.registerBackService('Online', () => {\n this.LoadToApproveEvents();\n });\n window.onresize = event => {\n // if not mobile remove all component\n if (window.innerWidth < 701) {\n this.modalController.dismiss();\n }\n };\n }\n ngAfterViewInit() {}\n reorderList(orderBy) {\n this.ordinance = orderBy;\n // this.dynamicSearch();\n }\n\n segmentChanged(ev) {\n this.LoadToApproveEvents();\n }\n LoadToApproveEvents() {\n var _this = this;\n return _asyncToGenerator(function* () {\n _this.showLoader = true;\n _this.skeletonLoader = true;\n const segment = _this.segment;\n if (_this.segment == 'Meu calendario') {\n // color\n if (SessionStore.user.Profile == 'PR') {\n _this.color = 'pr';\n } else {\n _this.color = 'mdgpr';\n }\n let genericEvents = yield _this