This commit is contained in:
tiago.kayaya
2021-12-03 11:03:38 +01:00
7 changed files with 92 additions and 25 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'com.capacitorjs.app.testapp',
appName: 'capacitor-testapp',
webDir: 'build',
webDir: 'www',
plugins: {
SplashScreen: {
launchAutoHide: false,
+13
View File
@@ -8115,6 +8115,19 @@
}
}
},
"cordova-sqlite-storage": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cordova-sqlite-storage/-/cordova-sqlite-storage-6.0.0.tgz",
"integrity": "sha512-njRloA3AICaUFztKHXoFfVcwlL7zbvyFxtdZIkK7P+MA3umILXtSKhYAQkSe2GtHr0LBNzJI5xUUqAlZl/Js0A==",
"requires": {
"cordova-sqlite-storage-dependencies": "4.0.0"
}
},
"cordova-sqlite-storage-dependencies": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/cordova-sqlite-storage-dependencies/-/cordova-sqlite-storage-dependencies-4.0.0.tgz",
"integrity": "sha512-dTBxYaX/RGzH6+pp49o4sb3FuHCvhrssaKn1XMJ4LL3f9dnvz3rhFK2LdcWrdFkhOLOndnW/azUkbzZd+WWhRA=="
},
"core-js": {
"version": "3.18.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.1.tgz",
+1
View File
@@ -104,6 +104,7 @@
"cordova-plugin-okhttp": "^2.0.0",
"cordova-plugin-screen-orientation": "^3.0.2",
"cordova-res": "^0.15.3",
"cordova-sqlite-storage": "^6.0.0",
"cross-env": "^7.0.3",
"crypto-js": "^4.0.0",
"date-fns": "^2.17.0",
+3 -3
View File
@@ -183,7 +183,7 @@ export class HomePage implements OnInit {
JSON.parse(req).forEach(element => {
this.eventservice.editEvent(element, 2, 3).subscribe((res) => {
this.storage.remove('eventEdit')
this.sqliteservice.deleteEventTable();
//this.sqliteservice.deleteeventsTable();
console.log('eventEdit synchnize', res)
})
});
@@ -198,7 +198,6 @@ export class HomePage implements OnInit {
console.log('DELETE data SYNC', element)
this.eventservice.deleteEvent(element.eventid, element.eventDeleteType, element.calendarName).subscribe((res) => {
this.storage.remove('eventDelete')
this.sqliteservice.deleteEventTable();
console.log('eventDelete synchnize', res)
})
});
@@ -213,7 +212,6 @@ export class HomePage implements OnInit {
console.log('REVER data SYNC', element)
this.processservice.PostTaskAction(element).subscribe((res) => {
this.storage.remove('event-listRever')
this.sqliteservice.deleteEventTable();
console.log('event-listRever synchnize', res)
})
});
@@ -221,6 +219,8 @@ export class HomePage implements OnInit {
} catch (error) {
console.log('error event-list rever synch')
}
this.sqliteservice.deleteAllTables();
}
}
+13 -5
View File
@@ -197,10 +197,13 @@ export class EventsPage implements OnInit {
this.showLoader = true;
let date = new Date();
date.setMonth(date.getMonth() + 1);
let start = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
let end = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " 23:59:59";
let month = date.getMonth() + 1;
//date.setMonth(date.getMonth() + 1);
let start = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
console.log('Data start yahaya', start)
console.log('Data end yahaya', end)
if (this.loggeduser.Profile == 'MDGPR') {
@@ -368,8 +371,9 @@ export class EventsPage implements OnInit {
getEventsFromLocalDb() {
let date = new Date();
date.setMonth(date.getMonth() + 1);
let dateToday = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate();
let month = date.getMonth() + 1;
//date.setMonth(date.getMonth() + 1);
let dateToday = date.getFullYear() + "-" + month + "-" + date.getDate();
console.log('dateeeeee', dateToday)
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
@@ -420,6 +424,8 @@ export class EventsPage implements OnInit {
var expedientlist: any = new Array();
process.forEach((element) => {
if(JSON.parse(element.workflowInstanceDataFields).TaskMessage || JSON.parse(element.workflowInstanceDataFields).Note) {
let task = {
activityInstanceName: element.activityInstanceName,
deadline: null,
@@ -430,6 +436,8 @@ export class EventsPage implements OnInit {
workflowInstanceDataFields: JSON.parse(element.workflowInstanceDataFields)
}
expedientlist.push(task);
}
})
console.log('OFOFOFOOF22222', expedientlist)
@@ -148,6 +148,24 @@ export class ExpedienteDetailPage implements OnInit {
"InstanceID": workflow.InstanceID
}
this.fulltask = {
Documents: JSON.parse(process[0].Documents),
actions: JSON.parse(process[0].actions),
activityInstanceName: process[0].activityInstanceName,
formURL: process[0].formURL,
interveners: process[0].interveners,
originator: JSON.parse(process[0].originator),
serialNumber: process[0].serialNumber,
taskStartDate: process[0].taskStartDate,
totalDocuments: process[0].totalDocuments,
workflowDisplayName: process[0].workflowDisplayName,
workflowID: process[0].workflowID,
workflowInstanceDataFields: JSON.parse(process[0].workflowInstanceDataFields),
workflowInstanceFolio: process[0].workflowInstanceFolio,
workflowInstanceID: process[0].workflowInstanceID,
workflowName: process[0].workflowName,
}
})
})
}
@@ -341,7 +359,7 @@ export class ExpedienteDetailPage implements OnInit {
})
console.log('this.task', this.task.InstanceID)
console.log('this.task.DocumentURL', this.task.DocumentURL)
console.log('this.task.DocumentURL', this.fulltask)
}, (error) => {
@@ -615,21 +633,21 @@ export class ExpedienteDetailPage implements OnInit {
return await popover.present();
}
openNewGroupPage(task?:any){
openNewGroupPage() {
this.router.navigate(['/home/chat']);
this.dataService.set("newGroup", true);
if( window.innerWidth < 801){
if (window.innerWidth < 801) {
this.newGroup();
}
else{
else {
this.dataService.set("newGroup", true);
this.dataService.set("task", this.task);
this.dataService.set("newGroupName", this.task.Folio);
}
}
async newGroup(){
async newGroup() {
const modal = await this.modalController.create({
component: NewGroupPage,
cssClass: 'modal modal-desktop',
+29 -2
View File
@@ -516,9 +516,36 @@ export class SqliteService {
});
}
deleteEventTable() {
this.dbInstance.executeSql("delete from "+ this.events).then((res) => {
deleteAllTables() {
this.deleteeventsTable();
this.deleteallprocessTable();
this.deleteactionsTable();
this.deletepublicationsTable();
console.log('All tables deleted')
}
deleteeventsTable() {
return this.dbInstance.executeSql("DELETE from "+ this.events).then((res) => {
console.log('DELETE EVENT TABLE RESULT ', res)
});
}
deleteallprocessTable() {
return this.dbInstance.executeSql("DELETE from "+ this.allprocess).then((res) => {
console.log('DELETE ALLPROCESS TABLE RESULT ', res)
});
}
deleteactionsTable() {
return this.dbInstance.executeSql("DELETE from "+ this.actions).then((res) => {
console.log('DELETE actions TABLE RESULT ', res)
});
}
deletepublicationsTable() {
return this.dbInstance.executeSql("DELETE from "+ this.publications).then((res) => {
console.log('DELETE publications TABLE RESULT ', res)
});
}
}