mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -36,6 +36,8 @@ export class EditEventPage implements OnInit {
|
||||
minDate: string;
|
||||
initCalendarName: string;
|
||||
caller:string;
|
||||
recurringTypes: any;
|
||||
selectedRecurringType: any;
|
||||
|
||||
|
||||
loadedEventAttachments: Attachment[] = [];
|
||||
@@ -56,10 +58,10 @@ export class EditEventPage implements OnInit {
|
||||
private router: Router,
|
||||
) {
|
||||
|
||||
|
||||
|
||||
this.postEvent = new Event();
|
||||
this.isEventEdited = false;
|
||||
this.postEvent = this.navParams.get('event');
|
||||
this.postEvent.EventRecurrence = {Type:'-1'};
|
||||
this.caller = this.navParams.get('caller');
|
||||
this.initCalendarName = this.postEvent.CalendarName;
|
||||
|
||||
@@ -97,8 +99,7 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
console.log(this.caller);
|
||||
this.selectedRecurringType = "-1";
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
@@ -109,6 +110,8 @@ export class EditEventPage implements OnInit {
|
||||
if(window.innerWidth > 800){
|
||||
this.showAttendees=true;
|
||||
}
|
||||
|
||||
this.getRecurrenceTypes();
|
||||
|
||||
}
|
||||
|
||||
@@ -121,6 +124,24 @@ export class EditEventPage implements OnInit {
|
||||
this.router.navigate(['/home',this.caller]);
|
||||
}
|
||||
|
||||
getRecurrenceTypes() {
|
||||
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
||||
console.log(res);
|
||||
this.recurringTypes = res;
|
||||
});
|
||||
}
|
||||
|
||||
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
|
||||
@@ -162,6 +183,9 @@ 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.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||
if(this.initCalendarName != this.postEvent.CalendarName){
|
||||
let body = {
|
||||
|
||||
Reference in New Issue
Block a user