Files
doneit-web/.angular/cache/14.2.12/babel-webpack/352473d6fe4162c14464e4d4f3202e78.json
T

1 line
11 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.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./despachos.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\nimport { DespachoService } from 'src/app/Rules/despacho.service';\nimport { TaskService } from 'src/app/services/task.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nlet DespachosPage = class DespachosPage {\n constructor(router, despachoRule, TaskService, ThemeService) {\n this.router = router;\n this.despachoRule = despachoRule;\n this.TaskService = TaskService;\n this.ThemeService = ThemeService;\n this.skeletonLoader = false;\n this.filterName = 'Todos';\n this.showSearch = false;\n this.searchSubject = '';\n this.list = [];\n this.hideSearchBtn = false;\n this.ordinance = 'old';\n }\n ngOnInit() {\n this.LoadList();\n this.listSubscription = this.TaskService.despachoStore.registerCallback({\n id: import.meta.url,\n funx: () => {\n this.dynamicSearch();\n }\n });\n this.dynamicSearch();\n this.routerSubscription = this.router.events.subscribe(event => {\n if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?despachos=true')) {\n this.LoadList();\n }\n });\n window['gabinete-aside-refresh'] = () => {\n this.LoadList();\n };\n }\n ngOnDestroy() {\n console.log('destroy');\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 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.despachoStore.list;\n _this.list = _this.TaskService.reorderList(_this.ordinance, list);\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 }\n basicSearch() {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n _this3.dynamicSearch();\n })();\n }\n goToDespacho({\n SerialNumber\n }) {\n this.router.navigate(['/home/gabinete-digital/despachos', SerialNumber, 'gabinete-digital']);\n }\n LoadList() {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n _this4.skeletonLoader = true;\n yield _this4.despachoRule.getList({\n updateStore: true\n });\n _this4.dynamicSearch();\n _this4.skeletonLoader = false;\n })();\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 }, 1000);\n }\n refreshing() {\n setTimeout(() => {\n this.LoadList();\n }, 1000);\n }\n};\nDespachosPage.ctorParameters = () => [{\n type: Router\n}, {\n type: DespachoService\n}, {\n type: TaskService\n}, {\n type: ThemeService\n}];\nDespachosPage = __decorate([Component({\n selector: 'app-despachos',\n template: __NG_CLI_RESOURCE__0,\n styles: [__NG_CLI_RESOURCE__1]\n})], DespachosPage);\nexport { DespachosPage };","map":{"version":3,"mappings":";;;;AAAA,SAASA,