mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Remove IBM push notification and jsonstore, added cordova notifications
This commit is contained in:
@@ -78,7 +78,7 @@ export class EventsPage implements OnInit {
|
||||
|
||||
loggeduser: LoginUserRespose;
|
||||
|
||||
existingScreenOrientation: string;
|
||||
/* existingScreenOrientation: string; */
|
||||
|
||||
constructor(
|
||||
private eventService: EventsService,
|
||||
@@ -97,8 +97,8 @@ export class EventsPage implements OnInit {
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.existingScreenOrientation = this.screenOrientation.type;
|
||||
console.log(this.existingScreenOrientation);
|
||||
/* this.existingScreenOrientation = this.screenOrientation.type;
|
||||
console.log(this.existingScreenOrientation); */
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -109,13 +109,7 @@ export class EventsPage implements OnInit {
|
||||
// console.log('Resize event detected');
|
||||
|
||||
});
|
||||
try {
|
||||
this.sqliteservice.databaseConn();
|
||||
} catch (error) {
|
||||
console.log("Error creating local database: ", error)
|
||||
}
|
||||
|
||||
|
||||
|
||||
window['zipPhoneCallback'] = function (zipphone) {
|
||||
var frame = document.getElementById('home-iframe');
|
||||
if(frame) {
|
||||
@@ -172,22 +166,22 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
|
||||
// Lock to portrait
|
||||
lockToPortrait() {
|
||||
/* lockToPortrait() {
|
||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);
|
||||
console.log('set');
|
||||
}
|
||||
} */
|
||||
|
||||
// Lock to landscape
|
||||
lockToLandscape() {
|
||||
/* lockToLandscape() {
|
||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
|
||||
}
|
||||
} */
|
||||
|
||||
// Unlock screen orientation
|
||||
unlockScreenOrientation() {
|
||||
/* unlockScreenOrientation() {
|
||||
this.screenOrientation.unlock();
|
||||
}
|
||||
} */
|
||||
|
||||
checkScreenOrientation() {
|
||||
/* checkScreenOrientation() {
|
||||
if (window.innerWidth < 701) {
|
||||
this.lockToPortrait();
|
||||
console.log('was here');
|
||||
@@ -196,7 +190,7 @@ export class EventsPage implements OnInit {
|
||||
else {
|
||||
this.unlockScreenOrientation();
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
async RefreshEvents() {
|
||||
this.currentEvent = "";
|
||||
@@ -329,6 +323,18 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
addProcessToDb(list) {
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
} else {
|
||||
if (list.length > 0) {
|
||||
list.forEach(element => {
|
||||
this.sqliteservice.addProcess(element)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getEventsFromLocalDb() {
|
||||
|
||||
let date = new Date();
|
||||
@@ -463,14 +469,7 @@ export class EventsPage implements OnInit {
|
||||
LoadList() {
|
||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
||||
console.log("Expediente", result);
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
|
||||
} else {
|
||||
result.forEach((element) => {
|
||||
this.sqliteservice.addProcess(element)
|
||||
})
|
||||
}
|
||||
this.addProcessToDb(result);
|
||||
|
||||
const ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user