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
@@ -13,6 +13,7 @@ import { Event, EventToApproveEdit } from '../../../models/event.model';
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { NavigationExtras, Router } from '@angular/router';
import { ThemeService } from 'src/app/services/theme.service'
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -117,7 +118,8 @@ export class EditEventToApproveComponent implements OnInit {
private processes:ProcessesService,
private toastService: ToastService,
private router:Router,
public ThemeService: ThemeService
public ThemeService: ThemeService,
private httpErroHalde: HttpErrorHandle
) {
// Edit event to approve
this.serialNumber = this.navParams.get('serialNumber');
@@ -153,7 +155,7 @@ export class EditEventToApproveComponent implements OnInit {
this.getAttachments()
} catch (error) {
this.httpErroHalde.httpStatusHandle(error)
}
@@ -310,14 +312,9 @@ export class EditEventToApproveComponent implements OnInit {
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
this.toastService._successMessage('Evento editado');
this.httpErroHalde.httpsSucessMessagge('Editar evento')
}, error =>{
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não editado');
}
this.httpErroHalde.httpStatusHandle(error)
})