mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
1 line
9.9 KiB
JSON
1 line
9.9 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 \"./dar-parecer.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./dar-parecer.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { AnimationController, ModalController, NavParams } from '@ionic/angular';\nimport { SearchPage } from 'src/app/pages/search/search.page';\nimport { ProcessesService } from 'src/app/services/processes.service';\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';\nlet DarParecerPage = class DarParecerPage {\n constructor(processes, modalController, navParams, animationController, toastService, ThemeService, httpErroHanlde) {\n this.processes = processes;\n this.modalController = modalController;\n this.navParams = navParams;\n this.animationController = animationController;\n this.toastService = toastService;\n this.ThemeService = ThemeService;\n this.httpErroHanlde = httpErroHanlde;\n this.documents = [];\n this.serialNumber = this.navParams.get('serialNumber');\n this.instanceId = this.navParams.get('ProcessInstanceID');\n }\n ngOnInit() {}\n cancel() {\n this.modalController.dismiss();\n }\n save() {\n var _this = this;\n return _asyncToGenerator(function* () {\n const DocumentToSave = _this.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\": _this.serialNumber,\n \"action\": \"Registar\",\n \"ActionTypeId\": 104,\n \"dataFields\": {\n \"ReviewUserComment\": _this.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.httpErroHanlde.httpsSucessMessagge('Dar o meu Parecer');\n } catch (error) {\n _this.httpErroHanlde.httpStatusHandle(error);\n } finally {\n loader.remove();\n }\n })();\n }\n removeAttachment(index) {\n this.documents = this.documents.filter((e, i) => index != i);\n }\n getDoc() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n const modal = yield _this2.modalController.create({\n component: SearchPage,\n cssClass: 'modal-width-100-width-background modal',\n componentProps: {\n type: 'AccoesPresidenciais & ArquivoDespachoElect',\n showSearchInput: true,\n select: true\n }\n });\n yield modal.present();\n modal.onDidDismiss().then(res => {\n if (res) {\n const data = res.data;\n _this2.documents.push(data.selected);\n }\n });\n })();\n }\n};\nDarParecerPage.ctorParameters = () => [{\n type: ProcessesService\n}, {\n type: ModalController\n}, {\n type: NavParams\n}, {\n type: AnimationController\n}, {\n type: ToastService\n}, {\n type: ThemeService\n}, {\n type: HttpErrorHandle\n}];\nDarParecerPage = __decorate([Component({\n selector: 'app-dar-parecer',\n template: __NG_CLI_RESOURCE__0,\n styles: [__NG_CLI_RESOURCE__1]\n})], DarParecerPage);\nexport { DarParecerPage };","map":{"version":3,"mappings":";;;;AAAA,SAASA,SAAS,QAAgB,eAAe;AACjD,SAASC,mBAAmB,EAAEC,eAAe,EAAEC,SAAS,QAAQ,gBAAgB;AAEhF,SAASC,UAAU,QAAQ,kCAAkC;AAC7D,SAASC,gBAAgB,QAAQ,oCAAoC;AACrE,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,eAAe,QAAQ,4CAA4C;AAOrE,IAAMC,cAAc,GAApB,MAAMA,cAAc;EAMzBC,YACUC,SAA2B,EAC3BC,eAAgC,EAChCC,SAAoB,EACpBC,mBAAwC,EACxCC,YAA0B,EAC3BR,YAA0B,EACzBS,cAA+B;IAN/B,cAAS
|