mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
merge branch
This commit is contained in:
@@ -10,7 +10,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { TaskService } from 'src/app/services/task.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -109,6 +109,7 @@ export class ApproveEventPage implements OnInit {
|
||||
async rejectTask(serialNumber:string) {
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Descartar" }
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
@@ -132,6 +133,8 @@ export class ApproveEventPage implements OnInit {
|
||||
} catch (error) {
|
||||
console.error('getAttchaments',error)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async viewDocument(DocId:string, Document) {
|
||||
@@ -193,33 +196,26 @@ export class ApproveEventPage implements OnInit {
|
||||
if(res.data.option == 'save') {
|
||||
|
||||
|
||||
if(res.data.note !== '') {
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.httpErroHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res.data.option == 'save') {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.httpErroHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user