From 16b4edb26e18764bd676d41c1c88cb1b68f09c8d Mon Sep 17 00:00:00 2001 From: Claudia Malzer Date: Tue, 26 Nov 2024 16:23:16 +0100 Subject: [PATCH 1/5] * display also not available catalogs for managers in catalog filter --- .../assets/js/projects/components/helper/ProjectFilters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdmo/projects/assets/js/projects/components/helper/ProjectFilters.js b/rdmo/projects/assets/js/projects/components/helper/ProjectFilters.js index 0ce94c1a2..49c270272 100644 --- a/rdmo/projects/assets/js/projects/components/helper/ProjectFilters.js +++ b/rdmo/projects/assets/js/projects/components/helper/ProjectFilters.js @@ -35,7 +35,7 @@ const ProjectFilters = ({ catalogs, config, configActions, isManager, projectsAc projectsActions.fetchProjects() } - const catalogOptions = catalogs?.filter(catalog => catalog.available) + const catalogOptions = catalogs?.filter(catalog => isManager || catalog.available) .map(catalog => ({ value: catalog.id.toString(), label: catalog.title })) const selectedCatalog = get(config, 'params.catalog', '') const updateCatalogFilter = (value) => { From 5fd60d9f81e3a07cf7d304fde5474f1c6698d96f Mon Sep 17 00:00:00 2001 From: Claudia Malzer Date: Tue, 26 Nov 2024 16:34:02 +0100 Subject: [PATCH 2/5] * extend .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3d2c0d88b..3cc8fffc2 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,7 @@ 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 From 755e014fadaa83ff58b8e07c03c5de8c6981dd83 Mon Sep 17 00:00:00 2001 From: Claudia Malzer <42971992+CalamityC@users.noreply.github.com> Date: Tue, 26 Nov 2024 16:51:55 +0100 Subject: [PATCH 3/5] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3cc8fffc2..612df3afe 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,7 @@ rdmo/management/static 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 From 471df6ed513e56648c51c4c75f8a2da2fbd89ea5 Mon Sep 17 00:00:00 2001 From: Claudia Malzer Date: Thu, 28 Nov 2024 12:31:11 +0100 Subject: [PATCH 4/5] use text-muted className for unavailable catalogs in dropdown select --- .../js/projects/components/helper/ProjectFilters.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rdmo/projects/assets/js/projects/components/helper/ProjectFilters.js b/rdmo/projects/assets/js/projects/components/helper/ProjectFilters.js index 49c270272..bbd730456 100644 --- a/rdmo/projects/assets/js/projects/components/helper/ProjectFilters.js +++ b/rdmo/projects/assets/js/projects/components/helper/ProjectFilters.js @@ -36,7 +36,14 @@ const ProjectFilters = ({ catalogs, config, configActions, isManager, projectsAc } const catalogOptions = catalogs?.filter(catalog => isManager || catalog.available) - .map(catalog => ({ value: catalog.id.toString(), label: catalog.title })) + .map(catalog => ({ + value: catalog.id.toString(), + label: ( + + {catalog.title} + + ), + })) const selectedCatalog = get(config, 'params.catalog', '') const updateCatalogFilter = (value) => { value ? configActions.updateConfig('params.catalog', value) : configActions.deleteConfig('params.catalog') From 520add8eb687bf2bdce8a3584b533401eee8de42 Mon Sep 17 00:00:00 2001 From: Claudia Malzer Date: Thu, 28 Nov 2024 19:15:16 +0100 Subject: [PATCH 5/5] add css class for muted text in select dropdown --- rdmo/projects/assets/scss/projects.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rdmo/projects/assets/scss/projects.scss b/rdmo/projects/assets/scss/projects.scss index dbe181170..5134309d9 100644 --- a/rdmo/projects/assets/scss/projects.scss +++ b/rdmo/projects/assets/scss/projects.scss @@ -374,3 +374,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 */ +}