mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
1 line
18 KiB
JSON
1 line
18 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.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./diplomas.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { ActivatedRoute, NavigationStart, Router } from '@angular/router';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { BackgroundService } from 'src/app/services/background.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { PermissionService } from 'src/app/services/permission.service';\nimport { DeplomasStore } from 'src/app/store/deplomas.service';\nimport { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';\nimport { TaskService } from 'src/app/services/task.service';\nimport { RouteService } from 'src/app/services/route.service';\nlet DiplomasPage = class DiplomasPage {\n constructor(processes, router, activatedRoute, backgroundservice, ThemeService, p, TaskService, RouteService) {\n this.processes = processes;\n this.router = router;\n this.activatedRoute = activatedRoute;\n this.backgroundservice = backgroundservice;\n this.ThemeService = ThemeService;\n this.p = p;\n this.TaskService = TaskService;\n this.RouteService = RouteService;\n this.headerName = \"Diplomas\";\n this.skeletonLoader = true;\n this.deplomasStore = DeplomasStore;\n this.customTaskPipe = new CustomTaskPipe();\n this.filterName = 'Todos';\n this.showSearch = false;\n this.searchSubject = '';\n this.listDiplomasPorValidar = [];\n this.listDiplomasAssinadosPR = [];\n this.hideSearchBtn = false;\n this.ordinance = 'old';\n //Inicializar segment\n }\n\n ngOnInit() {\n //this.segment = 'validar';\n this.activatedRoute.queryParams.subscribe(params => {\n if (params['segment'] == 'validar') {\n this.segment = 'validar';\n } else if (params['segment'] == 'assinados') {\n this.segment = 'assinados';\n } else if (params['diplomas'] == 'assinados') {\n this.segment = 'assinados';\n } else if (params['diplomas'] == 'validar') {\n this.segment = 'validar';\n }\n });\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 NavigationStart && event.url.startsWith(pathname)) {\n if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {\n this.LoadList();\n } else {\n this.LoadList();\n }\n }\n });\n this.backgroundservice.registerBackService('Online', () => {\n this.LoadList();\n });\n this.dynamicSearch();\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 basicSearch() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n _this2.dynamicSearch();\n })();\n }\n reorderList(orderBy) {\n this.ordinance = orderBy;\n this.dynamicSearch();\n }\n changeFilterName(filterName) {\n this.filterName = filterName;\n }\n dynamicSearch() {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n if (_this3.showSearch && _this3.searchSubject) {\n const listDiplomasAssinadosPR = _this3.deplomasStore.diplomasAssinadoList.filter(task => {\n let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject;\n subject = subject.toLowerCase();\n return subject.includes(_this3.searchSubject.toLowerCase());\n });\n _this3.listDiplomasAssinadosPR = _this3.TaskService.reorderList(_this3.ordinance, listDiplomasAssinadosPR);\n const listDiplomas
|