This commit is contained in:
tiago.kayaya
2021-07-09 14:39:45 +01:00
parent 7bd92ae5d5
commit 9ce59bd7fa
4 changed files with 16 additions and 13 deletions
@@ -60,8 +60,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;
@@ -179,14 +179,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,
@@ -199,7 +202,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){