[develop | DONE | CHANGED]: Remove preselected "Open Access" filter from search.

1. home.component.ts: Set field "resultsQuickFilter" to null.
2. searchAll.component.ts: Set field "quickFilter" to null | In method "entityChanged()" do not set parameter "resultbestaccessright" | [BUG FIX] Clear subscriptions from fetchOrps.
3. searchResearchResults.component.ts: Set field "quickFilter" to null.
4. navigationBar.component.ts: Set field "resultsQuickFilter" to null.
5. app.component.ts: Remove "resultbestaccessright" parameter from menu items of Search research products.
This commit is contained in:
Konstantina Galouni 2024-02-07 21:28:45 +02:00
parent 09960fda9e
commit b357ff2ae2
3 changed files with 22 additions and 22 deletions

View File

@ -97,12 +97,12 @@ export class SearchAllComponent {
subs: Subscription[] = []; subs: Subscription[] = [];
quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = { quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = null;//{
filter: null, // filter: null,
selected: true, // selected: true,
filterId: "resultbestaccessright", // filterId: "resultbestaccessright",
value: "Open Access" // value: "Open Access"
}; // };
resultTypes = {publication: true, dataset: true, software: true, other: true}; resultTypes = {publication: true, dataset: true, software: true, other: true};
@ -290,7 +290,7 @@ export class SearchAllComponent {
this.fetchDatasets.clearSubscriptions(); this.fetchDatasets.clearSubscriptions();
this.fetchPublications.clearSubscriptions(); this.fetchPublications.clearSubscriptions();
this.fetchSoftware.clearSubscriptions(); this.fetchSoftware.clearSubscriptions();
this.fetchPublications.clearSubscriptions(); this.fetchOrps.clearSubscriptions();
this.fetchOrganizations.clearSubscriptions(); this.fetchOrganizations.clearSubscriptions();
this.fetchDataproviders.clearSubscriptions(); this.fetchDataproviders.clearSubscriptions();
this.fetchServices.clearSubscriptions(); this.fetchServices.clearSubscriptions();
@ -603,9 +603,9 @@ export class SearchAllComponent {
} }
if (entity == "result") { if (entity == "result") {
entity = "research-outcomes"; entity = "research-outcomes";
if(!!this.openAccess) { // if(!!this.openAccess) {
this.parameters["resultbestaccessright"] = '"' + encodeURIComponent("Open Access") + '"'; // this.parameters["resultbestaccessright"] = '"' + encodeURIComponent("Open Access") + '"';
} // }
} }
this.router.navigate(["/search/find", entity], {queryParams: this.parameters}); this.router.navigate(["/search/find", entity], {queryParams: this.parameters});
} }

View File

@ -91,12 +91,12 @@ export class SearchResearchResultsComponent {
public orderedFields = this.searchFields.RESULT_FIELDS_ORDERED; public orderedFields = this.searchFields.RESULT_FIELDS_ORDERED;
@ViewChild(NewSearchPageComponent, { static: true }) searchPage: NewSearchPageComponent; @ViewChild(NewSearchPageComponent, { static: true }) searchPage: NewSearchPageComponent;
@Input() simpleView: boolean = true; @Input() simpleView: boolean = true;
quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = { quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = null;//{
filter: null, // filter: null,
selected: true, // selected: true,
filterId: "resultbestaccessright", // filterId: "resultbestaccessright",
value: "Open Access" // value: "Open Access"
}; // };
@Input() includeOnlyResultsAndFilter: boolean = false; @Input() includeOnlyResultsAndFilter: boolean = false;
@Input() showBreadcrumb: boolean = false; @Input() showBreadcrumb: boolean = false;
@Output() searchPageUpdates = new EventEmitter(); @Output() searchPageUpdates = new EventEmitter();

View File

@ -80,12 +80,12 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges {
public featuredAlignment: string = MenuAlignment.CENTER.valueOf(); public featuredAlignment: string = MenuAlignment.CENTER.valueOf();
public hasSearchBar: boolean = false; public hasSearchBar: boolean = false;
public resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = { public resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = null;//{
filter: null, // filter: null,
selected: true, // selected: true,
filterId: "resultbestaccessright", // filterId: "resultbestaccessright",
value: "Open Access" // value: "Open Access"
}; // };
@ViewChild('search_input') search_input: SearchInputComponent; @ViewChild('search_input') search_input: SearchInputComponent;
@ViewChild('canvas') canvas: ElementRef; @ViewChild('canvas') canvas: ElementRef;
public routerHelper: RouterHelper = new RouterHelper(); public routerHelper: RouterHelper = new RouterHelper();