mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +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, ViewChild } from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\nimport { CalendarComponent } from 'ionic2-calendar';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { ModalController } from '@ionic/angular';\nimport { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';\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 { RouteService } from 'src/app/services/route.service';\nimport { SessionStore } from 'src/app/store/session.service';\nimport { TaskService } from 'src/app/services/task.service';\nlet ExpedientesPrPage = class ExpedientesPrPage {\n constructor(processes, modalController, router, RouteService, ThemeService, sortService, TaskService) {\n this.processes = processes;\n this.modalController = modalController;\n this.router = router;\n this.RouteService = RouteService;\n this.ThemeService = ThemeService;\n this.sortService = sortService;\n this.TaskService = TaskService;\n this.taskslist = [];\n this.openExpedientDetail = new EventEmitter();\n this.skeletonLoader = true;\n this.expedienteGdStore = ExpedienteGdStore;\n this.expedienteTaskPipe = new ExpedienteTaskPipe();\n this.filterName = 'Todos';\n this.showSearch = false;\n this.searchSubject = '';\n this.list = [];\n this.ordinance = 'old';\n this.headerName = \"Expediente\";\n this.loggeduser = SessionStore.user;\n }\n ngOnInit() {\n const location = window.location;\n const pathname = location.pathname + location.search;\n this.LoadList();\n this.router.events.forEach(event => {\n if (event instanceof NavigationStart && event.url.startsWith(pathname)) {\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 this.dynamicSearch();\n }\n reorderList(orderBy) {\n this.ordinance = orderBy;\n this.dynamicSearch();\n }\n changeFilterName(filterName) {\n this.filterName = filterName;\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 LoadList() {\n this.skeletonLoader = true;\n this.processes.GetTaskListExpediente(false).subscribe(result => {\n this.skeletonLoader = false;\n this.showLoader = false;\n this.taskslist = new Array();\n let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == \"\" || data.workflowInstanceDataFields.Status == \"Active\");\n this.taskslist = res.map(element => this.expedienteTaskPipe.transform(element));\n this.taskslist = this.sortService.sortDate(this.taskslist, 'CreateDate');\n this.expedienteGdStore.reset(
|