mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Improve
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Event } from '../../../../models/event.model';
|
||||
@@ -45,8 +43,6 @@ export class DespachoPage implements OnInit {
|
||||
constructor(private activateRoute: ActivatedRoute,
|
||||
private processes: ProcessesService,
|
||||
private iab: InAppBrowser,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private events: EventsService,
|
||||
private menu: MenuController,
|
||||
private modalController: ModalController,
|
||||
public popoverController: PopoverController,
|
||||
@@ -192,19 +188,11 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents: AttachmentList) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
await this.despachoService.arquivar(note, documents,this.serialnumber).toPromise()
|
||||
this.toastService.successMessage('Processo descartado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
@@ -214,7 +202,6 @@ export class DespachoPage implements OnInit {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async reexecute(note:string, documents:any) {
|
||||
|
||||
Reference in New Issue
Block a user