mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
git pull made
This commit is contained in:
@@ -382,6 +382,16 @@ const routes: Routes = [
|
||||
],
|
||||
canActivate: [InactivityGuard]
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
children: [
|
||||
{
|
||||
path:'',
|
||||
loadChildren: ()=> import('../pages/inactivity/inactivity.module').then(m => m.InactivityPageModule)
|
||||
},
|
||||
],
|
||||
canActivate: [InactivityGuard]
|
||||
},
|
||||
{
|
||||
path: 'pin',
|
||||
children: [
|
||||
|
||||
@@ -12,13 +12,14 @@
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-calendar.svg"></ion-icon>
|
||||
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Agenda</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="gabinete-digital">
|
||||
<ion-tab-button (click)="goto('/home/gabinete-digital')">
|
||||
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-gabinete-inactive.svg"></ion-icon>
|
||||
<ion-badge color="danger" *ngIf="!p.userRole(['PR'])" >{{ documentCounterService.mdTotalDocument }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ documentCounterService.prTotalDocument }}</ion-badge>
|
||||
<ion-label>Gabinete</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button tab="publications">
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
|
||||
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Ações</ion-label>
|
||||
|
||||
+53
-15
@@ -20,6 +20,7 @@ import { SessionStore } from '../store/session.service';
|
||||
import { StorageService } from '../services/storage.service';
|
||||
import { Media, MediaObject } from '@ionic-native/media/ngx';
|
||||
import { File } from '@ionic-native/file/ngx';
|
||||
import { WebNotificationPopupService } from '../services/notification/web-notification-popup.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
@@ -63,7 +64,6 @@ export class HomePage implements OnInit {
|
||||
synchro = synchro
|
||||
|
||||
status:string="";
|
||||
audioFile:MediaObject = this.media.create(this.file.externalRootDirectory+"/audioGabinete.mp3");
|
||||
audioName:string="";
|
||||
constructor(
|
||||
private zone: NgZone,
|
||||
@@ -78,15 +78,14 @@ export class HomePage implements OnInit {
|
||||
private despachoRule: DespachoService,
|
||||
private inativityService: InativityService,
|
||||
private storageService: StorageService,
|
||||
private media: Media,
|
||||
private file: File ) {
|
||||
private webNotificationPopupService: WebNotificationPopupService) {
|
||||
|
||||
this.webNotificationPopupService.askNotificationPermission()
|
||||
|
||||
this.router.events.subscribe((val) => {
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
||||
});
|
||||
|
||||
this.updateList()
|
||||
|
||||
window['platform'] = platform
|
||||
window['inactivity/function'] = () => {
|
||||
|
||||
@@ -98,23 +97,20 @@ export class HomePage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
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');
|
||||
|
||||
}
|
||||
|
||||
goto(url) {
|
||||
this.router.navigate([url])
|
||||
}
|
||||
|
||||
refreshing() {}
|
||||
|
||||
ngOnInit() {
|
||||
/* this.network.checkNetworkConnection;
|
||||
this.network.checkNetworkDisconnection; */
|
||||
console.log('Active route ', this.router.url)
|
||||
// console.log('Active route ', this.router.url)
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.webnotification.webconnection();
|
||||
this.webnotification.register();
|
||||
@@ -123,6 +119,15 @@ export class HomePage implements OnInit {
|
||||
this.notificationsService.onReceviNotification();
|
||||
}
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
mobilefirstConnect() {
|
||||
@@ -169,10 +174,43 @@ export class HomePage implements OnInit {
|
||||
}
|
||||
)
|
||||
|
||||
synchro.registerCallback('Notification', (notification)=> {
|
||||
console.log('notification====== £=======£==========£======', notification)
|
||||
|
||||
synchro.registerCallback('Online',()=>{
|
||||
|
||||
})
|
||||
|
||||
|
||||
synchro.registerCallback('Offline',()=>{
|
||||
|
||||
})
|
||||
|
||||
|
||||
synchro.registerCallback('Notification', (DataArray)=> {
|
||||
|
||||
this.webNotificationPopupService.sendNotification(DataArray)
|
||||
|
||||
this.storageService.get('Notifications').then((data:any)=>{
|
||||
data.push(DataArray)
|
||||
this.storageService.store("Notifications", data)
|
||||
}).catch(()=>{
|
||||
|
||||
const a = []
|
||||
a.push(DataArray)
|
||||
this.storageService.store("Notifications",a)
|
||||
})
|
||||
|
||||
}, 'any')
|
||||
|
||||
|
||||
|
||||
document.addEventListener('pause', function () {
|
||||
// console.log('App going to background');
|
||||
});
|
||||
|
||||
document.addEventListener('resume', function () {
|
||||
// console.log('App coming to foreground');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user