mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
22 KiB
JSON
1 line
22 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 \"./delegar.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./delegar.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular';\nimport { Event } from 'src/app/models/event.model';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { EventsService } from 'src/app/services/events.service';\nimport { AttachmentsService } from 'src/app/services/attachments.service';\nimport { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';\nimport { ToastService } from 'src/app/services/toast.service';\nimport { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';\nimport { SearchPage } from 'src/app/pages/search/search.page';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { HttpErrorHandle } from 'src/app/services/http-error-handle.service';\nlet DelegarPage = class DelegarPage {\n constructor(modalController, router, navParams, processes, attachmentsService, calendarService, alertController, animationController, toastService, ThemeService, httpErrorHandle) {\n this.modalController = modalController;\n this.router = router;\n this.navParams = navParams;\n this.processes = processes;\n this.attachmentsService = attachmentsService;\n this.calendarService = calendarService;\n this.alertController = alertController;\n this.animationController = animationController;\n this.toastService = toastService;\n this.ThemeService = ThemeService;\n this.httpErrorHandle = httpErrorHandle;\n this.taskParticipants = [];\n this.taskParticipantsCc = [];\n this.adding = \"intervenient\";\n this.formLocationSatus = false;\n this.showAttendees = false;\n this.hideThisFeature = true;\n this.documents = [];\n this.task = this.navParams.get('task');\n this.postData = new Event();\n this.eventBody = {\n BodyType: \"1\",\n Text: \"\"\n };\n this.postData.Body = this.eventBody;\n /* Initialize 'Subject' with the title of the expedient */\n this.postData.Subject = this.task.Folio;\n this.postData.CalendarName = \"Oficial\";\n /* this.postData.StartDate = new Date(); */\n /* Set + 30minutes to seleted datetime */\n let selectedEndDate = new Date();\n /* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */\n this.hideThisFeature = this.navParams.get('showAttachmentBtn');\n }\n ngOnInit() {\n this.adding = \"intervenient\";\n }\n close() {\n this.modalController.dismiss('close');\n }\n cancelTask() {\n this.modalController.dismiss(null);\n }\n saveTask() {\n var _this = this;\n return _asyncToGenerator(function* () {\n if (_this.taskParticipants.length < 1) {\n _this.toastService._badRequest(\"Selecione um destinatário\");\n } else if (_this.taskParticipants.length > 1) {\n _this.toastService._badRequest(\"Selecione apenas um destinatário\");\n } else {\n let body = {\n \"SerialNumber\": _this.task.SerialNumber,\n \"DispatchDocId\": _this.task.DocId,\n \"FolderID\": _this.task.FolderId || _this.task.FolderID,\n \"Subject\": _this.task.Folio,\n \"Comment\": _this.note,\n \"DelegatedUserEmail\": _this.taskParticipants[0].EmailAddress\n };\n const loader = _this.toastService.loading();\n _this.processes.DelegateTask(body).subscribe(res => {\n _this.httpErrorHandle.httpsSucessMessagge('Delegar');\n _this.close();\n }, error => {\n _this.httpErrorHandle.httpStatusHandle(error);\n }, () => {\n loader.r
|