mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
12 KiB
JSON
1 line
12 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-assinar.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./diplomas-assinar.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 { 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 DiplomasAssinarPage = class DiplomasAssinarPage {\n constructor(processes, router, ThemeService, TaskService, RouteService) {\n this.processes = processes;\n this.router = router;\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 = 'recent';\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.TaskService.despachoStore.list.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.TaskService.AllProcess;\n _this.list = _this.TaskService.reorderList(_this.ordinance, list);\n }\n })();\n }\n goToDiploma(serialNumber) {\n this.router.navigate(['/home/gabinete-digital/diplomas-assinar', 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 let diplomas = yield _this3.processes.GetTasksList(\"Despacho do Presidente da República\", false).toPromise();\n _this3.TaskService.loadDiplomas();\n } catch (error) {}\n _this3.skeletonLoader = false;\n _this3.showLoader = false;\n })();\n }\n goBack() {\n // this.router.navigate(['/home/gabinete-digital']);\n // window.history.back()\n this.RouteService.goBack();\n }\n};\nDiplomasAssinarPage.ctorParameters = () => [{\n type: ProcessesService\n}, {\n type: Router\n}, {\n type: ThemeService\n}, {\n type: TaskService\n}, {\n type: RouteService\n}];\nDiplomasAssinarPage.propDecorators = {\n profile: [{\n type: Input\n }],\n segment: [{\n type: Input\n }]\n};\nDiplomasAssinarPage
|