toLowerCase cant read propety solved on edit event

This commit is contained in:
Eudes Inácio
2022-12-21 12:26:43 +01:00
9 changed files with 63 additions and 101 deletions
@@ -104,9 +104,11 @@ export class NewEventPage implements OnInit {
this.taskParticipants = this.navParams.get('attendees');
if(this.eventService.calendarNamesAry['Meu calendario']) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario'
} else {}
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
@@ -178,15 +180,10 @@ export class NewEventPage implements OnInit {
roundTimeQuarterHour() {
var timeToReturn = new Date();
// var minutes = timeToReturn.getMinutes();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
// console.log("MINUTOS: " +minutes);
// console.log("BEFORE MINUTES: " +(Math.round(minutes/15) * 15));
var m = (Math.round(minutes/15) * 15) % 60;
// console.log("AFTER MINUTES: " +m);
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
+35 -34
View File
@@ -80,54 +80,54 @@ export class EventsPage implements OnInit {
private changeProfileService: ChangeProfileService,
) {
// this.loggeduser = SessionStore.user;
this.loggeduser = SessionStore.user;
// this.platform.resize.subscribe(async () => {
// //
// //
this.platform.resize.subscribe(async () => {
//
//
// });
});
// window['zipPhoneCallback'] = function (zipphone) {
// var frame = document.getElementById('home-iframe');
// if(frame) {
// frame['contentWindow']['postMessage']({call:'cookies', value: { cookies: {} }});
// }
// }
window['zipPhoneCallback'] = function (zipphone) {
var frame = document.getElementById('home-iframe');
if(frame) {
frame['contentWindow']['postMessage']({call:'cookies', value: { cookies: {} }});
}
}
// this.changeProfileService.registerCallback(() => {
this.changeProfileService.registerCallback(() => {
// this.listToPresent = [];
// this.listToPresentexpediente = []
// })
this.listToPresent = [];
this.listToPresentexpediente = []
})
}
ngOnInit() {
// this.segment = "Combinada";
// this.profile = "mdgpr";
this.segment = "Combinada";
this.profile = "mdgpr";
// this.showGreeting();
this.showGreeting();
// this.router.events.forEach((event) => {
// if (event instanceof NavigationEnd && event.url == '/home/events') {
// this.RefreshEvents();
// setTimeout(() => {
// this.LoadList();
// }, 1500)
// }
// });
// this.hideSearch();
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url == '/home/events') {
this.RefreshEvents();
setTimeout(() => {
this.LoadList();
}, 1500)
}
});
this.hideSearch();
// this.backgroundservice.registerBackService('Online', () => {
// this.showGreeting();
// this.RefreshEvents();
// this.LoadList();
// this.hideSearch();
// });
this.backgroundservice.registerBackService('Online', () => {
this.showGreeting();
this.RefreshEvents();
this.LoadList();
this.hideSearch();
});
}
@@ -149,6 +149,7 @@ export class EventsPage implements OnInit {
async RefreshEvents() {
this.currentEvent = "";
this.showLoader = true;
@@ -157,7 +158,7 @@ export class EventsPage implements OnInit {
let start = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
if(SessionStore.user) {
console.log('im here')
let onwEvent:any = await this.eventService.getAllOwnEvents(start, end).catch((error) => {
console.error(error)
})
+3 -3
View File
@@ -117,9 +117,9 @@ export class InactivityPage implements OnInit {
}
getToken() {
// this.notificatinsservice.requestPermissions();
// this.notificatinsservice.registrationError();
// this.notificatinsservice.getAndpostToken(this.username);
this.notificatinsservice.requestPermissions();
this.notificatinsservice.registrationError();
this.notificatinsservice.getAndpostToken(this.username);
}
setCode(code: string) {
+5 -6
View File
@@ -98,9 +98,9 @@ export class LoginPage implements OnInit {
}
getToken() {
// this.notificatinsservice.requestPermissions();
// this.notificatinsservice.registrationError();
// this.notificatinsservice.getAndpostToken(this.username);
this.notificatinsservice.requestPermissions();
this.notificatinsservice.registrationError();
this.notificatinsservice.getAndpostToken(this.username);
}
async Login() {
@@ -149,11 +149,10 @@ export class LoginPage implements OnInit {
this.ChatSystemService.clearChat();
SessionStore.delete();
window.localStorage.clear();
await MessageModel.deleteAll()
await DeleteMessageModel.deleteAll()
await MessageModel.deleteAll();
await DeleteMessageModel.deleteAll();
await this.authService.SetSession(attempt, this.userattempt);
this.changeProfileService.run();