mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
save
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
@@ -136,6 +136,8 @@ export class ApproveEventComponent implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res.data);
|
||||
|
||||
if(res.data !== ''){
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
@@ -145,8 +147,9 @@ export class ApproveEventComponent implements OnInit {
|
||||
}
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
//this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.alertService.presentAlert('Operação realizada com sucesso!');
|
||||
this.goToEventsToApprove();
|
||||
}
|
||||
else{
|
||||
this.alertService.presentAlert('Operação cancelada!');
|
||||
@@ -154,4 +157,13 @@ export class ApproveEventComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
goToEventsToApprove(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"events": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export class NewEventPage implements OnInit {
|
||||
Body: this.eventBody,
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: this.selectedSegment,
|
||||
CalendarName: '',
|
||||
StartDate: selectedStartdDate,
|
||||
EndDate: new Date(selectedEndDate),
|
||||
EventType: 'Reunião',
|
||||
|
||||
Reference in New Issue
Block a user