Files
doneit-web/.angular/cache/14.2.12/babel-webpack/4ccb392e12ee231da2de57144913b7a4.json
T

1 line
15 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"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, Input } from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\nimport { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';\nimport { DeplomasStore } from 'src/app/store/deplomas.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { PermissionService } from 'src/app/services/permission.service';\nimport { TaskService } from 'src/app/services/task.service';\nlet DiplomasPage = class DiplomasPage {\n constructor(router, ThemeService, p, TaskService) {\n this.router = router;\n this.ThemeService = ThemeService;\n this.p = p;\n this.TaskService = TaskService;\n this.diplomasList = [];\n this.diplomasAssinadoList = [];\n this.skeletonLoader = false;\n this.filterName = 'Todos';\n this.deplomasStore = DeplomasStore;\n this.customTaskPipe = new CustomTaskPipe();\n this.showSearch = false;\n this.searchSubject = '';\n this.listDiplomasPorValidar = [];\n this.listDiplomasAssinadosPR = [];\n this.hideSearchBtn = false;\n this.ordinance = 'old';\n }\n ngOnInit() {\n this.LoadList();\n this.listSubscription = this.deplomasStore.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?diplomas=validar'.startsWith(event.url) || '/home/gabinete-digital?diplomas=validar'.startsWith(event.url))) {\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 window['gabinete-aside-refresh'] = () => {\n this.LoadList();\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 dynamicSearch() {\n var _this = this;\n return _asyncToGenerator(function* () {\n if (_this.showSearch && _this.searchSubject) {\n const listDiplomasAssinadosPR = _this.deplomasStore.diplomasAssinadoList.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.listDiplomasAssinadosPR = _this.TaskService.reorderList(_this.ordinance, listDiplomasAssinadosPR);\n const listDiplomasPorValidar = _this.deplomasStore.diplomasReviewList.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.listDiplomasPorValidar = _this.TaskService.reorderList(_this.ordinance, listDiplomasPorValidar);\n } else {\n const listDiplomasAssinadosPR = _this.deplomasStore.diplomasAssinadoList;\n const listDiplomasPorValidar = _this.deplomasStore.diplomasReviewList;\n _this.listDiplomasPorValidar = _this.TaskService.reorderList(_this.ordinance, listDiplomasPorValidar);\n _this.listDiplomasAssinadosPR = _this.TaskService.reorderList(_this.ordinance, listDiplomasAssinadosPR);\n }\n })();\n }\n openSearch() {\n this.dynamicSearch();\n }\n closeSearch() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n _this2.searchSubject = '';\n _this2.dynamicSearch();\n })();\n