mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
1 line
21 KiB
JSON
1 line
21 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 \"./events-to-approve.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./events-to-approve.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { ModalController } from '@ionic/angular';\nimport { NavigationStart, Router } from '@angular/router';\nimport { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';\nimport { SortService } from 'src/app/services/functions/sort.service';\nimport { Storage } from '@ionic/storage';\nimport { SessionStore } from 'src/app/store/session.service';\nimport { EventsService } from 'src/app/services/events.service';\nimport { environment } from 'src/environments/environment';\nimport { TaskService } from 'src/app/services/task.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nlet EventsToApprovePage = class EventsToApprovePage {\n constructor(processes, modalController, router, sortService, storage, eventService, TaskService, ThemeService) {\n this.processes = processes;\n this.modalController = modalController;\n this.router = router;\n this.sortService = sortService;\n this.storage = storage;\n this.eventService = eventService;\n this.TaskService = TaskService;\n this.ThemeService = ThemeService;\n this.eventsPRList = [];\n this.eventsMDGPRList = [];\n this.eventaprovacaostore = EventoAprovacaoStore;\n this.eventsList = [];\n this.eventoaprovacaostore = EventoAprovacaoStore;\n this.environment = environment;\n this.filterName = 'Todos';\n // \n this.showSearch = false;\n this.searchSubject = '';\n this.list = [];\n this.hideSearchBtn = false;\n this.ordinance = 'old';\n }\n ngOnInit() {\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 // 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 this.LoadToApproveEvents();\n this.listSubscription = this.eventoaprovacaostore.registerCallback({\n id: import.meta.url,\n funx: () => {\n this.dynamicSearch();\n }\n });\n this.routerSubscription = this.router.events.subscribe(event => {\n if (event instanceof NavigationStart && '/home/gabinete-digital?eventos=true'.startsWith(event.url)) {\n if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {\n this.LoadToApproveEvents();\n } else {\n this.LoadToApproveEvents();\n }\n }\n });\n window['gabinete-aside-refresh'] = () => {\n this.LoadToApproveEvents();\n };\n this.dynamicSearch();\n }\n ngOnDestroy() {\n this.listSubscription.delete();\n this.routerSubscription?.unsubscribe();\n }\n reorderList(orderBy) {\n this.ordinance = orderBy;\n // this.dynamicSearch();\n }\n\n dynamicSearch() {\n var _this = this;\n return _asyncToGenerator(function* () {\n if (_this.showSearch && _this.searchSubject) {\n const list = _this.eventoaprovacaostore.get(_this.segment).filter(task => {\n let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject;\n subject = subject.toLowerCase();\n return subject.includes(_this.searchSubject.toLowerCase());\n });\n _this.list = _this.TaskService.reorderList(_this.ordinance, list);\n } else {\n const list = _this.eventoaprovacaostore.get(_this.segment);\n _this.list = _this.TaskService.reorderList(_this.ordinance, list);\n
|