mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'bugfix/date-event-approve' into develop
This commit is contained in:
@@ -278,6 +278,12 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
this.startDate = new Date(this.startDate);
|
||||
this.startDate.setHours(this.startDate.getHours() + 1);
|
||||
|
||||
this.endDate = new Date(this.endDate);
|
||||
this.endDate.setHours(this.endDate.getHours() + 1);
|
||||
|
||||
const event: EventToApproveEdit = {
|
||||
SerialNumber: this.eventProcess.serialNumber,
|
||||
Body: this.eventProcess.workflowInstanceDataFields.Body,
|
||||
@@ -304,9 +310,9 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
|
||||
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||
this.toastService.successMessage('Evento editado');
|
||||
this.toastService._successMessage('Evento editado');
|
||||
}, error =>{
|
||||
this.toastService.badRequest('Evento não editado');
|
||||
this.toastService._badRequest('Evento não editado');
|
||||
})
|
||||
|
||||
|
||||
@@ -314,16 +320,16 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
if(document['action'] == 'add') {
|
||||
delete document.action
|
||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
||||
this.toastService.successMessage();
|
||||
this.toastService._successMessage();
|
||||
}, error =>{
|
||||
this.toastService.badRequest();
|
||||
this.toastService._badRequest();
|
||||
});
|
||||
} else if(document['action'] == 'delete') {
|
||||
delete document.action
|
||||
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
}, error =>{
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user