mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Improve notification
This commit is contained in:
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
@@ -21,7 +22,8 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
private router:Router,
|
||||
private modalController: ModalController,
|
||||
private popoverController: PopoverController,
|
||||
private animationController: AnimationController,) {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
}
|
||||
@@ -45,9 +47,9 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
this.successMessage()
|
||||
this.toastService.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -61,9 +63,9 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
this.successMessage()
|
||||
this.toastService.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user