mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Remove duplicate api calls
This commit is contained in:
@@ -68,7 +68,6 @@ export class DespachosPrPage implements OnInit {
|
|||||||
|
|
||||||
const location = window.location
|
const location = window.location
|
||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ export class DespachosPage implements OnInit {
|
|||||||
|
|
||||||
const location = window.location
|
const location = window.location
|
||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ export class DiplomasAssinarPage implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
const location = window.location
|
const location = window.location
|
||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
|
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ constructor(
|
|||||||
|
|
||||||
const location = window.location
|
const location = window.location
|
||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ export class EventListPage implements OnInit {
|
|||||||
|
|
||||||
const location = window.location
|
const location = window.location
|
||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
this.LoadToApproveEvents();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ export class ExpedientePage implements OnInit {
|
|||||||
const location = window.location
|
const location = window.location
|
||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
|
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ export class ExpedientesPrPage implements OnInit {
|
|||||||
const location = window.location
|
const location = window.location
|
||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
|
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ export class PedidosPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationStart && '/home/gabinete-digital/pedidos?parecer=true'.startsWith(event.url) ||
|
if(event instanceof NavigationStart && '/home/gabinete-digital/pedidos?parecer=true'.startsWith(event.url) ||
|
||||||
event instanceof NavigationStart && '/home/gabinete-digital/pedidos?deferimento=true'.startsWith(event.url)
|
event instanceof NavigationStart && '/home/gabinete-digital/pedidos?deferimento=true'.startsWith(event.url)
|
||||||
|
|||||||
@@ -16,12 +16,11 @@ import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
|||||||
})
|
})
|
||||||
export class DespachosPrPage implements OnInit {
|
export class DespachosPrPage implements OnInit {
|
||||||
|
|
||||||
customTaskPipe = new CustomTaskPipe()
|
customTaskPipe = new CustomTaskPipe()
|
||||||
skeletonLoader = true
|
skeletonLoader = true
|
||||||
|
|
||||||
|
loggeduser: User;
|
||||||
loggeduser: User;
|
despachosprstore = DespachosprStore;
|
||||||
despachosprstore = DespachosprStore;
|
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private processes:ProcessesService,
|
private processes:ProcessesService,
|
||||||
@@ -34,8 +33,6 @@ constructor (
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart &&
|
if (event instanceof NavigationStart &&
|
||||||
event.url.startsWith('/home/gabinete-digital?despachospr=true')) {
|
event.url.startsWith('/home/gabinete-digital?despachospr=true')) {
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ export class DiplomasAssinarPage implements OnInit {
|
|||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// update list
|
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) {
|
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) {
|
||||||
|
|||||||
@@ -39,10 +39,6 @@ constructor(
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// update list
|
// update list
|
||||||
this.LoadList();
|
|
||||||
// update list
|
|
||||||
const location = window.location
|
|
||||||
const pathname = location.pathname + location.search
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomas=true'.startsWith(event.url)) {
|
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomas=true'.startsWith(event.url)) {
|
||||||
|
|||||||
@@ -39,8 +39,6 @@ export class ExpedientesPrPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart &&
|
if (event instanceof NavigationStart &&
|
||||||
event.url.startsWith('/home/gabinete-digital?expedientespr=true') ||
|
event.url.startsWith('/home/gabinete-digital?expedientespr=true') ||
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ export class ExpedientsPage implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//Inicializar segment
|
//Inicializar segment
|
||||||
this.segment = "expedientes";
|
this.segment = "expedientes";
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart &&
|
if (event instanceof NavigationStart &&
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ export class PedidosPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationStart && '/home/gabinete-digital?parecer=true'.startsWith(event.url) ||
|
if(event instanceof NavigationStart && '/home/gabinete-digital?parecer=true'.startsWith(event.url) ||
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ export class PendentesPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
// update list
|
|
||||||
this.LoadList();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart &&
|
if (event instanceof NavigationStart &&
|
||||||
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
|
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user