mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
16 KiB
JSON
1 line
16 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 \"./expedientes-pr.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./expedientes-pr.page.scss?ngResource\";\nimport { Component, EventEmitter, Output } from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';\nimport { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';\nimport { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { SortService } from 'src/app/services/functions/sort.service';\nimport { SessionStore } from 'src/app/store/session.service';\nimport { TaskService } from 'src/app/services/task.service';\nlet ExpedientesPrPage = class ExpedientesPrPage {\n constructor(processes, router, ThemeService, sortService, TaskService) {\n this.processes = processes;\n this.router = router;\n this.ThemeService = ThemeService;\n this.sortService = sortService;\n this.TaskService = TaskService;\n this.taskslist = [];\n this.skeletonLoader = false;\n this.expedienteGdStore = ExpedienteGdStore;\n this.customTaskPipe = new CustomTaskPipe();\n this.expedienteTaskPipe = new ExpedienteTaskPipe();\n this.filterName = 'Todos';\n this.showSearch = false;\n this.searchSubject = '';\n this.list = [];\n this.hideSearchBtn = false;\n this.ordinance = 'old';\n this.openExpedientDetail = new EventEmitter();\n this.loggeduser = SessionStore.user;\n }\n ngOnInit() {\n this.LoadList();\n this.listSubscription = this.expedienteGdStore.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?expedientespr=true') || event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?expedientes-pr=true') || event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?expedientes=true')) {\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.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.expedienteGdStore.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.expedienteGdStore.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 openExpedientDetailPage(data) {\n this.openExpedientDetail.emit(data);\n }\n LoadList() {\n this.skeletonLoader = true;\n this.processes.GetTaskListExpe
|