Merge branch 'developer-c' of bitbucket.org:equilibriumito/gabinete-digital into developer-c

This commit is contained in:
Peter Maquiran
2021-04-07 15:14:48 +01:00
12 changed files with 90 additions and 20 deletions
@@ -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);
}
}
@@ -63,7 +63,7 @@ export class NewEventPage implements OnInit {
Body: this.eventBody,
Location: '',
CalendarId: '',
CalendarName: this.selectedSegment,
CalendarName: '',
StartDate: selectedStartdDate,
EndDate: new Date(selectedEndDate),
EventType: 'Reunião',