From 2b8665b303172de5f81fa1362bc05754c47a8e4c Mon Sep 17 00:00:00 2001 From: Jordan Dialpuri <44945647+Dialpuri@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:03:19 +0000 Subject: [PATCH] Update code to use pdb and pdbRedo databases The code is modified to fetch and display data from both 'pdb' and 'pdbRedo' databases. To achieve this, new variables are defined to store the results from each database and fetch operations are carried out separately for each URL. This allows for a more robust display of data in cases where an entry is not found in one database but exists in the other. Also standardize the accessor names to camelCase in 'Constants.tsx' file. --- webapp/src/data/Constants.tsx | 20 +-- .../DatabaseComponents/BFactorVsRSCC.tsx | 8 +- .../DatabaseComponents/CremerPopleGraph.tsx | 20 +-- .../database/DatabaseComponents/SNFGList.tsx | 8 +- .../database/DatabaseComponents/SugarList.tsx | 8 +- .../DatabaseResult/DatabaseResult.tsx | 155 +++++++++++++++++- webapp/src/interfaces/types.ts | 6 +- webapp/src/layouts/DatabaseHeader.tsx | 5 +- .../pages/DatabaseSection/DatabaseSection.tsx | 28 +++- 9 files changed, 207 insertions(+), 51 deletions(-) diff --git a/webapp/src/data/Constants.tsx b/webapp/src/data/Constants.tsx index 0396f80a..de1d69ab 100644 --- a/webapp/src/data/Constants.tsx +++ b/webapp/src/data/Constants.tsx @@ -89,7 +89,7 @@ export const DatabaseColumns = [ }, { Header: 'SNFG', - accessor: 'SNFG', + accessor: 'snfg', Cell: (tableProps) => { // console.log("SNFG", tableProps.row.original.SNFG) @@ -106,7 +106,7 @@ export const DatabaseColumns = [ }, { Header: 'WURCS', - accessor: 'WURCS', + accessor: 'wurcs', Cell: (tableProps) => { return (