mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
Fix
This commit is contained in:
@@ -157,7 +157,7 @@
|
|||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||||
</div>
|
</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*"
|
<ion-select placeholder="Selecione a repetição*"
|
||||||
[(ngModel)]="selectedRecurringType"
|
[(ngModel)]="selectedRecurringType"
|
||||||
(ngModelChange)="onSelectedRecurringChanged($event)"
|
(ngModelChange)="onSelectedRecurringChanged($event)"
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ export class EditEventPage implements OnInit {
|
|||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
showAttendees = false;
|
showAttendees = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -168,7 +166,7 @@ export class EditEventPage implements OnInit {
|
|||||||
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||||
Validators.required
|
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
|
Validators.required
|
||||||
]),
|
]),
|
||||||
|
|
||||||
@@ -191,34 +189,33 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
|
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.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||||
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 () => {
|
||||||
this.toastService.successMessage();
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}, error => {
|
}
|
||||||
this.toastService.badRequest()
|
this.toastService.successMessage();
|
||||||
});
|
|
||||||
|
|
||||||
this.isEventEdited = true;
|
}, error => {
|
||||||
this.goBack();
|
|
||||||
this.modalController.dismiss(this.isEventEdited);
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
this.toastService.badRequest()
|
this.toastService.badRequest()
|
||||||
}
|
});
|
||||||
|
|
||||||
|
this.isEventEdited = true;
|
||||||
|
|
||||||
|
this.modalController.dismiss(this.isEventEdited);
|
||||||
|
|
||||||
|
|
||||||
this.saveDocument()
|
this.saveDocument()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ export class NewEventPage implements OnInit {
|
|||||||
participantes: new FormControl(this.taskParticipants, [
|
participantes: new FormControl(this.taskParticipants, [
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
Date: new FormControl(this.postEvent.StartDate.toLocaleString() < this.postEvent.EndDate.toLocaleString() ? 'ok': null,[
|
Date: new FormControl(this.postEvent.StartDate.getTime() < this.postEvent.EndDate.getTime() ? 'ok': null,[
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user