mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Fix
This commit is contained in:
@@ -157,7 +157,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Selecione a repetição*"
|
||||
[(ngModel)]="selectedRecurringType"
|
||||
(ngModelChange)="onSelectedRecurringChanged($event)"
|
||||
|
||||
@@ -46,8 +46,6 @@ export class EditEventPage implements OnInit {
|
||||
adding: "intervenient" | "CC" = "intervenient";
|
||||
|
||||
|
||||
|
||||
|
||||
showAttendees = false;
|
||||
|
||||
constructor(
|
||||
@@ -168,7 +166,7 @@ export class EditEventPage implements OnInit {
|
||||
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||
Validators.required
|
||||
]),
|
||||
Date: new FormControl(new Date(this.postEvent.StartDate).toLocaleString() < new Date(this.postEvent.EndDate).toLocaleString()? 'ok': null,[
|
||||
Date: new FormControl(new Date(this.postEvent.StartDate).getTime() < new Date(this.postEvent.EndDate).getTime()? 'ok': null,[
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
@@ -191,34 +189,33 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
|
||||
try{
|
||||
console.log(this.postEvent);
|
||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||
|
||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||
|
||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||
if(this.initCalendarName != this.postEvent.CalendarName){
|
||||
let body = {
|
||||
"EventId": this.postEvent.EventId,
|
||||
"CalendarDestinationName": this.postEvent.CalendarName,
|
||||
}
|
||||
try {
|
||||
await this.eventsService.changeAgenda(body).toPromise();
|
||||
} catch (error) {}
|
||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||
if(this.initCalendarName != this.postEvent.CalendarName){
|
||||
let body = {
|
||||
"EventId": this.postEvent.EventId,
|
||||
"CalendarDestinationName": this.postEvent.CalendarName,
|
||||
}
|
||||
try {
|
||||
await this.eventsService.changeAgenda(body).toPromise();
|
||||
} catch (error) {}
|
||||
finally {
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
}
|
||||
this.toastService.successMessage();
|
||||
|
||||
}
|
||||
this.toastService.successMessage();
|
||||
|
||||
}, error => {
|
||||
this.toastService.badRequest()
|
||||
});
|
||||
|
||||
this.isEventEdited = true;
|
||||
this.goBack();
|
||||
this.modalController.dismiss(this.isEventEdited);
|
||||
|
||||
} catch (error) {
|
||||
}, error => {
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
});
|
||||
|
||||
this.isEventEdited = true;
|
||||
|
||||
this.modalController.dismiss(this.isEventEdited);
|
||||
|
||||
|
||||
this.saveDocument()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user