Skip to content
Snippets Groups Projects
Commit d8ce01b2 authored by Kristof De Langhe's avatar Kristof De Langhe
Browse files

55647: Intermediate FixedFilter fixes

parent 363e1459
No related branches found
No related tags found
No related merge requests found
......@@ -27,8 +27,9 @@ export class FilteredSearchPageComponent extends SearchPageComponent {
protected sidebarService: SearchSidebarService,
protected windowService: HostWindowService,
protected filterService: SearchFilterService,
protected searchConfigService: SearchConfigurationService) {
super(service, sidebarService, windowService, filterService, searchConfigService);
protected searchConfigService: SearchConfigurationService,
protected routeService: RouteService) {
super(service, sidebarService, windowService, filterService, searchConfigService, routeService);
}
}
......@@ -16,11 +16,12 @@ export class SearchOptions {
filters?: any;
fixedFilter?: any;
constructor(options: {scope?: string, query?: string, dsoType?: DSpaceObjectType, filters?: SearchFilter[]}) {
constructor(options: {scope?: string, query?: string, dsoType?: DSpaceObjectType, filters?: SearchFilter[], fixedFilter?: any}) {
this.scope = options.scope;
this.query = options.query;
this.dsoType = options.dsoType;
this.filters = options.filters;
this.fixedFilter = options.fixedFilter;
}
/**
......
......@@ -31,7 +31,8 @@
</button>
</div>
<ds-search-results [searchResults]="resultsRD$ | async"
[searchConfig]="searchOptions$ | async"></ds-search-results>
[searchConfig]="searchOptions$ | async"
[fixedFilter]="fixedFilter | async"></ds-search-results>
</div>
</div>
</div>
......
......@@ -16,6 +16,7 @@ import { hasValue } from '../shared/empty.util';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { SearchConfigurationService } from './search-service/search-configuration.service';
import { getSucceededRemoteData } from '../core/shared/operators';
import { RouteService } from '../shared/services/route.service';
/**
* This component renders a simple item page.
......@@ -61,11 +62,14 @@ export class SearchPageComponent implements OnInit {
*/
sub: Subscription;
fixedFilter;
constructor(protected service: SearchService,
protected sidebarService: SearchSidebarService,
protected windowService: HostWindowService,
protected filterService: SearchFilterService,
protected searchConfigService: SearchConfigurationService) {
protected searchConfigService: SearchConfigurationService,
protected routeService: RouteService) {
this.isXsOrSm$ = this.windowService.isXsOrSm();
}
......@@ -86,6 +90,7 @@ export class SearchPageComponent implements OnInit {
this.scopeListRD$ = this.searchConfigService.getCurrentScope('').pipe(
switchMap((scopeId) => this.service.getScopes(scopeId))
);
this.fixedFilter = this.routeService.getRouteParameterValue('filter');
}
/**
......
......@@ -54,7 +54,7 @@ export class SearchSettingsComponent implements OnInit {
},
queryParamsHandling: 'merge'
};
this.router.navigate([ '/search' ], navigationExtras);
this.router.navigate([ this.service.getSearchLink() ], navigationExtras);
}
/**
......@@ -71,6 +71,6 @@ export class SearchSettingsComponent implements OnInit {
},
queryParamsHandling: 'merge'
};
this.router.navigate([ '/search' ], navigationExtras);
this.router.navigate([ this.service.getSearchLink() ], navigationExtras);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment