mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
1 line
14 KiB
JSON
1 line
14 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 \"./diplomas-gerar.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./diplomas-gerar.page.scss?ngResource\";\nimport { Component, Input } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';\nimport { SortService } from 'src/app/services/functions/sort.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { DeplomasStore } from 'src/app/store/deplomas.service';\nimport { TaskService } from 'src/app/services/task.service';\nimport { RouteService } from 'src/app/services/route.service';\nlet DiplomasGerarPage = class DiplomasGerarPage {\n constructor(processes, router, sortService, ThemeService, TaskService, RouteService) {\n this.processes = processes;\n this.router = router;\n this.sortService = sortService;\n this.ThemeService = ThemeService;\n this.TaskService = TaskService;\n this.RouteService = RouteService;\n //profile:string;\n this.diplomasList = [];\n this.customTaskPipe = new CustomTaskPipe();\n this.skeletonLoader = true;\n this.deplomasStore = DeplomasStore;\n this.filterName = 'Todos';\n this.showSearch = false;\n this.searchSubject = '';\n this.list = [];\n this.ordinance = 'old';\n }\n ngOnInit() {\n const location = window.location;\n const pathname = location.pathname + location.search;\n this.LoadList();\n this.router.events.forEach(event => {\n if (event instanceof NavigationEnd && 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.LoadList();\n }\n }\n });\n this.dynamicSearch();\n }\n reorderList(orderBy) {\n this.ordinance = orderBy;\n this.dynamicSearch();\n }\n dynamicSearch() {\n var _this = this;\n return _asyncToGenerator(function* () {\n if (_this.showSearch && _this.searchSubject) {\n const list = _this.deplomasStore.DiplomaGerarList.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.deplomasStore.DiplomaGerarList;\n _this.list = _this.TaskService.reorderList(_this.ordinance, list);\n }\n })();\n }\n goToDiploma(serialNumber) {\n this.router.navigate(['/home/gabinete-digital/diplomas-gerar', serialNumber, 'gabinete-digital']);\n }\n refreshing() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n setTimeout(() => {\n _this2.LoadList();\n }, 1000);\n })();\n }\n doRefresh(event) {\n setTimeout(() => {\n this.LoadList();\n }, 1000);\n }\n LoadList() {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n _this3.skeletonLoader = true;\n try {\n yield _this3.TaskService.loadDiplomas();\n let diplomas = yield _this3.processes.GetTasksList(\"Despacho do Presidente da República\", false).toPromise();\n _this3.diplomasList = [];\n let gerarDiploma = diplomas.reverse().filter(data => data.activityInstanceName == \"Gerar Diploma\" || data.activityInstanceName == \"Retificar Diploma\");\n gerarDiploma.forEach(element => {\n let task = _this3.customTaskPipe.transform(element);\n _this3.diplomasList.push(task);\n });\n _this3.diplomasList = _this3.sortService.sortDate(_this3.diplomasList, 'CreateDate');\n
|