mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Gabinete digital offline complete
This commit is contained in:
@@ -79,7 +79,7 @@ export class ApproveEventPage implements OnInit {
|
||||
console.log(this.serialNumber);
|
||||
console.log(this.caller);
|
||||
this.getProcessFromDB();
|
||||
this.getTask();
|
||||
|
||||
}
|
||||
|
||||
goBack() {
|
||||
@@ -105,6 +105,10 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
getProcessFromDB() {
|
||||
|
||||
if (synchro.connected === true) {
|
||||
this.getTask();
|
||||
}
|
||||
|
||||
synchro.registerCallback('Offline', () => {
|
||||
this.platform.ready().then(() => {
|
||||
|
||||
|
||||
@@ -46,27 +46,10 @@ export class EventListPage implements OnInit {
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.segment = 'MDGPR';
|
||||
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.getEventToAproveFromDB();
|
||||
|
||||
|
||||
this.LoadToApproveEvents()
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.refreshing()
|
||||
} else {
|
||||
this.LoadToApproveEvents()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth <= 800){
|
||||
@@ -78,6 +61,23 @@ export class EventListPage implements OnInit {
|
||||
|
||||
getEventToAproveFromDB() {
|
||||
|
||||
if( synchro.connected === true) {
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.LoadToApproveEvents()
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.refreshing()
|
||||
} else {
|
||||
this.LoadToApproveEvents()
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
synchro.registerCallback('Offline', () => {
|
||||
this.platform.ready().then(() => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user