Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/2.9' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Jan 22, 2025
2 parents fc2a329 + 78bd5ce commit a96f5ca
Show file tree
Hide file tree
Showing 8 changed files with 269 additions and 233 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {setItemTypeFilter, toggleDropdownFilter} from 'agenda/actions';
import {searchFilterSelector} from 'search/selectors';
import {connect} from 'react-redux';
import {agendaCoverageStatusFilter, getActiveFilterLabel} from 'agenda/components/AgendaCoverageExistsFilter';
import {getCoverageDisplayName} from 'agenda/utils';

const IS_AGENDA = location.pathname.includes('/agenda');

Expand All @@ -26,6 +27,7 @@ type IActiveFilter = {
calendar?: any;
location?: any;
region?: any;
coverage?: any;
coverage_type?: any;
coverage_status?: any;
};
Expand Down Expand Up @@ -108,9 +110,15 @@ function SearchResultsFiltersRow(props: IPropsAgendaExtended) {
},
];
} else if (Array.isArray(activeFilter[filter])) {
let getLabel = (val: string) => val;

if (filter === 'coverage') {
getLabel = getCoverageDisplayName;
}

return activeFilter[filter].map((val: string) => ({
key: filter + val,
label: val,
label: getLabel(val),
onRemove: () => {
removeDropdownFilter(filter, val);
},
Expand Down
16 changes: 8 additions & 8 deletions features/web_api/agenda_restrict_coverage_details.feature
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@ Feature: Agenda Restricted Coverage Details
"coverages": [{
"coverage_id": "plan1_cov1",
"coverage_type": "text",
"scheduled": "__no_value__",
"scheduled": "2018-05-28T10:51:52+0000",
"slugline": "__no_value__",
"workflow_status": "__no_value__",
"coverage_status": "__no_value__"
}, {
"coverage_id": "plan1_cov2",
"coverage_type": "text",
"scheduled": "__no_value__",
"scheduled": "2018-05-28T10:51:52+0000",
"slugline": "__no_value__",
"workflow_status": "__no_value__",
"coverage_status": "__no_value__"
Expand All @@ -234,7 +234,7 @@ Feature: Agenda Restricted Coverage Details
"g2_content_type": "text",
"ednote": "__no_value__",
"internal_note": "__no_value__",
"scheduled": "__no_value__",
"scheduled": "2018-05-28T10:51:52+0000",
"slugline": "__no_value__"
}
}, {
Expand All @@ -245,7 +245,7 @@ Feature: Agenda Restricted Coverage Details
"g2_content_type": "text",
"ednote": "__no_value__",
"internal_note": "__no_value__",
"scheduled": "__no_value__",
"scheduled": "2018-05-28T10:51:52+0000",
"slugline": "__no_value__"
}
}]
Expand Down Expand Up @@ -276,7 +276,7 @@ Feature: Agenda Restricted Coverage Details
"coverages": [{
"coverage_id": "plan1_cov1",
"coverage_type": "text",
"scheduled": "__no_value__",
"scheduled": "2018-05-28T10:51:52+0000",
"slugline": "__no_value__",
"workflow_status": "__no_value__",
"coverage_status": "__no_value__"
Expand All @@ -299,7 +299,7 @@ Feature: Agenda Restricted Coverage Details
"g2_content_type": "text",
"ednote": "__no_value__",
"internal_note": "__no_value__",
"scheduled": "__no_value__",
"scheduled": "2018-05-28T10:51:52+0000",
"slugline": "__no_value__"
}
}, {
Expand Down Expand Up @@ -366,14 +366,14 @@ Feature: Agenda Restricted Coverage Details
"coverages": [{
"coverage_id": "plan1_cov1",
"coverage_type": "text",
"scheduled": "__no_value__",
"scheduled": "2018-05-28T10:51:52+0000",
"slugline": "__no_value__",
"workflow_status": "__no_value__",
"coverage_status": "__no_value__"
}, {
"coverage_id": "plan1_cov2",
"coverage_type": "text",
"scheduled": "__no_value__",
"scheduled": "2018-05-28T10:51:52+0000",
"slugline": "__no_value__",
"workflow_status": "__no_value__",
"coverage_status": "__no_value__"
Expand Down
Loading

0 comments on commit a96f5ca

Please sign in to comment.