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 } from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\nimport { DeplomasStore } from 'src/app/store/deplomas.service';\nimport { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { TaskService } from 'src/app/services/task.service';\nlet DiplomasAssinarPage = class DiplomasAssinarPage {\n constructor(router, ThemeService, TaskService) {\n this.router = router;\n this.ThemeService = ThemeService;\n this.TaskService = TaskService;\n this.skeletonLoader = false;\n this.deplomasStore = DeplomasStore;\n this.customTaskPipe = new CustomTaskPipe();\n this.filterName = 'Todos';\n // \n this.showSearch = false;\n this.searchSubject = '';\n this.list = [];\n this.hideSearchBtn = false;\n this.ordinance = 'old';\n }\n ngOnInit() {\n this.dynamicSearch();\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?diplomasassinar=true'.startsWith(event.url)) {\n this.LoadList();\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 list = _this.deplomasStore.diplomasParaAssinarList.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.deplomasStore.diplomasParaAssinarList;\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 goToDiploma({\n SerialNumber\n }) {\n this.router.navigate(['/home/gabinete-digital/diplomas-assinar', SerialNumber, 'gabinete-digital']);\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 LoadList() {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n _this4.skeletonLoader = true;\n yield _this4.TaskService.loadDiplomas();\n _this4.dynamicSearch();\n _this4.skeletonLoader = false;\n })();\n }\n};\nDiplomasAssinarPage.ctorParameters = () => [{\n type: Router\n}, {\n type: ThemeService\n}, {\n type: TaskService\n}];\nDiplomasAssinarPage = __decorate([Component({\n selector: 'app-diplomas-assinar',\n template: __NG_CLI_RESOURCE__0,\n styles: [__NG_CLI_RESOURCE__1]\n})], DiplomasAssinarPage);\nexport { DiplomasAssinarPage };","map":{"version":
|