mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +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 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)
|
||||
|
||||
@@ -16,12 +16,11 @@ import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||
})
|
||||
export class DespachosPrPage implements OnInit {
|
||||
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
skeletonLoader = true
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
skeletonLoader = true
|
||||
|
||||
|
||||
loggeduser: User;
|
||||
despachosprstore = DespachosprStore;
|
||||
loggeduser: User;
|
||||
despachosprstore = DespachosprStore;
|
||||
|
||||
constructor (
|
||||
private processes:ProcessesService,
|
||||
@@ -34,8 +33,6 @@ constructor (
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart &&
|
||||
event.url.startsWith('/home/gabinete-digital?despachospr=true')) {
|
||||
|
||||
@@ -29,8 +29,6 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
// update list
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) {
|
||||
|
||||
@@ -39,10 +39,6 @@ constructor(
|
||||
|
||||
ngOnInit() {
|
||||
// update list
|
||||
this.LoadList();
|
||||
// update list
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomas=true'.startsWith(event.url)) {
|
||||
|
||||
@@ -38,9 +38,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.LoadList();
|
||||
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart &&
|
||||
event.url.startsWith('/home/gabinete-digital?expedientespr=true') ||
|
||||
|
||||
@@ -43,8 +43,7 @@ export class ExpedientsPage implements OnInit {
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "expedientes";
|
||||
this.LoadList();
|
||||
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart &&
|
||||
event.url.startsWith('/home/gabinete-digital?expedientes=true')) {
|
||||
|
||||
@@ -50,7 +50,6 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationStart && '/home/gabinete-digital?parecer=true'.startsWith(event.url) ||
|
||||
|
||||
@@ -34,9 +34,6 @@ export class PendentesPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
// update list
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart &&
|
||||
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
|
||||
|
||||
Reference in New Issue
Block a user