mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
All changes i made
This commit is contained in:
@@ -14,6 +14,7 @@ import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expedient
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
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'
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -58,6 +59,7 @@ export class ViewEventPage implements OnInit {
|
||||
public popoverController: PopoverController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
@@ -115,11 +117,7 @@ export class ViewEventPage implements OnInit {
|
||||
type: 'close'
|
||||
})
|
||||
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível visualizar este evento no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
|
||||
});
|
||||
} else {
|
||||
@@ -141,11 +139,7 @@ export class ViewEventPage implements OnInit {
|
||||
type: 'close'
|
||||
})
|
||||
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível visualizar este evento no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -182,9 +176,11 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => {
|
||||
this.toastService._successMessage('Evento eliminado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('delete event')
|
||||
this.close();
|
||||
},()=>{},
|
||||
},(error)=>{
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
},
|
||||
()=>{
|
||||
loader.remove();
|
||||
});
|
||||
@@ -192,9 +188,11 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
if(this.CalendarId) {
|
||||
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.CalendarId).subscribe(async () => {
|
||||
this.toastService._successMessage('Evento eliminado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('delete event');
|
||||
this.close();
|
||||
},()=>{},
|
||||
},(error)=>{
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
},
|
||||
()=>{
|
||||
loader.remove();
|
||||
});
|
||||
@@ -208,17 +206,21 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => {
|
||||
this.toastService._successMessage('Evento eliminado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('delete event');
|
||||
this.close();
|
||||
},()=>{},
|
||||
},(error)=>{
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
},
|
||||
()=>{
|
||||
loader.remove();
|
||||
});
|
||||
} else {
|
||||
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.CalendarId).subscribe(async () => {
|
||||
this.toastService._successMessage('Evento eliminado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('delete event');
|
||||
this.close();
|
||||
},()=>{},
|
||||
},(error)=>{
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
},
|
||||
()=>{
|
||||
loader.remove();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user