Files
doneit-web/.angular/cache/14.2.12/babel-webpack/134328dc301bcb7fa456fcc7ff5a3972.json
T

1 line
25 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"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 \"./approve-event-modal.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./approve-event-modal.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { MenuController, ModalController, PopoverController } from '@ionic/angular';\nimport { AlertService } from 'src/app/services/alert.service';\nimport { AttachmentsService } from 'src/app/services/attachments.service';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page';\nimport { EmendMessageModalPage } from '../../../agenda/emend-message-modal/emend-message-modal.page';\nimport { EventActionsPopoverPage } from '../../../agenda/event-actions-popover/event-actions-popover.page';\nimport { InAppBrowser } from '@ionic-native/in-app-browser/ngx';\nimport { ToastService } from 'src/app/services/toast.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { HttpErrorHandle } from 'src/app/services/http-error-handle.service';\nimport { TaskService } from 'src/app/services/task.service';\nlet ApproveEventModalPage = class ApproveEventModalPage {\n constructor(router, modalController, processes, attachmentsService, popoverController, menu, alertService, activatedRoute, iab, toastService, ThemeService, httpErrorHandle, TaskService) {\n this.router = router;\n this.modalController = modalController;\n this.processes = processes;\n this.attachmentsService = attachmentsService;\n this.popoverController = popoverController;\n this.menu = menu;\n this.alertService = alertService;\n this.activatedRoute = activatedRoute;\n this.iab = iab;\n this.toastService = toastService;\n this.ThemeService = ThemeService;\n this.httpErrorHandle = httpErrorHandle;\n this.TaskService = TaskService;\n this.months = [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"];\n this.days = [\"Domingo\", \"Segunda-feira\", \"Terça-feira\", \"Quarta-feira\", \"Quinta-feira\", \"Sexta-feira\", \"Sábado\"];\n this.activatedRoute.paramMap.subscribe(paramMap => {\n if (!paramMap.has(\"serialNumber\")) {\n return;\n } else {\n this.serialNumber = paramMap.get('serialNumber');\n }\n });\n }\n ngOnInit() {\n this.getTask();\n this.getAttachments();\n }\n notImplemented() {\n this.alertService.presentAlert('Funcionalidade em desenvolvimento');\n }\n close() {\n this.modalController.dismiss(null);\n }\n getTask() {\n this.processes.GetTask(this.serialNumber).subscribe(res => {\n this.loadedEvent = res;\n this.today = new Date(res.workflowInstanceDataFields.StartDate);\n this.customDate = this.days[this.today.getDay()] + \", \" + this.today.getDate() + \" de \" + this.months[this.today.getMonth()];\n this.InstanceId = res.workflowInstanceDataFields.InstanceId;\n this.getAttachments();\n });\n }\n viewDocument(docId, applicationId) {\n this.processes.GetDocumentUrl(docId, applicationId).subscribe(res => {\n const url = res.replace(\"webTRIX.Viewer\", \"webTRIX.Viewer.Branch1\");\n const browser = this.iab.create(url, \"_blank\");\n browser.show();\n });\n }\n approveTask(serialNumber) {\n var _this = this;\n return _asyncToGenerator(function* () {\n let body = {\n \"serialNumber\": serialNumber,\n \"action\": \"Aprovar\"\n };\n const loader = _this.toastService.loading();\n try {\n yield _this.processes.PostTaskAction(body).toPromise();\n _this.TaskService.loadEventosParaAprovacao();\n _this.httpErrorHandle.httpsSucessMess