Skip to content

Commit

Permalink
fix under_review table, raw data source, i.request
Browse files Browse the repository at this point in the history
  • Loading branch information
AldemirLucas committed Sep 19, 2023
1 parent aea6527 commit 5d581d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions next/components/organisms/DatasetResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ export default function DatasetResource({
}

useEffect(() => {
const dataset_tables = dataset?.tables?.edges.map((elm) => elm.node) || []
const raw_data_sources = dataset?.rawDataSources?.edges.map((elm) => elm.node) || []
const information_request = dataset?.informationRequests?.edges.map((elm) => elm.node) || []
const dataset_tables = dataset?.tables?.edges.map((elm) => elm.node).filter((elm) => elm?.status?.slug !== "under_review").sort(sortElements) || []
const raw_data_sources = dataset?.rawDataSources?.edges.map((elm) => elm.node).filter((elm) => elm?.status?.slug !== "under_review").sort(sortElements) || []
const information_request = dataset?.informationRequests?.edges.map((elm) => elm.node).filter((elm) => elm?.status?.slug !== "under_review").sort(sortElements) || []

setTables(dataset_tables.filter((elm) => elm?.status?.slug !== "under_review").sort(sortElements))
setRawDataSources(raw_data_sources.filter((elm) => elm?.status?.slug !== "under_review").sort(sortElements))
setInformationRequests(information_request.filter((elm) => elm?.status?.slug !== "under_review").sort(sortElements))
setTables(dataset_tables)
setRawDataSources(raw_data_sources)
setInformationRequests(information_request)

const queryParams = new URLSearchParams(window.location.search)

Expand Down
6 changes: 3 additions & 3 deletions next/pages/api/team/getAllPeople.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default async function getAllPeople() {
data: {
query: `
query {
allAccount {
allAccount (profile: A_1){
edges {
node {
firstName
Expand All @@ -36,13 +36,13 @@ export default async function getAllPeople() {
}
}
}
edgeCount
}
}
`
}
})
const result = res?.data?.data?.allAccount?.edges
const data = result.filter(item => item.node.isActiveStaff === 'true')
const data = res?.data?.data?.allAccount?.edges
return data
} catch (error) {
console.error(error)
Expand Down

0 comments on commit 5d581d6

Please sign in to comment.