mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
1 line
18 KiB
JSON
1 line
18 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 \"./diplomas-gerar-options.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./diplomas-gerar-options.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { ModalController, NavParams, PopoverController } from '@ionic/angular';\nimport { ProcessesService } from 'src/app/services/processes.service';\nimport { Router } from '@angular/router';\nimport { ToastService } from 'src/app/services/toast.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { DespachoService } from 'src/app/Rules/despacho.service';\nimport { DelegarPage } from 'src/app/modals/delegar/delegar.page';\nimport { AddNotePage } from 'src/app/modals/add-note/add-note.page';\nimport { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';\nimport { RouteService } from 'src/app/services/route.service';\nimport { TaskService } from 'src/app/services/task.service';\nlet DiplomasGerarOptionsPage = class DiplomasGerarOptionsPage {\n constructor(processes, popoverController, modalController, toastService, ThemeService, despachoService, navParams, router, RouteService, TaskService) {\n this.processes = processes;\n this.popoverController = popoverController;\n this.modalController = modalController;\n this.toastService = toastService;\n this.ThemeService = ThemeService;\n this.despachoService = despachoService;\n this.navParams = navParams;\n this.router = router;\n this.RouteService = RouteService;\n this.TaskService = TaskService;\n }\n ngOnInit() {\n this.task = this.navParams.get('task');\n this.fulltask = this.navParams.get('fulltask');\n this.serialNumber = this.navParams.get('serialNumber');\n }\n enviarDiploma({\n note = '',\n documents = [],\n serialnumber\n }) {\n var _this = this;\n return _asyncToGenerator(function* () {\n let classs;\n if (window.innerWidth <= 800) {\n classs = 'modal modal-desktop';\n } else {\n classs = 'add-note-modal-no-height';\n }\n const modal = yield _this.modalController.create({\n component: AddNotePage,\n componentProps: {\n showAttachmentBtn: true,\n actionName: false\n },\n cssClass: classs,\n backdropDismiss: true\n });\n yield modal.present();\n modal.onDidDismiss().then( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (res) {\n if (res.data) {\n const DocumentToSave = res.data.documents.map(e => {\n return {\n ApplicationId: e.ApplicationType,\n SourceId: e.Id\n };\n });\n let docs = {\n ProcessInstanceID: \"\",\n Attachments: DocumentToSave\n };\n let body = {\n \"serialNumber\": serialnumber,\n \"action\": \"Enviar diploma\",\n \"ActionTypeId\": 104,\n \"dataFields\": {\n \"ReviewUserComment\": res.data.note\n },\n \"AttachmentList\": docs\n };\n const loader = _this.toastService.loading();\n try {\n yield _this.processes.CompleteTask(body).toPromise();\n _this.modalController.dismiss('sucess');\n _this.toastService._successMessage();\n _this.goBack();\n } catch (error) {\n if (error.status == 0) {\n _this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão');\n } else {\n _this.toastService._badRequest();\n }\n } finally {\n loader.remove();\n }\n }\n });\n return function (_x) {
|