mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -671,7 +671,6 @@ export class AgendaPage implements OnInit {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -681,9 +680,6 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
|
||||
|
||||
alert('MDGPR')
|
||||
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => {
|
||||
|
||||
this.addEventToDB(response, "md");
|
||||
|
||||
@@ -206,8 +206,9 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
const event = this.CalendarService.eventSource.find((ele) => ele.id == this.eventId)
|
||||
|
||||
if(event?.CalendarId) {
|
||||
// console.log('View event details', event)
|
||||
|
||||
if(event?.CalendarId) {
|
||||
this.eventsService.genericGetEvent(this.eventId, event.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
@@ -261,6 +262,8 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
} else {
|
||||
|
||||
alert('generic delete')
|
||||
|
||||
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.loadedEvent.CalendarId).subscribe(async () => {
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
@@ -279,7 +282,6 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -175,6 +175,10 @@ export class AuthService {
|
||||
|
||||
SessionStore.user.RochetChatUserId = message.result.id
|
||||
SessionStore.save()
|
||||
|
||||
// console.log('user session', SessionStore.user)
|
||||
|
||||
|
||||
this.WsChatService.setStatus('online')
|
||||
|
||||
}).catch((message) => {
|
||||
|
||||
@@ -486,7 +486,7 @@ export class EventsService {
|
||||
|
||||
return this.http.get<Event>(`${geturl}`, options);
|
||||
} else {
|
||||
alert('headr not found'+ calendarId)
|
||||
|
||||
}
|
||||
|
||||
throw('error')
|
||||
@@ -814,6 +814,13 @@ export class EventsService {
|
||||
})
|
||||
|
||||
if (header) {
|
||||
|
||||
|
||||
options = {
|
||||
headers: header,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.delete(`${puturl}`, options).pipe(
|
||||
catchError(err => {
|
||||
console.log('Event edit saved offline')
|
||||
@@ -821,6 +828,8 @@ export class EventsService {
|
||||
throw new Error(err);
|
||||
})
|
||||
)
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
throw('header not found')
|
||||
|
||||
@@ -122,8 +122,12 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
} else {
|
||||
|
||||
const event = this.CalendarService.eventSource.find((ele) => ele.id == this.eventId)
|
||||
|
||||
this.eventsService.genericGetEvent(this.eventId, this.loadedEvent.CalendarId).subscribe(res => {
|
||||
|
||||
if(event?.CalendarId) {
|
||||
|
||||
this.eventsService.genericGetEvent(this.eventId, event.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
@@ -138,13 +142,9 @@ export class ViewEventPage implements OnInit {
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user