mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
All changes i made
This commit is contained in:
@@ -6,6 +6,7 @@ import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edi
|
||||
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -25,6 +26,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
private popoverController: PopoverController,
|
||||
private toastService: ToastService,
|
||||
private RouteService: RouteService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public ThemeService: ThemeService) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
@@ -57,15 +59,10 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
|
||||
this.toastService._successMessage('Evento aprovar')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Evento aprovação')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não aprovar')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -81,15 +78,10 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -128,15 +120,10 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
this.toastService.badRequest();
|
||||
}
|
||||
finally {
|
||||
@@ -159,15 +146,10 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage('Evento rejeitado')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rejeitar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não rejeitado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove();
|
||||
|
||||
Reference in New Issue
Block a user