mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
1 line
48 KiB
JSON
1 line
48 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 { Injectable } from '@angular/core';\nimport { momentG } from 'src/plugin/momentG';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';\nimport { DeplomasStore } from 'src/app/store/deplomas.service';\nimport { PendentesStore } from 'src/app/store/pendestes-store.service';\nimport { DespachoStore } from 'src/app/store/despacho-store.service';\nimport { TotalDocumentStore } from 'src/app/store/total-document.service';\nimport { DespachosprStore } from 'src/app/store/despachospr-store.service';\nimport { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';\nimport { PedidosStore } from 'src/app/store/pedidos-store.service';\nimport { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';\nimport { DespachoService } from 'src/app/Rules/despacho.service';\nimport { CustomTaskPipe } from '../pipes/custom-task.pipe';\nimport { SessionStore } from 'src/app/store/session.service';\nimport { EventsService } from './events.service';\nimport { Router } from '@angular/router';\nimport { v4 as uuidv4 } from 'uuid';\nlet TaskService = class TaskService {\n constructor(processesbackend, despachoRule, eventService, router) {\n this.processesbackend = processesbackend;\n this.despachoRule = despachoRule;\n this.eventService = eventService;\n this.router = router;\n this.read = 0;\n this.unread = 0;\n this.deadline = 0;\n this.new = 0;\n this.overdueTasks = 0;\n this.expedientegbstore = ExpedienteGdStore;\n this.pendentesstore = PendentesStore;\n this.despachoStore = DespachoStore;\n this.eventoaprovacaostore = EventoAprovacaoStore;\n this.pedidosstore = PedidosStore;\n this.despachoprstore = DespachosprStore;\n this.totalDocumentStore = TotalDocumentStore;\n this.deplomasStore = DeplomasStore;\n this.SessionStore = SessionStore;\n this.AllProcess = [];\n this.showLoader = false;\n this.loadCount = false;\n this.loadNum = 0;\n this.expedienteTaskPipe = new ExpedienteTaskPipe();\n this.customTaskPipe = new CustomTaskPipe();\n this.callbacks = {};\n this.updateAllProcess = () => {\n this.AllProcess = this.sortArrayISODate(this.despachoprstore.list.concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.DiplomaGerarList).concat(this.deplomasStore.diplomasReviewList).concat(this.eventoaprovacaostore.contactList).concat(this.expedientegbstore.list).concat(this.despachoStore.list).concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento).concat(this.pendentesstore.list));\n };\n this.updateCount = () => {\n this.read = this.AllProcess.filter(item => this.filter(item, 'Lidos')).length;\n this.unread = this.AllProcess.filter(item => this.filter(item, 'Não lidos')).length;\n this.deadline = this.AllProcess.filter(task => this.deadlineIsToday(task.Deadline || task.deadline)).length;\n this.new = this.AllProcess.filter(task => this.lessThen24Hours(task.TaskReceiveDate || task.taskReceiveDate)).length;\n this.overdueTasks = this.AllProcess.filter(task => this.overdueTask(task.Deadline || task.deadline)).length;\n };\n window['all-process-gabinete'] = () => {\n this.updateAllProcess();\n this.updateCount();\n this.runCallback();\n };\n this.updateAllProcess();\n this.updateCount();\n this.runCallback();\n document.addEventListener('resume', function () {\n this.loadAllTask();\n });\n }\n registerCallback({\n funx,\n id = uuidv4()\n }) {\n this.callbacks[id] = {\n funx,\n id\n };\n return {\n delete: () => {\n delete this.callbacks[id];\n }\n };\n }\n runCallback() {\n for (const [key, value] of Object.entries
|