mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
1 line
24 KiB
JSON
1 line
24 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 \"./approve-event.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./approve-event.page.scss?ngResource\";\nimport { Component, Input, EventEmitter, Output } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { ModalController, PopoverController } from '@ionic/angular';\nimport { AttachmentsService } from 'src/app/services/attachments.service';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { EmendMessageModalPage } from 'src/app/pages/agenda/emend-message-modal/emend-message-modal.page';\nimport { EventActionsPopoverPage } from 'src/app/pages/agenda/event-actions-popover/event-actions-popover.page';\nimport { ToastService } from 'src/app/services/toast.service';\nimport { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';\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 ApproveEventPage = class ApproveEventPage {\n constructor(router, modalController, processes, attachmentsService, popoverController, toastService, ThemeService, httpErroHandle, TaskService) {\n // Event to approve list\n this.router = router;\n this.modalController = modalController;\n this.processes = processes;\n this.attachmentsService = attachmentsService;\n this.popoverController = popoverController;\n this.toastService = toastService;\n this.ThemeService = ThemeService;\n this.httpErroHandle = httpErroHandle;\n this.TaskService = TaskService;\n this.show = false;\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.approveEventDismiss = new EventEmitter();\n this.closeEventToApprove = new EventEmitter();\n this.AproveEventEditEvent = new EventEmitter();\n this.EditApproveEventDismiss = new EventEmitter();\n window['edit-approve-event-desktop'] = () => {\n this.getTask();\n };\n }\n toDateString(e) {\n return new Date(e).toDateString();\n }\n ngOnInit() {\n this.getTask();\n this.getAttachments();\n }\n close() {\n this.closeEventToApprove.emit();\n this.modalController.dismiss();\n }\n getTask() {\n this.processes.GetTask(this.serialNumber).subscribe(res => {\n this.loadedEvent = res;\n this.today = new Date(res.workflowInstanceDataFields.StartDate);\n // \n this.customDate = this.days[this.today.getDay()] + \", \" + this.today.getDate() + \" de \" + this.months[this.today.getMonth()];\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.modalController.dismiss(serialNumber);\n _this.httpErroHandle.httpsSucessMessagge('Aprovar');\n _this.TaskService.loadEventosParaAprovacao();\n } catch (error) {\n _this.httpErroHandle.httpStatusHandle(error);\n } finally {\n _this.close();\n loader.remove();\n }\n })();\n }\n rejectTask(serialNumber) {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n let body = {\n \"serialNumber\": serialNumber,\n \"action\": \"Descartar\"\n };\n const loader = _this2.toastService.loading();\n try {\n yield _this2.processes.PostTaskAction(body).toPromise();\n
|