remove sqlite and unused import

This commit is contained in:
Peter Maquiran
2023-06-11 13:36:27 +01:00
parent f7b54a04ba
commit acb79bb62e
26 changed files with 438 additions and 1256 deletions
@@ -1,10 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ProcessesService } from 'src/app/services/processes.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { fullTask } from '../../../../models/dailyworktask.model';
import { ActivatedRoute, Router } from '@angular/router';
import { ActivatedRoute } from '@angular/router';
import { Event } from '../../../../models/event.model';
import { MenuController, ModalController, PopoverController } from '@ionic/angular';
@@ -16,11 +13,8 @@ import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { DespachosPrOptionsPage } from 'src/app/shared/popover/despachos-pr-options/despachos-pr-options.page';
import { ToastService } from 'src/app/services/toast.service';
import { Location } from '@angular/common'
import { DespachoService } from 'src/app/Rules/despacho.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { Platform } from '@ionic/angular';
import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@@ -51,20 +45,13 @@ export class DespachoPrPage implements OnInit {
constructor(
private activateRoute: ActivatedRoute,
private processes: ProcessesService,
private iab: InAppBrowser,
private attachmentsService: AttachmentsService,
private events: EventsService,
private menu: MenuController,
private router: Router,
private modalController: ModalController,
public popoverController: PopoverController,
private activatedRoute: ActivatedRoute,
private toastService: ToastService,
private location: Location,
private despachoService: DespachoService,
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private platform: Platform,
public ThemeService: ThemeService,
private RouteService: RouteService,
public p: PermissionService,
@@ -135,14 +122,14 @@ export class DespachoPrPage implements OnInit {
}
this.fulltask = res;
this.updateProcessOnDB(res);
// this.updateProcessOnDB(res);
console.log('this.fulltask', this.fulltask)
let thedate = new Date(this.task.CreateDate);
this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]);
this.processes.GetTaskParticipants(this.task.FolderId).subscribe(users => {
this.updateProcessInterveners(users)
// this.updateProcessInterveners(users)
this.intervenientes = users.filter(user => {
return user.Type == 'I';
});
@@ -172,19 +159,19 @@ export class DespachoPrPage implements OnInit {
});
}
updateProcessOnDB(res) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.updateProcess(res);
}
}
// updateProcessOnDB(res) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqliteservice.updateProcess(res);
// }
// }
updateProcessInterveners(users) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.updateProcessInterveners(JSON.stringify(this.serialNumber), JSON.stringify(users))
}
}
// updateProcessInterveners(users) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqliteservice.updateProcessInterveners(JSON.stringify(this.serialNumber), JSON.stringify(users))
// }
// }
getFromDB() {
@@ -7,14 +7,10 @@ import { ModalController } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
import { AuthService } from 'src/app/services/auth.service';
import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page';
import { LoginUserRespose } from 'src/app/models/user.model';
import { NavigationStart, Router } from '@angular/router';
import { __awaiter } from 'tslib';
import { DespachosprStore } from 'src/app/store/despachospr-store.service';
import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
@@ -70,9 +66,7 @@ export class DespachosPrPage implements OnInit {
private processes: ProcessesService,
private modalController: ModalController,
private alertService: AlertService,
private authService: AuthService,
private router: Router,
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private sortService: SortService,
public ThemeService: ThemeService,
@@ -1,6 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { ProcessesService } from 'src/app/services/processes.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ActivatedRoute } from '@angular/router';
import { Event } from '../../../../models/event.model';
import { MenuController, ModalController, PopoverController } from '@ionic/angular';
@@ -17,9 +16,6 @@ import { fullTask } from 'src/app/models/dailyworktask.model';
import { AttachmentList } from 'src/app/models/Excludetask';
import { PermissionService } from 'src/app/services/permission.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { SqliteService } from 'src/app/services/sqlite.service';
import { Platform } from '@ionic/angular';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@@ -55,7 +51,6 @@ export class DespachoPage implements OnInit {
constructor(private activateRoute: ActivatedRoute,
private processes: ProcessesService,
private iab: InAppBrowser,
private menu: MenuController,
private modalController: ModalController,
public popoverController: PopoverController,
@@ -64,8 +59,6 @@ export class DespachoPage implements OnInit {
private despachoService: DespachoService,
private RouteService: RouteService,
public p: PermissionService,
private sqliteservice: SqliteService,
private platform: Platform,
private backgroundservice: BackgroundService,
public ThemeService: ThemeService,
private httpErrorHandle: HttpErrorHandle,
@@ -133,14 +126,14 @@ export class DespachoPage implements OnInit {
"Deadline": res.deadline
}
this.updateProcessOnDB(res);
// this.updateProcessOnDB(res);
this.fulltask = res;
let thedate = new Date(this.task.CreateDate);
this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]);
this.processes.GetTaskParticipants(this.task.FolderID).subscribe(users => {
this.updateProcessInterveners(users)
// this.updateProcessInterveners(users)
this.intervenientes = users.filter(user => {
@@ -154,7 +147,7 @@ export class DespachoPage implements OnInit {
});
}, (error) => {
if (error.status == 0) {
this.getFromDb();
// this.getFromDb();
} else {
try {
this.goBack()
@@ -166,23 +159,23 @@ export class DespachoPage implements OnInit {
});
}
updateProcessOnDB(res) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.updateProcess(res);
}
}
// updateProcessOnDB(res) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqliteservice.updateProcess(res);
// }
// }
updateProcessInterveners(users) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.updateProcessInterveners(JSON.stringify(this.serialnumber), JSON.stringify(users))
}
}
// updateProcessInterveners(users) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqliteservice.updateProcessInterveners(JSON.stringify(this.serialnumber), JSON.stringify(users))
// }
// }
getFromDb() {
// getFromDb() {
}
// }
async viewDocument(docId: string, Document) {
@@ -1,11 +1,8 @@
import { Component, Input, OnInit } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
import { DailyWorkTask } from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { ModalController } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
import { DeplomasStore } from 'src/app/store/deplomas.service';
import { TaskService } from 'src/app/services/task.service'
@@ -37,10 +34,7 @@ export class DiplomasAssinarPage implements OnInit {
constructor(
private processes:ProcessesService,
private modalController: ModalController,
private alertService: AlertService,
private router: Router,
private sortService: SortService,
public ThemeService: ThemeService,
public TaskService: TaskService,
private RouteService: RouteService,) {
@@ -2,8 +2,6 @@ import { Component, Input, OnInit } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { ModalController } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
@@ -37,8 +35,6 @@ export class DiplomasGerarPage implements OnInit {
constructor(
private processes:ProcessesService,
private modalController: ModalController,
private alertService: AlertService,
private router: Router,
private sortService: SortService,
public ThemeService: ThemeService,
@@ -126,13 +126,13 @@ export class DiplomaPage implements OnInit {
"activityInstanceName": res.activityInstanceName,
}
this.fulltask = res;
this.updateProcessOnDB(res)
// this.updateProcessOnDB(res)
let thedate = new Date(this.task.CreateDate);
this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]);
this.processes.GetTaskParticipants(this.task.FolderId).subscribe(users => {
this.updateProcessInterveners(users)
// this.updateProcessInterveners(users)
this.intervenientes = users.filter(user => {
return user.Type == 'I';
});
@@ -157,18 +157,19 @@ export class DiplomaPage implements OnInit {
}
updateProcessOnDB(res) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.updateProcess(res);
}
}
updateProcessInterveners(users) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.updateProcessInterveners(JSON.stringify(this.serialNumber), JSON.stringify(users))
}
}
// updateProcessOnDB(res) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqliteservice.updateProcess(res);
// }
// }
// updateProcessInterveners(users) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqliteservice.updateProcessInterveners(JSON.stringify(this.serialNumber), JSON.stringify(users))
// }
// }
getFromDb() {
@@ -1,12 +1,8 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute, NavigationStart, Router } from '@angular/router';
import { DailyWorkTask } from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
import { PermissionService } from 'src/app/services/permission.service';
import { DeplomasStore } from 'src/app/store/deplomas.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
@@ -42,10 +38,7 @@ export class DiplomasPage implements OnInit, OnDestroy {
private processes: ProcessesService,
private router: Router,
private activatedRoute: ActivatedRoute,
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private sortService: SortService,
public ThemeService: ThemeService,
public p: PermissionService,
public TaskService: TaskService,
private RouteService: RouteService,
@@ -6,11 +6,8 @@ import { ModalController } from '@ionic/angular';
import { ApproveEventModalPage } from './approve-event-modal/approve-event-modal.page';
import { NavigationStart, Router } from '@angular/router';
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
import { Location } from '@angular/common';
import { SqliteService } from '../../../services/sqlite.service';
import { BackgroundService } from '../../../services/background.service';
import { Platform } from '@ionic/angular';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@@ -54,14 +51,10 @@ export class EventListPage implements OnInit {
private processes: ProcessesService,
private modalController: ModalController,
private router: Router,
private location: Location,
private sqliteservice: SqliteService,
private platform: Platform,
private sortService: SortService,
private backgroundservice: BackgroundService,
public ThemeService: ThemeService,
private RouteService: RouteService,
private storage: Storage,
public eventService: EventsService,
) { }
@@ -123,111 +123,111 @@ export class ExpedienteDetailPage implements OnInit {
this.toastService.presentToast('Não foi possível fazer login');
}
updateProcessDB(res) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.storage.set('expediente_details',res).then(() =>{
// updateProcessDB(res) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// this.storage.set('expediente_details',res).then(() =>{
})
} else {
this.sqliteservice.updateProcess(res)
}
}
// })
// } else {
// //this.sqliteservice.updateProcess(res)
// }
// }
getFromDB() {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.storage.get('expediente_details').then((process) => {
this.task = {
"SerialNumber": process.serialNumber,
"Folio": process.workflowInstanceDataFields.Subject,
"Senders": process.originator || process.originator,
"CreateDate": momentG(new Date(process.taskStartDate), 'yyyy-MM-dd HH:mm:ss'),
"DocumentURL": process.workflowInstanceDataFields.ViewerRequest,
"Remetente": process.workflowInstanceDataFields.Sender,
"Note": process.workflowInstanceDataFields.TaskMessage || process.workflowInstanceDataFields.Note,
"FolderId": process.workflowInstanceDataFields.FolderID,
"FsId": process.workflowInstanceDataFields.FsId,
"DocId": process.workflowInstanceDataFields.DocID,
"WorkflowName": process.workflowDisplayName,
"Status": process.workflowInstanceDataFields.Status,
"DispatchNumber": process.workflowInstanceDataFields.DispatchNumber,
"AttachmentsProcessLastInstanceID": process.workflowInstanceDataFields.AttachmentsProcessLastInstanceID,
"InstanceID": process.workflowInstanceDataFields.InstanceID
}
// getFromDB() {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// this.storage.get('expediente_details').then((process) => {
// this.task = {
// "SerialNumber": process.serialNumber,
// "Folio": process.workflowInstanceDataFields.Subject,
// "Senders": process.originator || process.originator,
// "CreateDate": momentG(new Date(process.taskStartDate), 'yyyy-MM-dd HH:mm:ss'),
// "DocumentURL": process.workflowInstanceDataFields.ViewerRequest,
// "Remetente": process.workflowInstanceDataFields.Sender,
// "Note": process.workflowInstanceDataFields.TaskMessage || process.workflowInstanceDataFields.Note,
// "FolderId": process.workflowInstanceDataFields.FolderID,
// "FsId": process.workflowInstanceDataFields.FsId,
// "DocId": process.workflowInstanceDataFields.DocID,
// "WorkflowName": process.workflowDisplayName,
// "Status": process.workflowInstanceDataFields.Status,
// "DispatchNumber": process.workflowInstanceDataFields.DispatchNumber,
// "AttachmentsProcessLastInstanceID": process.workflowInstanceDataFields.AttachmentsProcessLastInstanceID,
// "InstanceID": process.workflowInstanceDataFields.InstanceID
// }
this.fulltask = {
Documents: process.Documents,
actions: process.actions,
activityInstanceName: process.activityInstanceName,
formURL: process.formURL,
interveners: process.interveners,
originator: process.originator,
serialNumber: process.serialNumber,
taskStartDate: process.taskStartDate,
TaskStartDate: process.taskStartDate,
totalDocuments: process.totalDocuments,
workflowDisplayName: process.workflowDisplayName,
workflowID: process.workflowID,
workflowInstanceDataFields: process.workflowInstanceDataFields,
workflowInstanceFolio: process.workflowInstanceFolio,
workflowInstanceID: process.workflowInstanceID,
workflowName: process.workflowName,
}
})
} else {
this.platform.ready().then(() => {
this.onlinecheck = false;
this.sqliteservice.getProcessById(this.serialNumber).then((process) => {
// this.fulltask = {
// Documents: process.Documents,
// actions: process.actions,
// activityInstanceName: process.activityInstanceName,
// formURL: process.formURL,
// interveners: process.interveners,
// originator: process.originator,
// serialNumber: process.serialNumber,
// taskStartDate: process.taskStartDate,
// TaskStartDate: process.taskStartDate,
// totalDocuments: process.totalDocuments,
// workflowDisplayName: process.workflowDisplayName,
// workflowID: process.workflowID,
// workflowInstanceDataFields: process.workflowInstanceDataFields,
// workflowInstanceFolio: process.workflowInstanceFolio,
// workflowInstanceID: process.workflowInstanceID,
// workflowName: process.workflowName,
// }
// })
// } else {
// this.platform.ready().then(() => {
// this.onlinecheck = false;
// this.sqliteservice.getProcessById(this.serialNumber).then((process) => {
var workflow = JSON.parse(process[0].workflowInstanceDataFields);
var origina
if (process[0].originator === "undefined") {
origina = ""
} else {
origina = JSON.parse(process[0].originator)
}
// var workflow = JSON.parse(process[0].workflowInstanceDataFields);
// var origina
// if (process[0].originator === "undefined") {
// origina = ""
// } else {
// origina = JSON.parse(process[0].originator)
// }
this.task = {
"SerialNumber": process[0].serialNumber,
"Folio": workflow.Subject,
"Senders": origina.email || process[0].originator,
"CreateDate": momentG(new Date(process[0].taskStartDate), 'yyyy-MM-dd HH:mm:ss'),
"DocumentURL": workflow.ViewerRequest,
"Remetente": workflow.Sender,
"Note": workflow.TaskMessage || workflow.Note,
"FolderId": workflow.FolderID,
"FsId": workflow.FsId,
"DocId": workflow.DocID,
"WorkflowName": process[0].workflowDisplayName,
"Status": workflow.Status,
"DispatchNumber": workflow.DispatchNumber,
"AttachmentsProcessLastInstanceID": workflow.AttachmentsProcessLastInstanceID,
"InstanceID": workflow.InstanceID
}
// this.task = {
// "SerialNumber": process[0].serialNumber,
// "Folio": workflow.Subject,
// "Senders": origina.email || process[0].originator,
// "CreateDate": momentG(new Date(process[0].taskStartDate), 'yyyy-MM-dd HH:mm:ss'),
// "DocumentURL": workflow.ViewerRequest,
// "Remetente": workflow.Sender,
// "Note": workflow.TaskMessage || workflow.Note,
// "FolderId": workflow.FolderID,
// "FsId": workflow.FsId,
// "DocId": workflow.DocID,
// "WorkflowName": process[0].workflowDisplayName,
// "Status": workflow.Status,
// "DispatchNumber": workflow.DispatchNumber,
// "AttachmentsProcessLastInstanceID": workflow.AttachmentsProcessLastInstanceID,
// "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,
}
// 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,
// }
})
})
}
// })
// })
// }
}
// }
async approve(note: string, documents: any) {
@@ -382,7 +382,7 @@ export class ExpedienteDetailPage implements OnInit {
}
this.fulltask = res;
this.updateProcessDB(res)
// this.updateProcessDB(res)
let thedate = new Date(this.task.CreateDate);
this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]);
@@ -401,7 +401,7 @@ export class ExpedienteDetailPage implements OnInit {
}, (error) => {
if (error.status == 0) {
this.getFromDB();
// this.getFromDB();
} else {
try {
this.httpErroHandle.httpStatusHandle(error)
@@ -1,17 +1,13 @@
import { Component, OnInit } from '@angular/core';
import { ProcessesService } from 'src/app/services/processes.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ActivatedRoute } from '@angular/router';
import { Event } from '../../../../models/event.model';
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
import { MenuController, ModalController, PopoverController } from '@ionic/angular';
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
import { ExpedientTaskModalPage } from '../../expediente/expedient-task-modal/expedient-task-modal.page';
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { OptsExpedientePrPage } from 'src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page';
import { ToastService } from 'src/app/services/toast.service';
@@ -51,16 +47,11 @@ export class ExpedientePrPage implements OnInit {
constructor(
private processes: ProcessesService,
private iab: InAppBrowser,
private events: EventsService,
private menu: MenuController,
private modalController: ModalController,
public popoverController: PopoverController,
private activatedRoute: ActivatedRoute,
private userAuth: AuthService,
private animationController: AnimationController,
private toastService: ToastService,
private attachmentsService: AttachmentsService,
private RouteService: RouteService,
public ThemeService: ThemeService,
private httpErroHandle: HttpErrorHandle,
@@ -4,9 +4,7 @@ import { CalendarComponent } from 'ionic2-calendar';
import { ProcessesService } from 'src/app/services/processes.service';
import { ModalController } from '@ionic/angular';
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
import { AlertService } from 'src/app/services/alert.service';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { ThemeService } from 'src/app/services/theme.service'
@@ -46,8 +44,6 @@ export class ExpedientesPrPage implements OnInit {
constructor(
private processes:ProcessesService,
private modalController: ModalController,
private alertService: AlertService,
private authService: AuthService,
private router: Router,
private RouteService: RouteService,
public ThemeService: ThemeService,
@@ -1,7 +1,6 @@
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { ProcessesService } from 'src/app/services/processes.service';
import { ModalController } from '@ionic/angular';
import {NavigationEnd, NavigationExtras, Router, NavigationStart } from '@angular/router';
import {NavigationEnd, NavigationExtras, Router } from '@angular/router';
import { LoginUserRespose } from 'src/app/models/user.model';
import { ExpedientsPage } from 'src/app/shared/gabinete-digital/expedients/expedients.page';
@@ -10,21 +9,14 @@ import { EventsToApprovePage } from 'src/app/shared/gabinete-digital/events-to-a
import { WaitForDomService } from 'src/app/services/dom/wait-for-dom.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { DespachoService } from 'src/app/Rules/despacho.service';
import { PermissionService } from 'src/app/services/permission.service';
import { ThemeService } from 'src/app/services/theme.service';
import { SqliteService } from '../../services/sqlite.service';
import { Platform } from '@ionic/angular';
import { BackgroundService } from 'src/app/services/background.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { Storage } from '@ionic/storage';
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { SessionStore } from 'src/app/store/session.service';
import { NotificationsService } from 'src/app/services/notifications.service'
import { environment } from 'src/environments/environment';
import { EventsService } from 'src/app/services/events.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { TaskService } from 'src/app/services/task.service'
@Component({
@@ -108,21 +100,13 @@ export class GabineteDigitalPage implements OnInit {
@ViewChild('scroll') scroll: ElementRef;
constructor(
private processesbackend: ProcessesService,
private modalController: ModalController,
private router: Router,
public waitForDomService: WaitForDomService,
private despachoRule: DespachoService,
private sqliteservice: SqliteService,
private platform: Platform,
private backgroundservice: BackgroundService,
public ThemeService: ThemeService,
private sortService: SortService,
private storage: Storage,
public p: PermissionService,
public NotificationsService: NotificationsService,
public eventService: EventsService,
private httpErroHandle: HttpErrorHandle,
public TaskService: TaskService
) {
@@ -144,9 +128,9 @@ export class GabineteDigitalPage implements OnInit {
setTimeout(() => {
this.dynamicSearch()
}, 2000)
setTimeout(() => {
this.dynamicSearch()
}, 4000)
// setTimeout(() => {
// this.dynamicSearch()
// }, 4000)
setTimeout(() => {
this.dynamicSearch()
}, 6000)
@@ -1,9 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { ProcessesService } from 'src/app/services/processes.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ActivatedRoute, Router } from '@angular/router';
import { Event } from '../../../../models/event.model';
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
import { MenuController, ModalController, PopoverController } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
@@ -12,14 +11,11 @@ import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
import { DarParecerPage } from 'src/app/modals/dar-parecer/dar-parecer.page';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { RequestOptionsPage } from 'src/app/shared/popover/request-options/request-options.page';
import { AuthService } from 'src/app/services/auth.service';
import { LoginUserRespose } from 'src/app/models/user.model';
import { ToastService } from 'src/app/services/toast.service';
import { ForwardPage } from 'src/app/modals/forward/forward.page';
import { Platform } from '@ionic/angular';
import { PedidoService } from 'src/app/Rules/pedido.service';
import { SqliteService } from 'src/app/services/sqlite.service';
import { PedidoService } from 'src/app/Rules/pedido.service';
import { BackgroundService } from 'src/app/services/background.service';
import { PermissionService } from 'src/app/services/permission.service';
@@ -65,9 +61,7 @@ export class PedidoPage implements OnInit {
public p: PermissionService,
private RouteService: RouteService,
private pedidoService: PedidoService,
private sqliteservice: SqliteService,
private backgroundservices: BackgroundService,
private platform: Platform,
public ThemeService: ThemeService,
private dataService: DataService,
private htppErroHandle: HttpErrorHandle,
@@ -138,7 +132,7 @@ export class PedidoPage implements OnInit {
"Deadline": res.deadline,
}
this.updateProcess(res);
// this.updateProcess(res);
}
else if (res.workflowDisplayName == 'Pedido de Deferimento') {
@@ -163,7 +157,7 @@ export class PedidoPage implements OnInit {
"activityInstanceName": res.activityInstanceName,
"Status": res.workflowInstanceDataFields.Status,
}
this.updateProcess(res)
// this.updateProcess(res)
}
let thedate = new Date(res.taskStartDate);
@@ -171,7 +165,7 @@ export class PedidoPage implements OnInit {
this.processes.GetTaskParticipants(res.workflowInstanceDataFields.FolderID).subscribe((users = []) => {
this.updateProcessInterveners(users)
// this.updateProcessInterveners(users)
this.intervenientes = users.filter(user => {
return user.Type == 'I';
});
@@ -182,7 +176,7 @@ export class PedidoPage implements OnInit {
this.getDocumentDetails(res.workflowInstanceDataFields.FolderID, '361');
}, (error) => {
if (error.status == 0) {
this.getfromDb();
// this.getfromDb();
} else {
this.htppErroHandle.httpsSucessMessagge(error)
try {
@@ -200,22 +194,22 @@ export class PedidoPage implements OnInit {
return this.taskArrayActions.includes(str);
}
updateProcess(res) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.updateProcess(res);
}
}
// updateProcess(res) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqliteservice.updateProcess(res);
// }
// }
updateProcessInterveners(users) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.updateProcessInterveners(JSON.stringify(this.serialnumber), JSON.stringify(users));
}
}
// updateProcessInterveners(users) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqliteservice.updateProcessInterveners(JSON.stringify(this.serialnumber), JSON.stringify(users));
// }
// }
getfromDb() {
}
// getfromDb() {
// }
getDocumentDetails(forlderId: string, applicationId: string) {
this.processes.GetDocumentDetails(forlderId, applicationId).subscribe(res => {
@@ -190,7 +190,7 @@ export class PedidosPage implements OnInit {
let task = this.customTaskPipe.transform(element);
this.parecerList.push(task);
});
this.addPedidoToDb(this.parecerList);
// this.addPedidoToDb(this.parecerList);
this.listToPresentparecerList = this.sortService.sortDate(this.parecerList, 'CreateDate')
this.pedidosstorage.resetparecer(this.listToPresentparecerList);
@@ -221,7 +221,6 @@ export class PedidosPage implements OnInit {
this.deferimentoList.push(task);
}
});
this.addPedidoToDb(this.deferimentoList);
this.listToPresentdeferimentoList = this.sortService.sortDate(this.deferimentoList, 'CreateDate')
this.pedidosstorage.resetdeferimento(this.listToPresentdeferimentoList);
});
@@ -235,12 +234,12 @@ export class PedidosPage implements OnInit {
}
addPedidoToDb(pedido) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.addProcess(pedido);
}
}
// addPedidoToDb(pedido) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqliteservice.addProcess(pedido);
// }
// }
getFromDb() {
@@ -52,10 +52,6 @@ export class PendentesPage implements OnInit {
private processes: ProcessesService,
private alertService: AlertService,
private router: Router,
private authService: AuthService,
private activatedRoute: ActivatedRoute,
private sqliteservice: SqliteService,
private platform: Platform,
private backgroundservices: BackgroundService,
private sortService: SortService,
private storage: Storage,