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

This commit is contained in:
Peter Maquiran
2021-07-09 15:13:19 +01:00
4 changed files with 16 additions and 13 deletions
@@ -59,8 +59,8 @@ export class EditEventPage implements OnInit {
this.postEvent = new Event();
this.isEventEdited = false;
this.postEvent = this.navParams.get('event');
this.postEvent.EventRecurrence = {Type:'-1'};
this.postEvent = this.navParams.get('event');
this.caller = this.navParams.get('caller');
this.initCalendarName = this.postEvent.CalendarName;
@@ -178,14 +178,17 @@ export class EditEventPage implements OnInit {
this.injectValidation()
this.runValidation()
if(this.Form.invalid) return false
if(this.Form.invalid) return false;
if(this.selectedRecurringType != '-1'){
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
}
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
try{
console.log(this.postEvent);
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
/* this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
if(this.initCalendarName != this.postEvent.CalendarName){
let body = {
"EventId": this.postEvent.EventId,
@@ -198,7 +201,7 @@ export class EditEventPage implements OnInit {
}, error => {
this.toastService.badRequest()
});
}); */
this.isEventEdited = true;
this.goBack();
@@ -180,11 +180,10 @@
<ion-datetime
placeholder="Última ocorrência"
[(ngModel)]="postEvent.EventRecurrence.LastOcurrence"
displayFormat="D MMM YYYY H:mm"
minuteValues="0,15,30,45"
displayFormat="DD MMM YYYY"
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
min="2021"
max="2025"
max="2045"
>
</ion-datetime>
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
@@ -114,7 +114,7 @@ export class ViewEventPage implements OnInit {
this.eventsService.getEvent(this.eventId).subscribe(res => {
this.loadedEvent = res;
/* console.log(res); */
console.log(res);
this.today = new Date(res.StartDate);
/* console.log(new Date(this.today)); */
@@ -181,6 +181,7 @@ export class ViewEventPage implements OnInit {
}
async editEvent() {
console.log(this.loadedEvent);
let classs;
if( window.innerWidth <= 800){
@@ -98,7 +98,6 @@ export class GabineteDigitalPage implements OnInit {
}
};
this.checkRoutes();
this.checkUser();
}
@@ -154,7 +153,7 @@ export class GabineteDigitalPage implements OnInit {
checkRoutes(){
if(this.router.url == '/home/gabinete-digital?eventos=true'){
this.openEventsToApprovePage("MDGPR");
this.openEventsToApprovePage();
this.selectedElement='approval';
}
else if(this.router.url == '/home/gabinete-digital?expedientes=true'){
@@ -194,6 +193,9 @@ export class GabineteDigitalPage implements OnInit {
this. openDiplomasAssinarPage();
this.selectedElement='DiplomasAssinar';
}
else{
this.checkUser();
}
}
refreshExpedientes(){
@@ -317,9 +319,7 @@ export class GabineteDigitalPage implements OnInit {
return false;
}
openEventsToApprovePage(profile:any) {
console.log(profile);
openEventsToApprovePage() {
this.closeAllDesktopComponents();
let navigationExtras: NavigationExtras = { queryParams: {"eventos": true,}};
if( window.innerWidth <= 801) {