Skip to content

Commit

Permalink
Merge pull request #1201 from rdmorganiser/show-all-catalogs
Browse files Browse the repository at this point in the history
Show all catalogs
  • Loading branch information
CalamityC authored Dec 5, 2024
2 parents 2ad858f + 520add8 commit c486085
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ dist

rdmo/management/static

rdmo/core/static/core/js/base.js
rdmo/core/static/core/js/base*.js
rdmo/core/static/core/fonts
rdmo/core/static/core/css/base.css
rdmo/core/static/core/css/base*.css

rdmo/projects/static/projects/js/*.js
rdmo/projects/static/projects/fonts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ const ProjectFilters = ({ catalogs, config, configActions, isManager, projectsAc
projectsActions.fetchProjects()
}

const catalogOptions = catalogs?.filter(catalog => catalog.available)
.map(catalog => ({ value: catalog.id.toString(), label: catalog.title }))
const catalogOptions = catalogs?.filter(catalog => isManager || catalog.available)
.map(catalog => ({
value: catalog.id.toString(),
label: (
<span className={catalog.available ? '' : 'text-muted'}>
{catalog.title}
</span>
),
}))
const selectedCatalog = get(config, 'params.catalog', '')
const updateCatalogFilter = (value) => {
value ? configActions.updateConfig('params.catalog', value) : configActions.deleteConfig('params.catalog')
Expand Down
5 changes: 5 additions & 0 deletions rdmo/projects/assets/scss/projects.scss
Original file line number Diff line number Diff line change
Expand Up @@ -375,3 +375,8 @@ a.disabled {
.dropzone.disabled {
opacity: 0.6;
}

/* Selected style for muted select options */
.react-select__menu .react-select__option--is-selected .text-muted {
color: white; /* White when selected */
}

0 comments on commit c486085

Please sign in to comment.