mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -32,7 +32,6 @@ export class EditEventPage implements OnInit {
|
||||
// minDate: string;
|
||||
loadedEventAttachments: Attachment[]=[];
|
||||
recurringTypes: any;
|
||||
selectedRecurringType: any;
|
||||
public dateControlOccurrence = new FormControl(moment("DD MM YYYY hh"));
|
||||
|
||||
public date: any;
|
||||
@@ -106,7 +105,6 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.postEvent);
|
||||
this.dateControlOccurrence = new FormControl(moment(this.postEvent.EventRecurrence.LastOccurrence));
|
||||
|
||||
if(!this.restoreTemporaryData()) {
|
||||
@@ -151,11 +149,11 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
this.restoreDatepickerData();
|
||||
this.getRecurrenceTypes();
|
||||
this.selectedRecurringType = this.postEvent.EventRecurrence.Type.toString();
|
||||
|
||||
this.postEvent.EventRecurrence.Type = this.postEvent.EventRecurrence.Type.toString();
|
||||
setTimeout(() => {
|
||||
this.selectedRecurringType = this.postEvent.EventRecurrence.Type.toString();
|
||||
console.log(this.selectedRecurringType);
|
||||
this.postEvent.EventRecurrence.Type = this.postEvent.EventRecurrence.Type.toString();
|
||||
console.log( this.postEvent.EventRecurrence.Type);
|
||||
}, 1000);
|
||||
|
||||
|
||||
@@ -177,17 +175,6 @@ export class EditEventPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev:any){
|
||||
console.log(ev);
|
||||
if(ev.length > 1){
|
||||
console.log(ev.filter(data => data != '-1'));
|
||||
this.selectedRecurringType = ev.filter(data => data != '-1');
|
||||
}
|
||||
if(ev.length == 0){
|
||||
this.selectedRecurringType = "-1";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
@@ -248,6 +235,17 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev:any){
|
||||
console.log(ev);
|
||||
if(ev.length > 1){
|
||||
console.log(ev.filter(data => data != '-1'));
|
||||
this.postEvent.EventRecurrence.Type = ev.filter(data => data != '-1');
|
||||
}
|
||||
if(ev.length == 0){
|
||||
this.postEvent.EventRecurrence.Type = "-1";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async save() {
|
||||
|
||||
@@ -257,9 +255,6 @@ export class EditEventPage implements OnInit {
|
||||
if(this.Form.invalid) {
|
||||
return false
|
||||
}
|
||||
if(this.selectedRecurringType != '-1'){
|
||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||
}
|
||||
|
||||
this.getDatepickerData()
|
||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
@@ -273,12 +268,9 @@ export class EditEventPage implements OnInit {
|
||||
"CalendarDestinationName": this.postEvent.CalendarName,
|
||||
}
|
||||
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
await this.eventsService.changeAgenda(body).toPromise();
|
||||
} catch (e) {}
|
||||
|
||||
}
|
||||
this.showLoader = false;
|
||||
this.toastService.successMessage()
|
||||
|
||||
Reference in New Issue
Block a user