Files
doneit-web/.angular/cache/14.2.12/babel-webpack/014dbb51022722a822acb0d9a5553fac.json
T

1 line
13 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 \"./despachos-pr.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./despachos-pr.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\nimport { DespachosprStore } from 'src/app/store/despachospr-store.service';\nimport { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';\nimport { SessionStore } from 'src/app/store/session.service';\nimport { environment } from 'src/environments/environment';\nimport { TaskService } from 'src/app/services/task.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nlet DespachosPrPage = class DespachosPrPage {\n constructor(router, TaskService, ThemeService) {\n this.router = router;\n this.TaskService = TaskService;\n this.ThemeService = ThemeService;\n this.customTaskPipe = new CustomTaskPipe();\n this.skeletonLoader = false;\n this.despachosprstore = DespachosprStore;\n this.environment = environment;\n this.filterName = 'Todos';\n // \n this.showSearch = false;\n this.searchSubject = '';\n this.list = [];\n this.hideSearchBtn = false;\n this.ordinance = 'old';\n this.loggeduser = SessionStore.user;\n }\n ngOnInit() {\n this.LoadList();\n this.dynamicSearch();\n this.listSubscription = this.despachosprstore.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 && event.url.startsWith('/home/gabinete-digital?despachospr=true')) {\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 window['gabinete-aside-refresh'] = () => {\n this.LoadList();\n };\n }\n ngOnDestroy() {\n this.listSubscription.delete();\n this.routerSubscription?.unsubscribe();\n }\n changeFilterName(filterName) {\n this.filterName = filterName;\n }\n LoadList() {\n var _this = this;\n return _asyncToGenerator(function* () {\n _this.skeletonLoader = true;\n yield _this.TaskService.loadDiplomas();\n _this.dynamicSearch();\n _this.skeletonLoader = false;\n })();\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 list = _this2.despachosprstore.list.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.list = _this2.TaskService.reorderList(_this2.ordinance, list);\n } else {\n const list = _this2.despachosprstore.list;\n _this2.list = _this2.TaskService.reorderList(_this2.ordinance, list);\n }\n })();\n }\n openSearch() {\n this.dynamicSearch();\n }\n closeSearch() {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n _this3.searchSubject = '';\n _this3.dynamicSearch();\n })();\n }\n basicSearch() {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n _this4.dynamicSearch();\n })();\n }\n refreshing() {\n setTimeout(() => {\n this.LoadList();\n }, 1000);\n }\n doRefresh(event) {\n if (event) {\n setTimeout(() => {\n try {\n event?.target?.complete();\n } catch (error) {}\n }, 2000);\n }\n setTimeout(() => {\n this.LoadList();\n try {\n event?.ta