mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
All changes i made
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user