From e8d24bbfccba6223ff6e612dd63faaa5ac17a526 Mon Sep 17 00:00:00 2001 From: Katie Stahl Date: Thu, 19 Sep 2024 13:17:08 -0400 Subject: [PATCH] fix: get coordinates not working for transcript --- .../Utilities/GetCoordinates/GetCoordinates.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx b/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx index a5eda92..a7cfe57 100644 --- a/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx +++ b/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx @@ -108,13 +108,18 @@ const GetCoordinates: React.FC = () => { const [isLoading, setIsLoading] = useState(false); const [responseWarnings, setResponseWarnings] = useState([]); + const genomicInputComplete = + genomicInputType === GenomicInputType.GENE + ? gene !== "" && selectedTranscript !== "" + : txAc !== ""; + // programming horror const inputComplete = - (inputType === "genomic_coords" && - gene !== "" && + (inputType === TxElementInputType.gc && + genomicInputComplete && chromosome !== "" && (start !== "" || end !== "")) || - (inputType === "exon_coords" && + (inputType === TxElementInputType.ec && txAc !== "" && (exonStart !== "" || exonEnd !== ""));