Skip to content

Commit

Permalink
#332: added refresh/reset feature on site detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxue1123 committed Jul 9, 2024
1 parent b6b8b39 commit bbec3bb
Show file tree
Hide file tree
Showing 7 changed files with 214 additions and 186 deletions.
2 changes: 0 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ class App extends React.Component {
render() {
const { userName, userEmail, userStatus, searchQuery, globalRoles,
showSessionTimeoutModal1, showSessionTimeoutModal2 } = this.state;
console.log("App.js");
console.log(globalRoles);
return (
<div className="App">
<Router>
Expand Down
11 changes: 8 additions & 3 deletions src/components/Project/Community/Funding.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,14 @@ class Funding extends React.Component {
agency: "",
directorate: "",
award_number: "",
award_amount: ""
award_amount: "",
agency_other: ""
})
}

parseFundingStr = (funding) => {
console.log("funding parser");
console.log(funding);
if (funding.agency === "Other") {
return `${funding.other_agency} | ${funding.award_number ? funding.award_number : ""} | ${funding.award_amount ? funding.award_amount : ""}`;
} else if (funding.agency === "NSF") {
Expand All @@ -79,6 +82,8 @@ class Funding extends React.Component {
const { agency, directorate, award_number,
award_amount, agency_options, directorate_options, agency_other } = this.state;
const { fundings } = this.props;
console.log("Funding.jsx");
console.log(fundings);
return (
<div className="border-top mt-4 pt-2">
<h5 className="mt-2">Funding Information</h5>
Expand Down Expand Up @@ -155,7 +160,8 @@ class Funding extends React.Component {
Add
</button>
</div>
<div className="ml-1">
</div>
<div className="ml-1">
<ul className="input-tag__tags">
{
fundings.length > 0 &&
Expand All @@ -173,7 +179,6 @@ class Funding extends React.Component {
}
</ul>
</div>
</div>
</div>
)
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Project/ProjectProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Table from "../common/Table";
import toLocaleTime from "../../utils/toLocaleTime";
import _ from "lodash";
import { Link } from "react-router-dom";
import Parser from 'html-react-parser';

class ProjectProfile extends Component {
state = {
Expand Down Expand Up @@ -70,7 +71,7 @@ class ProjectProfile extends Component {
{
["Modified Time", "Created At"].includes(row.label) ?
toLocaleTime(_.get(project, row.path)) :
_.get(project, row.path)
Parser(_.get(project, row.path))
}
</td>
</tr>
Expand Down
6 changes: 2 additions & 4 deletions src/components/Project/Public/PublicProjectProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ class PublicProjectProfile extends Component {
<p className="card-text mb-4">
{
project.communities && project.communities.length > 0 && project.communities.map((community, index) => {
return <Link to={`/experiments/public-projects?community=${community}`}>
<span
return (<span
className="badge badge-pill badge-primary mr-1"
key={`project-community-${index}`}
>
{community}
</span>
</Link>
</span>)
})
}
{
Expand Down
Loading

0 comments on commit bbec3bb

Please sign in to comment.