Skip to content
Snippets Groups Projects
Commit 1fe99df0 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Fix sonar issues

parent 3f6157c8
No related branches found
No related tags found
2 merge requests!147Develop,!139Resolve "Search nultiple download results"
......@@ -32,11 +32,11 @@ export class DatasetsResultComponent {
getOrderedDatasetWithResults(): Dataset[] {
let datasets: Dataset[] = [];
const projectOrderedByName: Project[] = [...this.projectList].sort((a, b) => a.name.localeCompare(b.name));
projectOrderedByName.map(p => {
projectOrderedByName.forEach(p => {
this.datasetList.filter(d => d.project_name === p.name)
.sort(sortByDisplay)
.forEach(d => {
this.datasetsCount.map(c => {
this.datasetsCount.forEach(c => {
if (c.dname === d.name && c.count > 0) {
datasets.push(d);
}
......
......@@ -41,6 +41,7 @@ export const initialState: State = adapter.getInitialState({
export function reducer(state: State = initialState, action: actions.Actions): State {
switch (action.type) {
case actions.INIT_SELECTED_DATASETS:
case actions.UPDATE_SELECTED_DATASETS:
return {
...state,
selectedDatasets: action.payload
......@@ -71,11 +72,11 @@ export function reducer(state: State = initialState, action: actions.Actions): S
resultStepChecked: true
};
case actions.UPDATE_SELECTED_DATASETS:
return {
...state,
selectedDatasets: action.payload
};
// case actions.UPDATE_SELECTED_DATASETS:
// return {
// ...state,
// selectedDatasets: action.payload
// };
case actions.RETRIEVE_DATASETS_COUNT:
return {
......
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