This commit is contained in:
Peter Maquiran
2023-02-01 09:08:46 +01:00
parent cc9c5a9cf5
commit b3a8379276
33 changed files with 230 additions and 155 deletions
+16 -15
View File
@@ -87,7 +87,8 @@ export class HomePage implements OnInit {
private NativeNotificationService: NativeNotificationService,
private sqliteservice: SqliteService,
private RochetChatConnectorService: RochetChatConnectorService,
private NetworkServiceService: NetworkServiceService
private NetworkServiceService: NetworkServiceService,
public eventService: EventsService,
) {
if (SessionStore.exist) {
this.user = SessionStore.user;
@@ -169,15 +170,22 @@ export class HomePage implements OnInit {
this.updateList()
// var myWorker = new Worker(new URL('./nice.worker.js', import.meta.url));
// myWorker.onmessage = function (oEvent) {
// console.log('Worker said : ' + oEvent.data);
// }
// myWorker.postMessage('ali');
this.clearTabButtonSelection();
setTimeout(() => {
if(this.p.userPermission([this.p.permissionList.Gabinete.md_tasks]) && this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks])) {
throw(SessionStore.user.FullName + 'cant have MD and PR authorization at same time');
}
if(this.p.userPermission([this.p.permissionList.Chat.access]) && !SessionStore.user?.ChatData?.data) {
throw('Chat temporarily unavailable for '+SessionStore.user.FullName + '. No ChatData');
}
if(this.p.userPermission([this.p.permissionList.Agenda.access]) && !this.eventService.hasAnyCalendar) {
throw('User '+SessionStore.user.FullName + 'has No calendar');
}
}, 1000)
}
clearTabButtonSelection() {
@@ -220,13 +228,6 @@ export class HomePage implements OnInit {
updateList() {
// this.notificationsService.registerCallback(
// 'despachos',
// () => {
// // this.despachoRule.getList({ updateStore: true })
// }
// )
document.addEventListener('pause', function () {
// console.log('App going to background');
});