All changes i made

This commit is contained in:
Eudes Inácio
2023-02-27 09:34:36 +01:00
77 changed files with 8025 additions and 6717 deletions
@@ -27,6 +27,7 @@ import { ThemeService } from 'src/app/services/theme.service'
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
import { ServerConnectionService } from 'src/app/services/server-connection.service';
import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -130,8 +131,9 @@ export class NewEventPage implements OnInit {
private dateAdapter: DateAdapter<any>,
public ThemeService: ThemeService,
private chatMethodService: ChatMethodsService,
private ServerConnectionService: ServerConnectionService
private ServerConnectionService: ServerConnectionService,
// private translate: TranslateService
private hhtpErrorHandle: HttpErrorHandle
) {
this.dateAdapter.setLocale('pt');
this.loggeduser = SessionStore.user;
@@ -521,7 +523,7 @@ export class NewEventPage implements OnInit {
if(DocumentToSave.length == 0) {
this.afterSave();
}
this.toastService._successMessage('Evento criado');
this.hhtpErrorHandle.httpsSucessMessagge('new event')
let data = {
"subject": this.postEvent.Subject,
"start": this.postEvent.StartDate,
@@ -540,12 +542,7 @@ export class NewEventPage implements OnInit {
console.log(error, 'error')
loader.remove()
this.showLoader = false
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não criado')
}
this.hhtpErrorHandle.httpStatusHandle(error)
});
}
@@ -585,7 +582,7 @@ export class NewEventPage implements OnInit {
if(DocumentToSave.length == 0){
this.afterSave();
}
this.toastService._successMessage('Evento criado');
this.hhtpErrorHandle.httpsSucessMessagge('new event')
let data = {
"subject": this.postEvent.Subject,
"start": this.postEvent.StartDate,
@@ -597,17 +594,11 @@ export class NewEventPage implements OnInit {
if(this.roomId) {
this.chatMethodService.sendMessage(this.roomId,data);
}
this.toastService._successMessage('Evento criado')
},(error) => {
//const connectionToServer = this.ServerConnectionService.BaseAPI()
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não criado')
}
this.hhtpErrorHandle.httpStatusHandle(error)
loader.remove()
this.showLoader = false
@@ -651,7 +642,7 @@ export class NewEventPage implements OnInit {
this.afterSave();
}
this.toastService._successMessage('Evento criado');
this.hhtpErrorHandle.httpsSucessMessagge('new event')
let data = {
"subject": this.postEvent.Subject,
"start": this.postEvent.StartDate,
@@ -663,16 +654,11 @@ export class NewEventPage implements OnInit {
if(this.roomId) {
this.chatMethodService.sendMessage(this.roomId,data);
}
this.toastService._successMessage('Evento criado')
},(error)=>{
loader.remove()
this.showLoader = false
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não criado')
}
this.hhtpErrorHandle.httpStatusHandle(error)
});
}