Merge branch 'feature/viewer-attachment' of bitbucket.org:equilibriumito/gabinete-digital-fo into feature/viewer-attachment

This commit is contained in:
Peter Maquiran
2024-03-02 12:59:40 +01:00
24 changed files with 102 additions and 31 deletions
@@ -88,6 +88,7 @@ export class EditEventPage implements OnInit {
sesseionStora = SessionStore
environment = environment
allDayCheck: boolean = false;
constructor(
private modalController: ModalController,
@@ -112,6 +113,7 @@ export class EditEventPage implements OnInit {
this.caller = this.navParams.get('caller');
this.initCalendarName = this.postEvent.CalendarName;
this.allDayCheck = this.postEvent.IsAllDayEvent;
@@ -652,4 +654,28 @@ export class EditEventPage implements OnInit {
}
return string;
}
onCheckboxChange(event: any) {
if (this.allDayCheck) {
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
console.log('Recurso ativado!!');
} else {
this.postEvent.IsAllDayEvent = this.allDayCheck;
console.log('Recurso desativado');
}
}
setAlldayTime(timeToReturn) {
let date: any = new Date(timeToReturn) || new Date();
let newdate = new Date();
date.setHours(0)
date.setMinutes(0)
date.setSeconds(0);
return date
}
}