to many changes

This commit is contained in:
Eudes Inácio
2023-02-27 17:39:10 +01:00
parent fcd1989334
commit 46387d4977
30 changed files with 329 additions and 160 deletions
@@ -124,7 +124,6 @@ export class EventActionsPopoverPage implements OnInit {
this.goBack();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
this.toastService.badRequest();
}
finally {
loader.remove()
@@ -141,7 +140,7 @@ export class EventActionsPopoverPage implements OnInit {
}
async rejeitar() {
let body = { "serialNumber": this.serialNumber, "action": "Rejeitar" }
let body = { "serialNumber": this.serialNumber, "action": "Descartar" }
const loader = this.toastService.loading();
try {
@@ -395,20 +395,20 @@ export class NewEventPage implements OnInit {
if(this.loggeduser.Profile == 'MDGPR') {
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
this.toastService._successMessage('Evento criado');
this.hhtpErrorHandle.httpsSucessMessagge('new event')
}
else if(this.loggeduser.Profile == 'PR') {
const CalendarId = this.selectedCalendarId()
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
this.toastService._successMessage('Evento criado');
this.hhtpErrorHandle.httpsSucessMessagge('new event')
} else {
const CalendarId = this.selectedCalendarId()
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
this.toastService._successMessage('Evento criado');
this.hhtpErrorHandle.httpsSucessMessagge('new event')
}
@@ -298,8 +298,10 @@ export class ViewEventPage implements OnInit {
alert.dismiss();
}, 1500);
this.goBack();
this.toastService._successMessage('Evento apagado');
}, () => { },
this.httpErrorHandle.httpsSucessMessagge('delete event')
}, (error) => {
this.httpErrorHandle.httpStatusHandle(error)
},
() => {
loader.remove();
});