From 2456e7b0f66e87b6023db76c07664f1c7b92039d Mon Sep 17 00:00:00 2001 From: Kim Rutherford Date: Mon, 27 Nov 2023 21:16:51 +1300 Subject: [PATCH] Remove duplicate extension_categories config Refs pombase/website#1300 --- src/app/config.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/app/config.ts b/src/app/config.ts index d95df0b6..4802e5e0 100644 --- a/src/app/config.ts +++ b/src/app/config.ts @@ -349,6 +349,8 @@ export interface AppConfig { slims: { [slimName: string]: SlimConfig }; chromosomes: Array; + extensionCategories?: { [filterSubType: string]: Array }; + geneExpression: GeneExpressionConfig; documentation: DocumentationConfig; @@ -419,6 +421,7 @@ export interface ThroughputFilterCategory { export interface FilterConfig { filter_type: string; + filter_subtype?: string; display_name: string; detailed_view_only: boolean; scope: Array; @@ -632,6 +635,15 @@ for (let configName of Object.keys(_config.annotationTypes)) { Object.assign(newConfig, parentConfig, thisConfig); Object.assign(thisConfig, newConfig); } + + if (thisConfig.filters) { + for (const filterConfig of thisConfig.filters) { + if (filterConfig.filter_subtype) { + filterConfig.extension_categories = + pombaseConfig.extension_categories[filterConfig.filter_subtype]; + } + } + } } if (pombaseConfig.term_page_extensions_cv_names && @@ -805,6 +817,7 @@ let _appConfig: AppConfig = { 'SO-protein': 'sequence', }, slims: pombaseConfig.slims, + extensionCategories: pombaseConfig.extension_categories, linkoutConfig: { pro: 'http://www.proconsortium.org/cgi-bin/pro/entry_pro?id=',