mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add notification message
This commit is contained in:
@@ -312,7 +312,12 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||
this.toastService._successMessage('Evento editado');
|
||||
}, error =>{
|
||||
this.toastService._badRequest('Evento não editado');
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não editado');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -322,14 +327,24 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
||||
this.toastService._successMessage();
|
||||
}, error =>{
|
||||
this.toastService._badRequest();
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest();
|
||||
}
|
||||
});
|
||||
} else if(document['action'] == 'delete') {
|
||||
delete document.action
|
||||
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
||||
this.toastService._successMessage()
|
||||
}, error =>{
|
||||
this.toastService._badRequest()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user