From 67ae7bb6572648ac128da02933cbee7145ecf6c6 Mon Sep 17 00:00:00 2001
From: Chintan Mehta <22376522+chinmehta@users.noreply.github.com>
Date: Mon, 13 Nov 2023 14:28:16 +0000
Subject: [PATCH] [Platform]: AOTF Export info text and target switch public
(#286)
---
.../AdvanceOptionsMenu.jsx | 13 ----------
.../AssociationsToolkit/DataDownloader.jsx | 24 ++++++-------------
.../DiseaseAssociations.jsx | 22 ++++++-----------
.../Indications/TherapeuticAreasDrawer.jsx | 2 +-
4 files changed, 15 insertions(+), 46 deletions(-)
diff --git a/apps/platform/src/components/AssociationsToolkit/AdvanceOptionsMenu.jsx b/apps/platform/src/components/AssociationsToolkit/AdvanceOptionsMenu.jsx
index dc0262672..7b4b4803d 100644
--- a/apps/platform/src/components/AssociationsToolkit/AdvanceOptionsMenu.jsx
+++ b/apps/platform/src/components/AssociationsToolkit/AdvanceOptionsMenu.jsx
@@ -81,19 +81,6 @@ function DataMenu() {
label="Show data sources controls"
/>
- {/*
- setEnableIndirect(!enableIndirect)}
- />
- }
- label="Enable Indirect"
- />
- */}
>
diff --git a/apps/platform/src/components/AssociationsToolkit/DataDownloader.jsx b/apps/platform/src/components/AssociationsToolkit/DataDownloader.jsx
index ee0561b65..4627b7779 100644
--- a/apps/platform/src/components/AssociationsToolkit/DataDownloader.jsx
+++ b/apps/platform/src/components/AssociationsToolkit/DataDownloader.jsx
@@ -171,9 +171,6 @@ function DataDownloader({ fileStem }) {
} = useAotfContext();
const [onlyPinnedCheckBox, setOnlyPinnedCheckBox] = useState(false);
const [weightControlCheckBox, setWeightControlCheckBox] = useState(modifiedSourcesDataControls);
- const [requiredControlCheckBox, setRequiredControlCheckBox] = useState(
- modifiedSourcesDataControls
- );
const [onlyTargetData, setOnlyTargetData] = useState(false);
const [downloading, setDownloading] = useState(false);
@@ -205,7 +202,7 @@ function DataDownloader({ fileStem }) {
sortBy: sorting[0].id,
enableIndirect,
datasources: dataSourcesWeights,
- ...(requiredControlCheckBox && {
+ ...(weightControlCheckBox && {
aggregationFilters: dataSourcesRequired.map(el => ({
name: el.name,
path: el.path,
@@ -271,7 +268,6 @@ function DataDownloader({ fileStem }) {
};
useEffect(() => {
- setRequiredControlCheckBox(modifiedSourcesDataControls);
setWeightControlCheckBox(modifiedSourcesDataControls);
}, [modifiedSourcesDataControls]);
@@ -299,6 +295,11 @@ function DataDownloader({ fileStem }) {
>
Export: {fileStem} data
+ `${theme.spacing(1)} 0 ${theme.spacing(4)} 0`}} variant="subtitle2" gutterBottom>
+ By clicking on the download tabs from this view, you will export the entire association
+ table (default option). Please expand the advanced options to export your own customised
+ view.
+
}>
Advanced export options:
@@ -385,18 +386,7 @@ function DataDownloader({ fileStem }) {
onChange={e => setWeightControlCheckBox(e.target.checked)}
/>
}
- label="Include custom weight controls"
- />
- setRequiredControlCheckBox(e.target.checked)}
- />
- }
- label="Include custom required control"
+ label="Include custom controls"
/>
-
+
-
+
>
@@ -43,11 +39,7 @@ function AssociationsWrapper() {
/* DISEASE ASSOCIATION */
function DiseaseAssociations({ efoId }) {
return (
-
+
);
diff --git a/packages/sections/src/drug/Indications/TherapeuticAreasDrawer.jsx b/packages/sections/src/drug/Indications/TherapeuticAreasDrawer.jsx
index fb5054c11..c1eb7b2f0 100644
--- a/packages/sections/src/drug/Indications/TherapeuticAreasDrawer.jsx
+++ b/packages/sections/src/drug/Indications/TherapeuticAreasDrawer.jsx
@@ -123,7 +123,7 @@ function TherapeuticAreasDrawer({ therapeuticAreas }) {
return (
<>
-
+
{therapeuticAreas.length} areas