Compare commits
2 Commits
3fdb7682ea
...
926e66956e
Author | SHA1 | Date |
---|---|---|
Sofia Papacharalampous | 926e66956e | |
Sofia Papacharalampous | 1e3466d88c |
|
@ -51,7 +51,8 @@ const publicRoutes: Routes = [
|
|||
path: '',
|
||||
loadChildren: () => import('./listing/description-listing.module').then(m => m.DescriptionListingModule),
|
||||
data: {
|
||||
breadcrumb: true
|
||||
breadcrumb: true,
|
||||
isPublic: true
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -31,7 +31,7 @@ import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/
|
|||
import { SortDirection } from '@common/modules/hybrid-listing/hybrid-listing.component';
|
||||
import { Guid } from '@common/types/guid';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||
import { debounceTime, map, takeUntil } from 'rxjs/operators';
|
||||
import { nameof } from 'ts-simple-nameof';
|
||||
import { StartNewDescriptionDialogComponent } from '../start-new-description-dialog/start-new-description-dialog.component';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
|
@ -108,7 +108,7 @@ export class DescriptionListingComponent extends BaseComponent implements OnInit
|
|||
|
||||
ngOnInit() {
|
||||
this.analyticsService.trackPageView(AnalyticsService.DescriptionListing);
|
||||
this.isPublic = this.router.url === '/explore-descriptions';
|
||||
this.isPublic = this.route.snapshot.data['isPublic'] ?? false;
|
||||
if (this.isPublic) {
|
||||
//TODO: refactor
|
||||
// this.formGroup.get('order').setValue(this.order.DATASETPUBLISHED);
|
||||
|
@ -118,6 +118,7 @@ export class DescriptionListingComponent extends BaseComponent implements OnInit
|
|||
if (!this.isPublic && !this.authService.currentAccountIsAuthenticated()) {
|
||||
this.router.navigateByUrl("/explore");
|
||||
}
|
||||
|
||||
this.route.params
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(async (params: Params) => {
|
||||
|
|
|
@ -64,7 +64,8 @@ const publicRoutes: Routes = [
|
|||
path: '',
|
||||
loadChildren: () => import('./listing/dmp-listing.module').then(m => m.DmpListingModule),
|
||||
data: {
|
||||
breadcrumb: true
|
||||
breadcrumb: true,
|
||||
isPublic: true
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -97,7 +97,7 @@ export class DmpListingComponent extends BaseComponent implements OnInit {
|
|||
ngOnInit() {
|
||||
this.analyticsService.trackPageView(AnalyticsService.DmpListing);
|
||||
|
||||
this.isPublic = this.router.url.startsWith('/explore-plans');
|
||||
this.isPublic = this.route.snapshot.data['isPublic'] ?? false;
|
||||
if (this.isPublic) {
|
||||
//TODO refactor
|
||||
// this.formGroup.get('order').setValue(this.order.PUBLISHED);
|
||||
|
|
Loading…
Reference in New Issue