This commit is contained in:
Peter Maquiran
2023-01-24 15:56:47 +01:00
parent 0748612054
commit fbd50137f3
153 changed files with 5997 additions and 953 deletions
@@ -52,7 +52,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
public minDate = new Date();
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
p: any = {}
@@ -117,6 +117,24 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.postData.CalendarName = "Oficial";
this.postData.Category = 'Reunião'
if(!this.CalendarName) {
if(this._eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
console.log(this._eventService.calendarNamesAry)
} else {
this.CalendarName = this._eventService.calendarNamesAry[0]
}
}
if(this.taskParticipants.length == 0) {
this.taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
}
}
ngOnInit() {
@@ -132,8 +150,8 @@ export class DocumentSetUpMeetingPage implements OnInit {
}
setDefaultTime() {
this.postData.StartDate = new Date()
this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
// this.postData.StartDate = new Date()
// this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
}
close() {
@@ -384,4 +402,46 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.taskParticipantsCc = data;
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m){
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
// console.log("AFTER IF MINUTES: " +m);
// console.log("AFTER HOURS: " +h);
return timeToReturn;
}
setStartDate(){
this.postData.StartDate = this.roundTimeQuarterHour();
}
setEndDate(){
this.postData.EndDate = this.postData.StartDate;
}
}