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
@@ -19,6 +19,7 @@ import { EventService } from 'src/app/services/rules/event.service';
import { EventPipe } from 'src/app/pipes/event.pipe';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
@@ -106,6 +107,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
private eventService: EventService,
public ThemeService: ThemeService,
public _eventService: EventsService,
private httpErroHandle: HttpErrorHandle
) {
this.loggeduser = SessionStore.user;
this.document = this.navParams.get('document')
@@ -291,17 +293,11 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.eventService.create({ body: postEvent, calendar: this.postData.CalendarName }).subscribe(async (respose) => {
laoder.remove()
this.toastService._successMessage('Reunião criada')
this.httpErroHandle.httpsSucessMessagge('new event');
this.modalController.dismiss()
}, (error) => {
laoder.remove()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else if(error.error.includes('attachments')) {
throw(error.error + JSON.stringify(postEvent.Attachments))
} else {
this.toastService._badRequest('Não foi possível marcar a reunião');
}
this.httpErroHandle.httpStatusHandle(error)
}, ()=>{
laoder.remove()
});