mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
1 line
16 KiB
JSON
1 line
16 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 \"./all-processes.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./all-processes.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { TaskService } from 'src/app/services/task.service';\nlet AllProcessesPage = class AllProcessesPage {\n constructor(router, ThemeService, TaskService) {\n this.router = router;\n this.ThemeService = ThemeService;\n this.TaskService = TaskService;\n this.skeletonLoader = false;\n this.hideSearchBtn = false;\n this.showSearch = false;\n this.searchSubject = '';\n this.filterName = 'Todos';\n /* miniSearch = new MiniSearch({\r\n fields: ['Folio', 'Senders'], // fields to index for full-text search\r\n idField: 'DocId'\r\n }) */\n this.AllProcess = [];\n this.ordinance = 'old';\n }\n ngOnInit() {\n // this.updateAllProcess()\n this.checkFilter();\n }\n ngAfterViewInit() {\n this.listSubscription = this.TaskService.registerCallback({\n id: import.meta.url,\n funx: () => {\n this.dynamicSearch();\n }\n });\n this.dynamicSearch();\n this.routerSubscription = this.router.events.subscribe(event => {\n if (event instanceof NavigationEnd && event.url.includes('/home/gabinete-digital')) {\n // this.refreshing();\n this.checkFilter();\n }\n });\n }\n ngOnDestroy() {\n this.listSubscription.delete();\n this.routerSubscription?.unsubscribe();\n }\n openSearch() {\n // this.dynamicSearch()\n }\n closeSearch() {\n var _this = this;\n return _asyncToGenerator(function* () {\n _this.searchSubject = '';\n // this.dynamicSearch()\n })();\n }\n\n basicSearch() {\n return _asyncToGenerator(function* () {})();\n } // this.dynamicSearch()\n\n reorderList(orderBy) {\n this.ordinance = orderBy;\n this.dynamicSearch();\n }\n dynamicSearch() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n if (_this2.showSearch && _this2.searchSubject) {\n const AllProcess = _this2.TaskService.AllProcess.filter(task => {\n let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject;\n subject = subject.toLowerCase();\n return subject.includes(_this2.searchSubject.toLowerCase());\n });\n _this2.AllProcess = _this2.TaskService.reorderList(_this2.ordinance, AllProcess);\n } else {\n const AllProcess = _this2.TaskService.AllProcess;\n _this2.AllProcess = _this2.TaskService.reorderList(_this2.ordinance, AllProcess);\n }\n })();\n }\n checkFilter() {\n if (this.router.url.includes('ForToDay')) {\n this.filterName = 'Para hoje';\n } else if (this.router.url.includes('OverdueTasks')) {\n this.filterName = 'OverdueTasks';\n } else if (this.router.url.includes('New')) {\n this.filterName = 'Novos';\n } else if (this.router.url.includes('unread')) {\n this.filterName = 'Não lidos';\n }\n }\n goToProcess(serialNumber, workflowName, activityName) {\n if (workflowName == 'Despacho') {\n if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {\n this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']);\n }\n } else if (workflowName == 'Despacho do Presidente da República') {\n if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {\n this.router.navigate(['/home/gabinete-digital/despachos-pr', serialNumber, 'gabinete-digital']);\n } else if (activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma') {\n this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'g
|