Remove duplicate api calls

This commit is contained in:
Peter Maquiran
2021-08-18 12:17:02 +01:00
parent 1fbb308831
commit d3e18efcd5
15 changed files with 7 additions and 34 deletions
@@ -68,7 +68,6 @@ export class DespachosPrPage implements OnInit {
const location = window.location
const pathname = location.pathname + location.search
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
@@ -56,7 +56,6 @@ export class DespachosPage implements OnInit {
const location = window.location
const pathname = location.pathname + location.search
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
@@ -37,7 +37,6 @@ export class DiplomasAssinarPage implements OnInit {
ngOnInit() {
const location = window.location
const pathname = location.pathname + location.search
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
@@ -78,7 +77,7 @@ export class DiplomasAssinarPage implements OnInit {
let diplomasAssinar = diplomas.reverse().filter(data => data.activityInstanceName == "Assinar Diploma");
console.log(diplomasAssinar);
diplomasAssinar.forEach(element => {
let task: customTask = this.customTaskPipe.transform(element)
this.diplomasList.push(task);
@@ -43,7 +43,6 @@ constructor(
const location = window.location
const pathname = location.pathname + location.search
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
@@ -42,7 +42,6 @@ export class EventListPage implements OnInit {
const location = window.location
const pathname = location.pathname + location.search
this.LoadToApproveEvents();
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
@@ -37,8 +37,6 @@ export class ExpedientePage implements OnInit {
const location = window.location
const pathname = location.pathname + location.search
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
@@ -47,8 +47,6 @@ export class ExpedientesPrPage implements OnInit {
const location = window.location
const pathname = location.pathname + location.search
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
@@ -53,8 +53,6 @@ export class PedidosPage implements OnInit {
ngOnInit() {
this.LoadList();
this.router.events.forEach((event) => {
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)