mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
improve create event from chat
This commit is contained in:
@@ -488,10 +488,12 @@ export class NewEventPage implements OnInit {
|
||||
else if(this.loggeduser.Profile == 'PR') {
|
||||
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
let loader = this.toastService.loading();
|
||||
|
||||
this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe(
|
||||
(id) => {
|
||||
|
||||
loader.remove()
|
||||
|
||||
const eventId: any = id;
|
||||
|
||||
@@ -520,6 +522,10 @@ export class NewEventPage implements OnInit {
|
||||
this.afterSave();
|
||||
}
|
||||
this.toastService._successMessage('Evento criado')
|
||||
},()=>{
|
||||
loader.remove()
|
||||
this.showLoader = false
|
||||
this.toastService._badRequest('Evento não criado')
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -527,10 +533,12 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
let loader = this.toastService.loading();
|
||||
|
||||
this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe(
|
||||
(id) => {
|
||||
|
||||
loader.remove();
|
||||
|
||||
const eventId: any = id;
|
||||
|
||||
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||
@@ -558,6 +566,10 @@ export class NewEventPage implements OnInit {
|
||||
this.afterSave();
|
||||
}
|
||||
this.toastService._successMessage('Evento criado')
|
||||
},()=>{
|
||||
loader.remove()
|
||||
this.showLoader = false
|
||||
this.toastService._badRequest('Evento não criado')
|
||||
});
|
||||
|
||||
}
|
||||
@@ -643,7 +655,7 @@ export class NewEventPage implements OnInit {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user