Files
doneit-web/version/git-version.ts
T
Peter Maquiran e6fc2f19f2 add go back
2023-06-11 15:59:05 +01:00

12 lines
41 KiB
TypeScript

export let versionData = {
"shortSHA": "acb79bb62",
"SHA": "acb79bb62e2a6ce2862e0b0115065f405cd4be2e",
"branch": "feature/gabinete-search",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Sun Jun 11 13:36:27 2023 +0100'",
"lastCommitMessage": "remove sqlite and unused import",
"lastCommitNumber": "4975",
"change": "diff --git a/src/app/pages/events/events.page.html b/src/app/pages/events/events.page.html\nindex ed8137bc1..b9b08179b 100644\n--- a/src/app/pages/events/events.page.html\n+++ b/src/app/pages/events/events.page.html\n@@ -26,7 +26,7 @@\n \n <div class=\"main-content justify-center d-flex height-100\"> \n <div class=\"box-container width-100 d-flex mx-20\" style=\"padding: 0px;overflow: hidden;\">\n- <ion-progress-bar type=\"indeterminate\" *ngIf=\"loadingAllTask\"></ion-progress-bar>\n+ <ion-progress-bar type=\"indeterminate\" *ngIf=\"loadingAllTask || TaskService.showLoader\"></ion-progress-bar>\n <div class=\"px-20 pb-20\">\n <p class=\"time ion-text-left \">{{customDate}}</p>\n <div class=\"wrap d-flex float-left\">\ndiff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts\nindex 6d742e2ec..8b42f02e2 100644\n--- a/src/app/pages/events/events.page.ts\n+++ b/src/app/pages/events/events.page.ts\n@@ -72,6 +72,10 @@ export class EventsPage implements OnInit {\n searchSubject: string = '';\n AllProcess = []\n ordinance: string = 'old'\n+ listSubscription : {\n+ delete(): void;\n+ }\n+\n \n constructor(\n private eventService: EventsService,\n@@ -87,12 +91,7 @@ export class EventsPage implements OnInit {\n private changeProfileService: ChangeProfileService,\n public TaskService: TaskService\n ) {\n-\n \n-\n- this.loadAllTask();\n- \n-\n window['zipPhoneCallback'] = function (zipphone) {\n var frame = document.getElementById('home-iframe');\n if(frame) {\n@@ -101,18 +100,30 @@ export class EventsPage implements OnInit {\n }\n \n this.changeProfileService.registerCallback(() => {\n-\n this.listToPresent = [];\n this.listToPresentexpediente = []\n })\n \n- this.TaskService.registerCallback({\n+ }\n+\n+ ngAfterViewInit(): void {\n+ \n+\n+ this.loadAllTask();\n+\n+ this.listSubscription = this.TaskService.registerCallback({\n id: import.meta.url,\n funx:() => {\n this.dynamicSearch()\n }\n })\n+ \n+ this.dynamicSearch()\n+ \n+ }\n \n+ ngOnDestroy() {\n+ this.listSubscription.delete()\n }\n \n ngOnInit() {\n@@ -170,6 +181,7 @@ export class EventsPage implements OnInit {\n async loadAllTask() {\n this.loadingAllTask = true\n await this.TaskService.LoadTask()\n+ this.dynamicSearch()\n this.loadingAllTask = false\n }\n \ndiff --git a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts\nindex 892b94fd2..f6e2a1b0e 100644\n--- a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts\n+++ b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts\n@@ -403,7 +403,7 @@ export class DespachoPrPage implements OnInit {\n }\n \n this.TaskService.loadDiplomas()\n- // this.goBack();\n+ this.goBack();\n }\n });\n }\ndiff --git a/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts b/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts\nindex 8905599b6..7e6d25901 100644\n--- a/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts\n+++ b/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts\n@@ -1,8 +1,8 @@\n import { Component, OnDestroy, OnInit } from '@angular/core';\n import { ActivatedRoute, NavigationStart, Router } from '@angular/router';\n import { ProcessesService } from 'src/app/services/processes.service';\n-\n import { BackgroundService } from 'src/app/services/background.service';\n+import { ThemeService } from 'src/app/services/theme.service'\n import { PermissionService } from 'src/app/services/permission.service';\n import { DeplomasStore } from 'src/app/store/deplomas.service';\n import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';\n@@ -39,6 +39,7 @@ export class DiplomasPage implements OnInit, OnDestroy {\n private router: Router,\n private activatedRoute: ActivatedRoute,\n private backgroundservice: BackgroundService,\n+ public ThemeService: ThemeService,\n public p: PermissionService,\n public TaskService: TaskService,\n private RouteService: RouteService,\ndiff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html\nindex c74dd8ef6..422452bea 100644\n--- a/src/app/pages/gabinete-digital/gabinete-digital.page.html\n+++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html\n@@ -278,7 +278,6 @@\n <span class=\"title1\" *ngIf=\"AllProcess.length > 1\">Documentos</span>\n </p>\n </div>\n-\n <!-- List -->\n <div *ngIf=\"p.userPermission([p.permissionList.Gabinete.md_tasks, p.permissionList.Gabinete.pr_tasks])\" (click)=\"openDespachosPrPage(); selectedElement='showDespachosPr'\" [class.active]=\"selectedElement == 'showDespachosPr'\" class=\"box-hover exp-card-long width-100 d-flex flex-column justify-center\">\n <div class=\"center-div\">\n@@ -665,21 +664,21 @@\n <!-- Aside right -->\n <div class=\"aside-content d-none flex-column height-100\">\n \n- <app-empty-container [texto]=\"emptyTextDescription\" [style.display]=\"showEmptyContainer ? 'flex' : 'none'\" class=\"height-100 flex-column\"></app-empty-container>\n- <app-all-processes [profile]=\"profile\" class=\" height-100 flex-column\" [style.display]=\"showAllProcesses ? 'flex' : 'none'\" ></app-all-processes>\n- <app-events-to-approve [profile]=\"'MDGPR'\" [style.display]=\"showEventsToApprove ? 'flex' : 'none'\" class=\" height-100 flex-column\"></app-events-to-approve>\n-\n- <app-expedients [profile]=\"profile\" class=\" height-100 flex-column\" [style.display]=\"showExpedients ? 'flex' : 'none'\" ></app-expedients>\n- <app-pedidos [profile]=\"profile\" [segment]=\"segment\" [serialNumber]=\"serialNumber\" class=\" height-100 flex-column\" [style.display]=\"showPedidos ? 'flex' : 'none'\"></app-pedidos>\n- <app-despachos [profile]=\"profile\" class=\"height-100 flex-column\" [style.display]=\"showDespachos ? 'flex' : 'none'\" ></app-despachos>\n- <app-despachos-pr [profile]=\"profile\" class=\" height-100 flex-column\" [style.display]=\"showDespachosPr ? 'flex' : 'none'\" ></app-despachos-pr>\n- <app-pendentes [profile]=\"profile\" class=\" height-100 flex-column\" [style.display]=\"showPendentes ? 'flex' : 'none'\" ></app-pendentes>\n- <app-diplomas (openExpedientDetail)=\"openExpedientesPrPage($event)\" [profile]=\"profile\" [segment]=\"segment\" class=\" height-100 flex-column\" [style.display]=\"showDiplomas ? 'flex' : 'none'\"></app-diplomas>\n- <app-diplomas-assinar class=\" height-100 flex-column\" [style.display]=\"showDiplomasAssinar ? 'flex' : 'none'\"></app-diplomas-assinar>\n- <app-expedientes-pr [profile]=\"profile\" class=\" height-100 flex-column\" [style.display]=\"showExpedientesPr ? 'flex' : 'none'\" ></app-expedientes-pr>\n- <app-signed-diploma [profile]=\"profile\" class=\" height-100 flex-column\" [style.display]=\"showSignedDiploma ? 'flex' : 'none'\" ></app-signed-diploma>\n-\n- <app-diplomas-gerars [profile]=\"profile\" class=\"height-100 flex-column\" [style.display]=\"showDiplomasGerar ? 'flex' : 'none'\"></app-diplomas-gerars>\n+ <app-empty-container [texto]=\"emptyTextDescription\" *ngIf=\"showEmptyContainer\" [style.display]=\"showEmptyContainer ? 'flex' : 'none'\" class=\"height-100 flex-column\"></app-empty-container>\n+ <app-all-processes [profile]=\"profile\" class=\" height-100 flex-column\" *ngIf=\"showAllProcesses\" [style.display]=\"showAllProcesses ? 'flex' : 'none'\" ></app-all-processes>\n+ <app-events-to-approve [profile]=\"'MDGPR'\" *ngIf=\"showEventsToApprove\" [style.display]=\"showEventsToApprove ? 'flex' : 'none'\" class=\" height-100 flex-column\"></app-events-to-approve>\n+\n+ <app-expedients [profile]=\"profile\" class=\" height-100 flex-column\" *ngIf=\"showExpedients\" [style.display]=\"showExpedients ? 'flex' : 'none'\" ></app-expedients>\n+ <app-pedidos [profile]=\"profile\" [segment]=\"segment\" [serialNumber]=\"serialNumber\" class=\" height-100 flex-column\" *ngIf=\"showPedidos\" [style.display]=\"showPedidos ? 'flex' : 'none'\"></app-pedidos>\n+ <app-despachos [profile]=\"profile\" class=\"height-100 flex-column\" *ngIf=\"showDespachos\" [style.display]=\"showDespachos ? 'flex' : 'none'\" ></app-despachos>\n+ <app-despachos-pr [profile]=\"profile\" class=\" height-100 flex-column\" *ngIf=\"showDespachosPr\" [style.display]=\"showDespachosPr ? 'flex' : 'none'\" ></app-despachos-pr>\n+ <app-pendentes [profile]=\"profile\" class=\" height-100 flex-column\" *ngIf=\"showPendentes\" [style.display]=\"showPendentes ? 'flex' : 'none'\" ></app-pendentes>\n+ <app-diplomas (openExpedientDetail)=\"openExpedientesPrPage($event)\" [profile]=\"profile\" [segment]=\"segment\" class=\" height-100 flex-column\" *ngIf=\"showDiplomas\" [style.display]=\"showDiplomas ? 'flex' : 'none'\"></app-diplomas>\n+ <app-diplomas-assinar class=\" height-100 flex-column\" *ngIf=\"showDiplomasAssinar\" [style.display]=\"showDiplomasAssinar ? 'flex' : 'none'\"></app-diplomas-assinar>\n+ <app-expedientes-pr [profile]=\"profile\" class=\" height-100 flex-column\" *ngIf=\"showExpedientesPr\" [style.display]=\"showExpedientesPr ? 'flex' : 'none'\" ></app-expedientes-pr>\n+ <app-signed-diploma [profile]=\"profile\" class=\" height-100 flex-column\" *ngIf=\"showSignedDiploma\" [style.display]=\"showSignedDiploma ? 'flex' : 'none'\" ></app-signed-diploma>\n+\n+ <app-diplomas-gerars [profile]=\"profile\" class=\"height-100 flex-column\" *ngIf=\"showDiplomasGerar\" [style.display]=\"showDiplomasGerar ? 'flex' : 'none'\"></app-diplomas-gerars>\n </div>\n </div>\n </ion-content>\ndiff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts\nindex efe2b1922..dd5789f21 100644\n--- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts\n+++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts\n@@ -121,39 +121,8 @@ export class GabineteDigitalPage implements OnInit {\n }\n }\n \n- this.checkRoutes();\n-\n \n // fix with many timeout\n- setTimeout(() => {\n- this.dynamicSearch()\n- }, 2000)\n- // setTimeout(() => {\n- // this.dynamicSearch()\n- // }, 4000)\n- setTimeout(() => {\n- this.dynamicSearch()\n- }, 6000)\n- setTimeout(() => {\n- this.dynamicSearch()\n- }, 10000)\n- setTimeout(() => {\n- this.dynamicSearch()\n- }, 14000)\n- setTimeout(() => {\n- this.dynamicSearch()\n- }, 18000)\n- setTimeout(() => {\n-\n- this.dynamicSearch()\n-\n- this.TaskService.registerCallback({\n- id: import.meta.url,\n- funx:() => {\n- this.dynamicSearch()\n- }\n- })\n- }, 20000)\n \n }\n \n@@ -223,9 +192,34 @@ export class GabineteDigitalPage implements OnInit {\n this.segmentVista = \"boxview\"\n }\n \n- this.LoadCounts();\n- this.checkFilter();\n+\n+ this.hideRefreshButton();\n+ \n+ }\n+\n+ ngAfterViewInit(): void {\n+ // We can access the TestComponent now that this portion of the view tree has been initiated.\n+ const element = this.scroll.nativeElement\n+ this.scroll.nativeElement.addEventListener(\"scroll\", (e)=> {\n+ this.changeTab()\n+ });\n+\n \n+ (async () => {\n+ await this.loadAllProcesses()\n+ this.TaskService.registerCallback({\n+ id: import.meta.url,\n+ funx:() => {\n+ this.dynamicSearch()\n+ }\n+ })\n+ })();\n+\n+ this.checkFilter();\n+ this.checkRoutes();\n+ this.dynamicSearch()\n+\n+\n const pathname = '/home/gabinete-digital'\n this.router.events.forEach((event) => {\n if (event instanceof NavigationEnd && event.url.includes(pathname) && !event.url.includes('/home/gabinete-digital/')) {\n@@ -246,17 +240,7 @@ export class GabineteDigitalPage implements OnInit {\n }\n });\n \n- this.checkRoutes()\n- this.hideRefreshButton();\n- \n- }\n \n- ngAfterViewInit(): void {\n- // We can access the TestComponent now that this portion of the view tree has been initiated.\n- const element = this.scroll.nativeElement\n- this.scroll.nativeElement.addEventListener(\"scroll\", (e)=> {\n- this.changeTab()\n- });\n }\n \n functionTimer1 = null;\n@@ -292,9 +276,6 @@ export class GabineteDigitalPage implements OnInit {\n \n } \n \n- async loadAllProcesses() {\n- this.LoadCounts();\n- }\n \n \n goto(url) {\n@@ -417,11 +398,13 @@ export class GabineteDigitalPage implements OnInit {\n }\n else if (this.router.url == '/home/gabinete-digital?despachospr=true') {\n this.openDespachosPrPage('');\n- this.selectedElement = 'DispatchesPr'\n+ this.selectedElement = 'showDespachosPr'\n }\n- else if (this.router.url == '/home/gabinete-digital?diplomas=true') {\n+ else if (this.router.url == '/home/gabinete-digital?diplomas=assinados') {\n+ this.openDiplomasPage('assinados');\n+ }\n+ else if (this.router.url == '/home/gabinete-digital?diplomas=validar') {\n this.openDiplomasPage('validar');\n- this.selectedElement = 'DiplomasPorValidar';\n }\n else if (this.router.url == '/home/gabinete-digital?diplomasassinar=true') {\n this.openDiplomasAssinarPage();\n@@ -464,17 +447,18 @@ export class GabineteDigitalPage implements OnInit {\n return Object.keys(this.loadProcess)\n }\n \n- async LoadCounts() {\n+ async loadAllProcesses() {\n \n // this.skeletonLoader = true\n await this.TaskService.LoadTask()\n+ this.dynamicSearch()\n // this.skeletonLoader = false\n }\n \n doRefresh(event) {\n \n \n- this.LoadCounts();\n+ this.loadAllProcesses();\n \n if (event) {\n setTimeout(() => {\n@@ -634,9 +618,11 @@ export class GabineteDigitalPage implements OnInit {\n let navigationExtras: NavigationExtras;\n \n if (segment == 'validar') {\n- navigationExtras = { queryParams: { \"validar\": true, } };\n+ navigationExtras = { queryParams: { \"diplomas\": 'validar', } };\n+ this.selectedElement = 'DiplomasPorValidar';\n } else if (segment == 'assinados') {\n- navigationExtras = { queryParams: { \"assinados\": true, } };\n+ this.selectedElement = 'DiplomasAssinados';\n+ navigationExtras = { queryParams: { \"diplomas\": 'assinados', } };\n }\n \n this.segment = segment;\n@@ -646,8 +632,6 @@ export class GabineteDigitalPage implements OnInit {\n }\n else {\n this.closeAllDesktopComponents();\n- this.segment = segment;\n- let navigationExtras: NavigationExtras = { queryParams: { \"diplomas\": true, } };\n this.router.navigate(['/home/gabinete-digital'], navigationExtras);\n this.showDiplomas = true;\n }\ndiff --git a/src/app/services/task.service.ts b/src/app/services/task.service.ts\nindex 0f6784f66..a78b1d467 100644\n--- a/src/app/services/task.service.ts\n+++ b/src/app/services/task.service.ts\n@@ -17,6 +17,7 @@ import { EventsService } from './events.service';\n import { SortService } from './functions/sort.service';\n import { customTask } from '../models/dailyworktask.model';\n import { Router } from '@angular/router';\n+import { v4 as uuidv4 } from 'uuid'\n \n @Injectable({\n providedIn: 'root'\n@@ -75,10 +76,21 @@ export class TaskService {\n this.updateAllProcess();\n this.updateCount()\n this.runCallback();\n+\n+ document.addEventListener('resume', function () {\n+ this.loadAllTask();\n+ });\n }\n \n- registerCallback({funx, id}) {\n+ registerCallback({funx, id = uuidv4()}) {\n+\n this.callbacks[id] = { funx, id}\n+ \n+ return {\n+ delete: ()=> {\n+ delete this.callbacks[id]\n+ }\n+ }\n }\n \n runCallback() {\ndiff --git a/src/app/shared/gabinete-digital/all-processes/all-processes.page.ts b/src/app/shared/gabinete-digital/all-processes/all-processes.page.ts\nindex 25536f35d..ab7c5e9c9 100644\n--- a/src/app/shared/gabinete-digital/all-processes/all-processes.page.ts\n+++ b/src/app/shared/gabinete-digital/all-processes/all-processes.page.ts\n@@ -29,47 +29,42 @@ export class AllProcessesPage implements OnInit {\n AllProcess = []\n ordinance: string = 'old'\n \n+ listSubscription : {\n+ delete(): void;\n+ }\n+\n+\n constructor(\n private router: Router,\n public ThemeService: ThemeService,\n public TaskService: TaskService,\n- private route: ActivatedRoute\n ) {}\n \n ngOnInit() {\n // this.updateAllProcess()\n this.checkFilter();\n+ }\n \n- this.router.events.forEach((event) => {\n- if (event instanceof NavigationEnd && event.url.includes('/home/gabinete-digital')) {\n- // this.refreshing();\n- this.checkFilter();\n- }\n- });\n-\n-\n- setTimeout(() => {\n- // this.miniSearch.addAll(this.TaskService.AllProcess)\n- // window['miniSearch'] = this.miniSearch\n-\n-\n- this.TaskService.registerCallback({\n- id: import.meta.url,\n- funx:() => {\n- this.dynamicSearch()\n- }\n- })\n- }, 10)\n-\n+ ngAfterViewInit(): void {\n \n- this.TaskService.registerCallback({\n+ this.listSubscription = this.TaskService.registerCallback({\n id: import.meta.url,\n funx:() => {\n+\n this.dynamicSearch()\n+ \n }\n })\n+\n+ this.dynamicSearch();\n+\n+ }\n+\n+ ngOnDestroy() {\n+ this.listSubscription.delete()\n }\n \n+\n openSearch() {\n // this.dynamicSearch()\n }\ndiff --git a/src/app/shared/gabinete-digital/despachos/despachos.page.ts b/src/app/shared/gabinete-digital/despachos/despachos.page.ts\nindex bd5d15481..70d3061b0 100644\n--- a/src/app/shared/gabinete-digital/despachos/despachos.page.ts\n+++ b/src/app/shared/gabinete-digital/despachos/despachos.page.ts\n@@ -20,6 +20,10 @@ export class DespachosPage implements OnInit {\n hideSearchBtn: boolean = false;\n ordinance: string = 'old'\n \n+ listSubscription : {\n+ delete(): void;\n+ }\n+\n constructor (\n private router: Router,\n private despachoRule: DespachoService,\n@@ -29,28 +33,23 @@ export class DespachosPage implements OnInit {\n \n ngOnInit() {\n \n- // this.LoadList();\n-\n- this.router.events.forEach((event) => {\n- if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?despachos=true')) {\n- this.LoadList()\n- }\n- });\n+ this.LoadList()\n \n- this.TaskService.despachoStore.registerCallback({\n+ this.listSubscription = this.TaskService.despachoStore.registerCallback({\n id: import.meta.url,\n funx:() => {\n \n- this.list = this.TaskService.despachoStore.list.filter(task => this.TaskService.filter(task, this.filterName))\n- \n+ this.dynamicSearch()\n }\n })\n-\n-\n this.dynamicSearch();\n \n }\n \n+ ngOnDestroy() {\n+ this.listSubscription.delete()\n+ }\n+\n reorderList(orderBy: string) {\n \n this.ordinance = orderBy;\ndiff --git a/src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts b/src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts\nindex f7d8bf85e..50fff9642 100644\n--- a/src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts\n+++ b/src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts\n@@ -28,28 +28,39 @@ export class DiplomasAssinarPage implements OnInit {\n hideSearchBtn: boolean = false;\n ordinance: string = 'old'\n \n+ listSubscription : {\n+ delete(): void;\n+ }\n \n constructor(\n- private processes:ProcessesService,\n private router: Router,\n- private sortService: SortService,\n public ThemeService: ThemeService,\n public TaskService: TaskService\n ) {}\n \n ngOnInit() {\n \n- // this.LoadList()\n+ this.dynamicSearch()\n+ this.LoadList()\n+\n \n- this.router.events.forEach((event) => {\n- if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) {\n- this.LoadList()\n+ this.listSubscription = this.deplomasStore.registerCallback({\n+ id: import.meta.url,\n+ funx:() => {\n+ \n+ this.dynamicSearch()\n+ \n }\n- });\n+ })\n+\n \n this.dynamicSearch()\n }\n \n+ ngOnDestroy() {\n+ this.listSubscription.delete()\n+ }\n+\n \n reorderList(orderBy: string) {\n \ndiff --git a/src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts b/src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts\nindex a1c226981..200fdb577 100644\n--- a/src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts\n+++ b/src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts\n@@ -29,29 +29,29 @@ export class DiplomasGerarPage implements OnInit {\n hideSearchBtn: boolean = false;\n ordinance: string = 'old'\n \n+ listSubscription : {\n+ delete(): void;\n+ }\n+\n constructor(\n- private processes:ProcessesService,\n private router: Router,\n- private sortService: SortService,\n public ThemeService: ThemeService,\n public TaskService: TaskService\n ) {}\n \n ngOnInit() {\n \n- this.router.events.forEach((event) => {\n- if (event instanceof NavigationStart && '/home/gabinete-digital/?gerarDiplomas=true'.startsWith(event.url)) {\n- if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {\n- this.LoadList()\n- this.dynamicSearch()\n- } else {\n- this.LoadList()\n- this.dynamicSearch()\n- }\n- }\n- });\n+ this.LoadList()\n+ this.dynamicSearch()\n \n+ this.listSubscription = this.deplomasStore.registerCallback({\n+ id: import.meta.url,\n+ funx:() => {\n \n+ this.dynamicSearch()\n+ \n+ }\n+ })\n \n }\n \ndiff --git a/src/app/shared/gabinete-digital/diplomas/diplomas.page.ts b/src/app/shared/gabinete-digital/diplomas/diplomas.page.ts\nindex 46eb6110b..fef8aea1b 100644\n--- a/src/app/shared/gabinete-digital/diplomas/diplomas.page.ts\n+++ b/src/app/shared/gabinete-digital/diplomas/diplomas.page.ts\n@@ -36,12 +36,14 @@ export class DiplomasPage implements OnInit {\n listDiplomasAssinadosPR = []\n hideSearchBtn: boolean = false;\n ordinance: string = 'old'\n+ \n+ listSubscription : {\n+ delete(): void;\n+ }\n \n constructor(\n- private processes:ProcessesService,\n private router: Router,\n public ThemeService: ThemeService,\n- private sortService: SortService,\n public p: PermissionService,\n public TaskService: TaskService\n ) {}\n@@ -50,20 +52,24 @@ export class DiplomasPage implements OnInit {\n // update list\n // this.LoadList()\n \n- this.router.events.forEach((event) => {\n- if (event instanceof NavigationStart && '/home/gabinete-digital?diplomas=true'.startsWith(event.url)) {\n- if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {\n- this.LoadList()\n- } else {\n- this.LoadList()\n- }\n+ this.LoadList()\n+ this.listSubscription = this.deplomasStore.registerCallback({\n+ id: import.meta.url,\n+ funx:() => {\n+\n+ this.dynamicSearch()\n+ \n }\n- });\n+ })\n \n \n this.dynamicSearch();\n }\n \n+ ngOnDestroy() {\n+ this.listSubscription.delete()\n+ }\n+\n \n reorderList(orderBy: string) {\n \ndiff --git a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\nindex 7274e8a4c..52afe71b3 100644\n--- a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n+++ b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n@@ -44,12 +44,15 @@ export class EventsToApprovePage implements OnInit {\n list = []\n hideSearchBtn: boolean = false;\n ordinance: string = 'old'\n- \n+ listSubscription : {\n+ delete(): void;\n+ }\n+\n+\n constructor(\n private processes:ProcessesService,\n private modalController: ModalController,\n private router: Router,\n- private userAuth: AuthService,\n private sortService: SortService,\n private storage: Storage,\n public eventService: EventsService,\n@@ -66,24 +69,23 @@ export class EventsToApprovePage implements OnInit {\n this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n }\n }\n+ this.LoadToApproveEvents()\n \n- // this.LoadToApproveEvents();\n+ this.listSubscription = this.eventoaprovacaostore.registerCallback({\n+ id: import.meta.url,\n+ funx:() => {\n \n- this.router.events.forEach((event) => {\n- if (event instanceof NavigationStart &&\n- '/home/gabinete-digital?eventos=true'.startsWith(event.url)) {\n-\n- if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {\n- this.LoadToApproveEvents()\n- } else {\n- this.LoadToApproveEvents()\n- }\n+ this.dynamicSearch()\n+ \n }\n- });\n+ })\n \n- this.dynamicSearch()\n+ this.dynamicSearch();\n }\n \n+ ngOnDestroy() {\n+ this.listSubscription.delete()\n+ }\n \n reorderList(orderBy: string) {\n \ndiff --git a/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts b/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts\nindex f032b281f..7af7b48ee 100644\n--- a/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts\n+++ b/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts\n@@ -36,6 +36,12 @@ export class ExpedientesPrPage implements OnInit {\n \n @Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();\n \n+ \n+ listSubscription : {\n+ delete(): void;\n+ }\n+\n+ \n constructor(\n private processes:ProcessesService,\n private router: Router,\n@@ -48,28 +54,22 @@ export class ExpedientesPrPage implements OnInit {\n \n ngOnInit() {\n \n- // this.LoadList()\n-\n- this.router.events.forEach((event) => {\n- if (event instanceof NavigationStart &&\n- event.url.startsWith('/home/gabinete-digital?expedientespr=true') ||\n- event instanceof NavigationStart &&\n- event.url.startsWith('/home/gabinete-digital?expedientes-pr=true' ) ||\n- event instanceof NavigationStart &&\n- event.url.startsWith('/home/gabinete-digital?expedientes=true' )) {\n-\n- if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {\n- this.refreshing()\n- } else {\n- this.LoadList()\n- }\n+ this.LoadList()\n+\n+ this.listSubscription = this.expedienteGdStore.registerCallback({\n+ id: import.meta.url,\n+ funx:() => {\n+\n+ this.dynamicSearch()\n }\n- });\n+ })\n+ this.dynamicSearch();\n \n- this.dynamicSearch()\n }\n \n-\n+ ngOnDestroy() {\n+ this.listSubscription.delete()\n+ }\n \n reorderList(orderBy: string) {\n \ndiff --git a/src/app/shared/gabinete-digital/expedients/expedients.page.ts b/src/app/shared/gabinete-digital/expedients/expedients.page.ts\nindex 527d9241e..a3e1209d1 100644\n--- a/src/app/shared/gabinete-digital/expedients/expedients.page.ts\n+++ b/src/app/shared/gabinete-digital/expedients/expedients.page.ts\n@@ -30,13 +30,16 @@ export class ExpedientsPage implements OnInit {\n list = []\n hideSearchBtn: boolean = false;\n ordinance: string = 'old'\n+ listSubscription : {\n+ delete(): void;\n+ }\n+\n \n constructor(\n private processes: ProcessesService,\n private router: Router,\n public ThemeService: ThemeService,\n private sortService: SortService,\n- private storage: Storage,\n private eventTriger: EventTrigger,\n public TaskService: TaskService\n ) {\n@@ -53,20 +56,24 @@ export class ExpedientsPage implements OnInit {\n ngOnInit() {\n //Inicializar segment\n this.segment = \"expedientes\";\n- // this.LoadList()\n+ this.LoadList()\n \n- this.router.events.forEach((event) => {\n- if (event instanceof NavigationStart &&\n- event.url.startsWith('/home/gabinete-digital?expedientes=true')) {\n- this.LoadList()\n- }\n- });\n \n- this.dynamicSearch()\n+ this.listSubscription = this.expedientegbstore.registerCallback({\n+ id: import.meta.url,\n+ funx:() => {\n \n- }\n+ this.dynamicSearch()\n+ }\n+ })\n+ \n+ this.dynamicSearch();\n \n+ }\n \n+ ngOnDestroy() {\n+ this.listSubscription.delete()\n+ }\n \n reorderList(orderBy: string) {\n \ndiff --git a/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts b/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts\nindex ae3320bb0..cbdfeeb6d 100644\n--- a/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts\n+++ b/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts\n@@ -48,6 +48,11 @@ export class PedidosPage implements OnInit {\n hideSearchBtn: boolean = false;\n ordinance: string = 'old'\n \n+ listSubscription : {\n+ delete(): void;\n+ }\n+\n+\n constructor(\n private router: Router,\n private processes:ProcessesService,\n@@ -61,23 +66,16 @@ export class PedidosPage implements OnInit {\n \n ngOnInit() {\n \n- this.router.events.forEach((event) => {\n- if(event instanceof NavigationStart && '/home/gabinete-digital?parecer=true'.startsWith(event.url) ||\n- event instanceof NavigationStart && '/home/gabinete-digital?deferimento=true'.startsWith(event.url) ||\n- event instanceof NavigationStart && '/home/gabinete-digital?pedidos=true'.startsWith(event.url)\n- ) {\n+ this.LoadList()\n \n- if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {\n- this.LoadList()\n- } else {\n- this.LoadList()\n- }\n+ this.listSubscription = this.pedidosstore.registerCallback({\n+ id: import.meta.url,\n+ funx:() => {\n \n+ this.dynamicSearch()\n }\n- });\n-\n-\n- this.dynamicSearch()\n+ })\n+ this.dynamicSearch();\n \n }\n \ndiff --git a/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts b/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts\nindex e25750d28..ad5fad2e5 100644\n--- a/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts\n+++ b/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts\n@@ -35,32 +35,38 @@ export class PendentesPage implements OnInit {\n hideSearchBtn: boolean = false;\n ordinance: string = 'old'\n \n+ listSubscription : {\n+ delete(): void;\n+ }\n+\n+\n constructor(\n private processes:ProcessesService,\n private router: Router,\n private sortService: SortService,\n private storage: Storage,\n public TaskService: TaskService, \n- public ThemeService: ThemeService\n- ) {\n+ public ThemeService: ThemeService) {\n this.loggeduser = SessionStore.user;\n }\n \n ngOnInit() {\n \n- this.router.events.forEach((event) => {\n- if (event instanceof NavigationStart &&\n- event.url.startsWith('/home/gabinete-digital?pendentes=true')) {\n- if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {\n- this.LoadList()\n- } else {\n- this.LoadList()\n- }\n+ this.LoadList()\n+\n+ this.listSubscription = this.pendentesstore.registerCallback({\n+ id: import.meta.url,\n+ funx:() => {\n+\n+ this.dynamicSearch()\n }\n+ })\n+ this.dynamicSearch();\n \n- });\n+ }\n \n- this.dynamicSearch()\n+ ngOnDestroy() {\n+ this.listSubscription.delete()\n }\n \n reorderList(orderBy: string) {\ndiff --git a/src/app/store/deplomas.service.ts b/src/app/store/deplomas.service.ts\nindex f8d61c518..e2c51ce24 100644\n--- a/src/app/store/deplomas.service.ts\n+++ b/src/app/store/deplomas.service.ts\n@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';\n import { localstoreService } from './localstore.service'\n import { AES, enc, SHA1 } from 'crypto-js'\n import { momentG } from 'src/plugin/momentG';\n+import { v4 as uuidv4 } from 'uuid'\n @Injectable({\n providedIn: 'root'\n })\n@@ -66,8 +67,15 @@ export class DeplomasService {\n \n }\n \n- registerCallback({funx, id}) {\n+ registerCallback({funx, id = uuidv4()}) {\n+\n this.callbacks[id] = { funx, id}\n+\n+ return {\n+ delete: ()=> {\n+ delete this.callbacks[id]\n+ }\n+ }\n }\n \n runCallback() {\ndiff --git a/src/app/store/despacho-store.service.ts b/src/app/store/despacho-store.service.ts\nindex c3d1001eb..243f904a7 100644\n--- a/src/app/store/despacho-store.service.ts\n+++ b/src/app/store/despacho-store.service.ts\n@@ -4,6 +4,8 @@ import { SHA1 } from 'crypto-js'\n import { customTask } from '../models/dailyworktask.model';\n import { ObjectQueryService } from '../services/object-query.service';\n import { momentG } from 'src/plugin/momentG';\n+import { v4 as uuidv4 } from 'uuid'\n+\n @Injectable({\n providedIn: 'root'\n })\n@@ -41,8 +43,15 @@ export class DespachoStoreService {\n \n }\n \n- registerCallback({funx, id}) {\n+ registerCallback({funx, id = uuidv4()}) {\n+\n this.callbacks[id] = { funx, id}\n+\n+ return {\n+ delete: ()=> {\n+ delete this.callbacks[id]\n+ }\n+ }\n }\n \n \ndiff --git a/src/app/store/despachospr-store.service.ts b/src/app/store/despachospr-store.service.ts\nindex 82c25fa12..5a3fa23fd 100644\n--- a/src/app/store/despachospr-store.service.ts\n+++ b/src/app/store/despachospr-store.service.ts\n@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';\n import { localstoreService } from './localstore.service'\n import { AES, enc, SHA1 } from 'crypto-js'\n import { momentG } from 'src/plugin/momentG';\n+import { v4 as uuidv4 } from 'uuid'\n \n @Injectable({\n providedIn: 'root'\n@@ -34,8 +35,15 @@ constructor() {\n \n }\n \n-registerCallback({funx, id}) {\n+registerCallback({funx, id = uuidv4()}) {\n+\n this.callbacks[id] = { funx, id}\n+\n+ return {\n+ delete: ()=> {\n+ delete this.callbacks[id]\n+ }\n+ }\n }\n \n runCallback() {\ndiff --git a/src/app/store/eventoaprovacao-store.service.ts b/src/app/store/eventoaprovacao-store.service.ts\nindex 60d4181c5..648c5a9ef 100644\n--- a/src/app/store/eventoaprovacao-store.service.ts\n+++ b/src/app/store/eventoaprovacao-store.service.ts\n@@ -4,6 +4,7 @@ import { AES, enc, SHA1 } from 'crypto-js'\n import { isArray } from 'ionic-angular/umd/util/util';\n import { EventoApprovePipe } from 'src/app/pipes/evento-approve.pipe'\n import { momentG } from 'src/plugin/momentG';\n+import { v4 as uuidv4 } from 'uuid'\n \n @Injectable({\n providedIn: 'root'\n@@ -49,8 +50,15 @@ export class EventoaprovacaoStoreService {\n }\n \n \n- registerCallback({funx, id}) {\n+ registerCallback({funx, id = uuidv4()}) {\n+\n this.callbacks[id] = { funx, id}\n+\n+ return {\n+ delete: ()=> {\n+ delete this.callbacks[id]\n+ }\n+ }\n }\n \n runCallback() {\ndiff --git a/src/app/store/expedientegd-store.service.ts b/src/app/store/expedientegd-store.service.ts\nindex a8aabc7b8..8fa3ae1c5 100644\n--- a/src/app/store/expedientegd-store.service.ts\n+++ b/src/app/store/expedientegd-store.service.ts\n@@ -3,6 +3,7 @@ import { localstoreService } from './localstore.service'\n import { SHA1 } from 'crypto-js'\n import { ExpedienteTask } from '../models/dailyworktask.model';\n import { momentG } from 'src/plugin/momentG';\n+import { v4 as uuidv4 } from 'uuid'\n \n @Injectable({\n providedIn: 'root'\n@@ -38,8 +39,15 @@ export class ExpedientegdStoreService {\n \n }\n \n- registerCallback({funx, id}) {\n+ registerCallback({funx, id = uuidv4()}) {\n+\n this.callbacks[id] = { funx, id}\n+\n+ return {\n+ delete: ()=> {\n+ delete this.callbacks[id]\n+ }\n+ }\n }\n \n runCallback() {\ndiff --git a/src/app/store/pedidos-store.service.ts b/src/app/store/pedidos-store.service.ts\nindex 2ef807a83..27a918954 100644\n--- a/src/app/store/pedidos-store.service.ts\n+++ b/src/app/store/pedidos-store.service.ts\n@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';\n import { localstoreService } from './localstore.service'\n import { AES, enc, SHA1 } from 'crypto-js'\n import { momentG } from 'src/plugin/momentG';\n+import { v4 as uuidv4 } from 'uuid'\n \n @Injectable({\n providedIn: 'root'\n@@ -47,10 +48,18 @@ export class PedidosStoreService {\n \n }\n \n- registerCallback({funx, id}) {\n+ registerCallback({funx, id = uuidv4()}) {\n+\n this.callbacks[id] = { funx, id}\n+\n+ return {\n+ delete: ()=> {\n+ delete this.callbacks[id]\n+ }\n+ }\n }\n \n+\n runCallback() {\n for (const [key, value] of Object.entries(this.callbacks)) {\n value.funx()\ndiff --git a/src/app/store/pendestes-store.service.ts b/src/app/store/pendestes-store.service.ts\nindex c51c1ef50..130e4bc8b 100644\n--- a/src/app/store/pendestes-store.service.ts\n+++ b/src/app/store/pendestes-store.service.ts\n@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';\n import { localstoreService } from './localstore.service'\n import { AES, enc, SHA1 } from 'crypto-js'\n import { momentG } from 'src/plugin/momentG';\n-\n+import { v4 as uuidv4 } from 'uuid'\n @Injectable({\n providedIn: 'root'\n })\n@@ -38,8 +38,15 @@ export class PendestesStoreService {\n \n }\n \n- registerCallback({funx, id}) {\n+ registerCallback({funx, id = uuidv4()}) {\n+\n this.callbacks[id] = { funx, id}\n+\n+ return {\n+ delete: ()=> {\n+ delete this.callbacks[id]\n+ }\n+ }\n }\n \n runCallback() {\ndiff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts\nindex 38a854fa6..5bb822335 100644\n--- a/src/environments/environment.prod.ts\n+++ b/src/environments/environment.prod.ts\n@@ -1,6 +1,6 @@\n import { Environment } from './../app/models/envarioment'\n import { oaprProd } from './suport/oapr'\n import { doneITProd } from './suport/doneIt'\n+import { DevDev } from './suport/dev'\n \n-\n-export const environment: Environment = doneITProd;\n\\ No newline at end of file\n+export const environment: Environment = DevDev;\n\\ No newline at end of file",
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/shared/gabinete-digital/despachos-pr/despachos-pr.page.ts\n\nChanges not staged for commit:\n (use \"git add <file>...\" to update what will be committed)\n (use \"git restore <file>...\" to discard changes in working directory)\n\tmodified: src/app/pages/events/events.page.html\n\tmodified: src/app/pages/events/events.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas/diplomas.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.ts\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas/diplomas.page.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n\tmodified: src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts\n\tmodified: src/app/shared/gabinete-digital/expedients/expedients.page.ts\n\tmodified: src/app/shared/gabinete-digital/pedidos/pedidos.page.ts\n\tmodified: src/app/shared/gabinete-digital/pendentes/pendentes.page.ts\n\tmodified: src/app/store/deplomas.service.ts\n\tmodified: src/app/store/despacho-store.service.ts\n\tmodified: src/app/store/despachospr-store.service.ts\n\tmodified: src/app/store/eventoaprovacao-store.service.ts\n\tmodified: src/app/store/expedientegd-store.service.ts\n\tmodified: src/app/store/pedidos-store.service.ts\n\tmodified: src/app/store/pendestes-store.service.ts\n\tmodified: src/environments/environment.prod.ts",
"changeAuthor": "peter.maquiran"
}