-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard api #81
Merged
Merged
Dashboard api #81
Changes from 7 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
aedbec5
pushing up new dashbooard api utils
scrummish 28cee14
added two more endpoint functions
scrummish 07bfd58
search bar works and filters the list of projects
scrummish d15c4d2
Search bar is now up to date with accessibility and has predictive text
scrummish 0f9d4a0
removed the autocomplete functionality
scrummish a26ebe2
all the pages are now getting their data from the dashboard API
scrummish 7d6cc7d
images for people are now appearing
scrummish 2eaf4cb
people images are now appearing and project spotlights are now pullin…
scrummish 6b670cc
pull home page project spotlights from dashboard
suejinkim20 f305382
add snippet logic to project payload
suejinkim20 218fc11
incorporate snippet to project spotlight component
suejinkim20 c0ba965
merging in latest changes
scrummish a018ffa
Merge branch 'dashboard-api' of https://github.com/mbwatson/renci-dot…
scrummish bf333b6
missing back slash in url
scrummish 5c0c940
slug created people pages are now getting data from dashboard instead…
scrummish 6c38f56
user server racks photo as default project image
suejinkim20 0a7520e
fix import typo for server racks image on project spotlight
suejinkim20 832696f
Merge branch 'develop' into dashboard-api
suejinkim20 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import { useTheme } from '@mui/material/styles' | |
import { MarkdownLess } from './markdown' | ||
|
||
export const ProjectCard = ({project}) => { | ||
console.log(project) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove |
||
const styles = { | ||
project: { | ||
textAlign: 'center', | ||
|
@@ -64,13 +65,13 @@ export const ProjectCard = ({project}) => { | |
return ( | ||
<Card sx={styles.project} key={project.slug}> | ||
<CardActionArea component={Link} to={ `/projects/${ project.slug }` }> | ||
<CardMedia component={'img'} src={ project.featuredImage } sx={styles.cardMedia} /> | ||
<CardMedia component={'img'} src={ project.featuredImage.length > 0 ? project.featuredImage[0].url : "https://radx-images.s3.amazonaws.com/hero_aerpaw_b67ec9b4f6.jpeg" } sx={styles.cardMedia} /> | ||
<Box sx={styles.textOverlay}> | ||
<Typography variant='h6'>{project.shortTitle ? project.shortTitle : project.name}</Typography> | ||
<Typography variant='h6'>{project.shortTitle ? project.shortTitle : project.webName}</Typography> | ||
</Box> | ||
</CardActionArea> | ||
<CardContent sx={project.description ? styles.description : styles.noSnippet}> | ||
<MarkdownLess paragraph >{ project.snippet }</MarkdownLess> | ||
<CardContent sx={project.webDescription ? styles.description : styles.noSnippet}> | ||
<MarkdownLess paragraph >{ project.webDescription }</MarkdownLess> | ||
</CardContent> | ||
<CardContent> | ||
<Link to={ `/projects/${ project.slug }` } style={{textAlign: 'right'}}>Read More</Link> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wasn't this in a different branch? Is this supposed to be here again? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { styled } from "@mui/material"; | ||
import TextField from "@mui/material/TextField"; | ||
import FormControl from "@mui/material/FormControl"; | ||
import FormLabel from "@mui/material/FormLabel"; | ||
|
||
const StyledAutocompleteSearch = styled("div")( | ||
({ theme, bottomBorderRadius = true }) => ` | ||
display: flex; | ||
border-radius: inherit; | ||
border-bottom-left-radius: ${bottomBorderRadius ? "inherit" : 0}; | ||
border-bottom-right-radius: ${bottomBorderRadius ? "inherit" : 0}; | ||
|
||
&.focused { | ||
border-color: ${theme.palette.primary.main}90; | ||
box-shadow: 0 0 0 3px ${theme.palette.primary.main}a0; | ||
} | ||
|
||
&:focus-visible { | ||
outline: 0; | ||
} | ||
` | ||
); | ||
|
||
export const SearchBar = ({ setSearchQuery, options }) => { | ||
return ( | ||
<FormControl | ||
style={{ | ||
width: "100%", | ||
}} | ||
> | ||
<FormLabel>Project Search</FormLabel> | ||
<StyledAutocompleteSearch> | ||
<TextField | ||
style={{ | ||
width: "100%", | ||
}} | ||
id="search-bar" | ||
onInput={(e) => { | ||
setSearchQuery(e.target.value.toLowerCase()); | ||
}} | ||
placeholder="Search..." | ||
/> | ||
</StyledAutocompleteSearch> | ||
</FormControl> | ||
); | ||
}; | ||
|
||
SearchBar.propTypes = { | ||
setSearchQuery: PropTypes.func.isRequired, | ||
options: PropTypes.array.isRequired, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { fetchFromDashboard } from "@/utils/dashboard"; | ||
|
||
export const fetchDashboardCollaborations = async () => { | ||
const payload = await fetchFromDashboard("collaborations"); | ||
|
||
return payload; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { fetchFromDashboard } from "@/utils/dashboard"; | ||
|
||
export const fetchOrganizations = async () => { | ||
const payload = await fetchFromDashboard("organizations"); | ||
|
||
return payload; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { fetchFromDashboard } from "@/utils/dashboard"; | ||
|
||
export const fetchDashboardPeople = async () => { | ||
const payload = await fetchFromDashboard("people"); | ||
|
||
let ood = [{ | ||
active: true, | ||
: | ||
"ashok@renci.org", | ||
firstName | ||
: | ||
"Ashok", | ||
fullName | ||
: | ||
"Ashok Krishnamurthy", | ||
lastName | ||
: | ||
"Krishnamurthy", | ||
photoData | ||
: | ||
"https://radx-images.s3.amazonaws.com/ashok_krishnamurthy_83f4cde9ac.jpeg", | ||
pid | ||
: | ||
"720441075", | ||
personId: "_5SMp4qd1tUKnpfA_niwgnQ", | ||
slug | ||
: | ||
"ashok-krishnamurthy", | ||
title | ||
: | ||
"Interim Director of RENCI" | ||
}, { | ||
active | ||
: | ||
true, | ||
: | ||
"asia@renci.org", | ||
firstName | ||
: | ||
"Asia", | ||
fullName | ||
: | ||
"Asia Mieczkowska", | ||
lastName | ||
: | ||
"Mieczkowska", | ||
photoData | ||
: | ||
"https://radx-images.s3.amazonaws.com/mieczkowska_asia_c5aaf7ad4f.png", | ||
pid | ||
: | ||
"708744185", | ||
personId: "_0KDiHdVaskGZmHbyoVs4Yg", | ||
slug | ||
: | ||
"asia-mieczkowska", | ||
title | ||
: | ||
"Interim Chief Operations Officer" | ||
}] | ||
|
||
return {ood: ood, people: payload}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { fetchFromDashboard } from "@/utils/dashboard"; | ||
|
||
export const fetchDashboardProjects = async () => { | ||
const payload = await fetchFromDashboard("projects"); | ||
|
||
return payload; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { fetchFromDashboard } from "@/utils/dashboard"; | ||
|
||
export const fetchResearchGroups = async () => { | ||
const payload = await fetchFromDashboard("research-groups"); | ||
|
||
return payload; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { fetchFromDashboard } from "@/utils/dashboard"; | ||
|
||
export const fetchDashboardTeams = async () => { | ||
const payload = await fetchFromDashboard("teams"); | ||
|
||
return payload; | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove