This commit is contained in:
Peter Maquiran
2022-12-21 10:34:15 +01:00
parent 3aff9ff3bc
commit 0af70adda7
5 changed files with 43 additions and 83 deletions
+1
View File
@@ -97,6 +97,7 @@ export class HomePage implements OnInit {
this.router.events.subscribe((val) => {
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove())
document.querySelectorAll('.notification').forEach((e: any) => e.remove())
});
window['platform'] = platform
@@ -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) {
+37 -33
View File
@@ -79,54 +79,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();
});
}
@@ -163,6 +163,8 @@ export class EventsPage implements OnInit {
const list = mdOficialEvents.concat(mdPessoalEvents);
this.addEventToDb(list);
this.listToPresent = list
@@ -179,8 +181,10 @@ export class EventsPage implements OnInit {
let prOficialEvents = await this.eventService.getAllPrOficialEvents(start, end).toPromise();
let prPessoalEvents = await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
const list = prOficialEvents.concat(prPessoalEvents);
this.addEventToDb(list);
if (list.length > 0) {
this.currentEvent = list[0].Subject;
-1
View File
@@ -127,7 +127,6 @@ export class AuthService {
this.ChatSystemService.getAllRooms();
}, 200);
// alert('wsLogin')
}).catch((error) => {
console.error(error)
+1 -42
View File
@@ -17,48 +17,7 @@ export class FcmService {
constructor(private router: Router) { }
/* initPush() {
if (Capacitor.platform !== 'web') {
this.registerPush();
}
}
private registerPush() {
PushNotifications.requestPermission().then((permission) => {
if (permission.granted) {
// Register with Apple / Google to receive push via APNS/FCM
PushNotifications.register();
} else {
// No permission for push granted
}
});
PushNotifications.addListener(
'registration',
(token: PushNotificationToken) => {
}
);
PushNotifications.addListener('registrationError', (error: any) => {
});
PushNotifications.addListener(
'pushNotificationReceived',
async (notification: PushNotification) => {
}
);
PushNotifications.addListener(
'pushNotificationActionPerformed',
async (notification: PushNotificationActionPerformed) => {
const data = notification.notification.data;
if (data.detailsId) {
this.router.navigateByUrl(`/home/notifications/notification-detail${data.detaisId}`);
}
}
);
} */
}