mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
merge with branchBug
This commit is contained in:
@@ -39,12 +39,10 @@ export class ExpedientePage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.getEventsFromLocalDb();
|
||||
console.log("segrsgre")
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
this.LoadList()
|
||||
|
||||
@@ -58,6 +56,8 @@ export class ExpedientePage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
=======
|
||||
>>>>>>> branchBug
|
||||
}
|
||||
|
||||
async LoadList() {
|
||||
@@ -74,6 +74,7 @@ export class ExpedientePage implements OnInit {
|
||||
|
||||
let task = this.expedienteTaskPipe.transform(element)
|
||||
this.taskslist.push(task);
|
||||
this.sqliteservice.addProcess(task);
|
||||
});
|
||||
|
||||
this.listToPresent = this.taskslist
|
||||
@@ -136,17 +137,25 @@ export class ExpedientePage implements OnInit {
|
||||
|
||||
getEventsFromLocalDb() {
|
||||
|
||||
synchro.registerCallback('Online', () => {
|
||||
this.onlinecheck = true;
|
||||
})
|
||||
if (synchro.connected === true) {
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.LoadList()
|
||||
|
||||
|
||||
synchro.registerCallback('Offline', () => {
|
||||
this.platform.ready().then(() => {
|
||||
this.onlinecheck = false;
|
||||
this.taskslist = new Array();
|
||||
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.LoadList()
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.taskslist = new Array();
|
||||
this.sqliteservice.getprocessByworkflow("Expediente").then((expediente: any[]) => {
|
||||
console.log("All expedientes from local,", expediente)
|
||||
|
||||
expediente.forEach((element) => {
|
||||
|
||||
@@ -168,12 +177,9 @@ export class ExpedientePage implements OnInit {
|
||||
});
|
||||
|
||||
this.listToPresent = this.taskslist
|
||||
console.log("All expedientes from local,", expediente)
|
||||
|
||||
})
|
||||
console.log('Offlineee')
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user