mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
13 KiB
JSON
1 line
13 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 \"./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 { DespachoStore } from 'src/app/store/despacho-store.service';\nimport { RouteService } from 'src/app/services/route.service';\nimport { SqliteService } from 'src/app/services/sqlite.service';\nimport { Platform } from '@ionic/angular';\nimport { BackgroundService } from 'src/app/services/background.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { TaskService } from 'src/app/services/task.service';\nlet DespachosPage = class DespachosPage {\n constructor(router, despachoRule, sqliteservice, platform, backgroundservice, ThemeService, TaskService, RouteService) {\n this.router = router;\n this.despachoRule = despachoRule;\n this.sqliteservice = sqliteservice;\n this.platform = platform;\n this.backgroundservice = backgroundservice;\n this.ThemeService = ThemeService;\n this.TaskService = TaskService;\n this.RouteService = RouteService;\n this.despachoStore = DespachoStore;\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 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.backgroundservice.registerBackService('Online', () => {\n this.LoadList();\n });\n this.dynamicSearch();\n }\n dynamicSearch() {\n var _this = this;\n return _asyncToGenerator(function* () {\n if (_this.showSearch && _this.searchSubject) {\n const searchedList = _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, searchedList);\n } else {\n const list = _this.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 reorderList(orderBy) {\n this.ordinance = orderBy;\n this.dynamicSearch();\n }\n refreshing() {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n setTimeout(() => {\n _this4.LoadList();\n }, 1000);\n })();\n }\n segmentChanged(ev) {\n this.LoadList();\n }\n LoadList() {\n var _this5 = this;\n return _asyncToGenerator(function* () {\n yield _this5.despachoRule.getList({\n updateStore: true\n }).then(pre => {\n // \n _this5.dynamicSearch();\n }).catch(() => {});\n })();\n }\n get skeletonLoader() {\n return this.despachoRule.LoaderService.loading;\n }\n doRefresh(event) {\n this.LoadList();\n setTimeout(() => {\n try {\n
|