Compare commits

...

2 Commits

4 changed files with 8 additions and 5 deletions

View File

@ -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
},
},
];

View File

@ -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) => {

View File

@ -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
},
},
];

View File

@ -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);