add notification message

This commit is contained in:
Peter Maquiran
2023-02-02 12:01:18 +01:00
parent 0036ce6ab2
commit ecd19c46bb
41 changed files with 721 additions and 131 deletions
@@ -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()
}
})
}