generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from amosproj/frontend-dev-#18
- Loading branch information
Showing
17 changed files
with
498 additions
and
23,921 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -44,6 +44,7 @@ | |
] | ||
}, | ||
"devDependencies": { | ||
"gh-pages": "^2.0.1" | ||
"gh-pages": "^2.0.1", | ||
"prettier": "2.3.0" | ||
} | ||
} |
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
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,123 @@ | ||
import React, { Component } from 'react'; | ||
import PieChart from './PieChartComponent'; | ||
import ColumnChart from './ColumnChartComponent'; | ||
import Table from './TableComponent'; | ||
import { Container, Row, Col } from 'react-grid-system'; | ||
import theme from 'resources/theme'; | ||
/** | ||
* This component displays the difference/comparison between the dashboards of two different type of variables of the same model | ||
* will be compared when clicking on the "comparison" button. | ||
* | ||
* @returns the dasboard comparison | ||
* @author Parham Gandomkar, Irem Toroslu | ||
* | ||
* | ||
*/ | ||
|
||
const CompareCanvas = () => { | ||
return ( | ||
<Container fluid={true}> | ||
<Row> | ||
<Col xs={5} style={{ marginRight: 150 }}> | ||
<h3 | ||
style={{ | ||
fontSize: theme.typography.subtitle.fontSize, | ||
fontWeight: theme.typography.subtitle.fontWeight, | ||
lineHeight: theme.typography.subtitle.lineHeight, | ||
letterSpacing: theme.typography.subtitle.letterSpacing, | ||
marginLeft: 120 | ||
}} | ||
> | ||
{' '} | ||
Material Composition{' '} | ||
</h3> | ||
<PieChart></PieChart> | ||
</Col> | ||
<Col xs={5}> | ||
<h3 | ||
style={{ | ||
fontSize: theme.typography.subtitle.fontSize, | ||
fontWeight: theme.typography.subtitle.fontWeight, | ||
lineHeight: theme.typography.subtitle.lineHeight, | ||
letterSpacing: theme.typography.subtitle.letterSpacing, | ||
marginLeft: 120 | ||
}} | ||
> | ||
{' '} | ||
Material Composition{' '} | ||
</h3> | ||
<PieChart></PieChart> | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col xs={5} style={{ marginRight: 150 }}> | ||
<h3 | ||
style={{ | ||
fontSize: theme.typography.subtitle.fontSize, | ||
fontWeight: theme.typography.subtitle.fontWeight, | ||
lineHeight: theme.typography.subtitle.lineHeight, | ||
letterSpacing: theme.typography.subtitle.letterSpacing, | ||
marginLeft: 80 | ||
}} | ||
> | ||
{' '} | ||
Results of the impact assessment{' '} | ||
</h3> | ||
<ColumnChart></ColumnChart> | ||
</Col> | ||
<Col xs={5}> | ||
<h3 | ||
style={{ | ||
fontSize: theme.typography.subtitle.fontSize, | ||
fontWeight: theme.typography.subtitle.fontWeight, | ||
lineHeight: theme.typography.subtitle.lineHeight, | ||
letterSpacing: theme.typography.subtitle.letterSpacing, | ||
marginLeft: 80 | ||
}} | ||
> | ||
{' '} | ||
Results of the impact assessment{' '} | ||
</h3> | ||
<ColumnChart></ColumnChart> | ||
</Col> | ||
</Row> | ||
|
||
<Row> | ||
<Col xs={10}> | ||
<h3 | ||
style={{ | ||
fontSize: theme.typography.subtitle.fontSize, | ||
fontWeight: theme.typography.subtitle.fontWeight, | ||
lineHeight: theme.typography.subtitle.lineHeight, | ||
letterSpacing: theme.typography.subtitle.letterSpacing | ||
}} | ||
> | ||
{' '} | ||
Impact categories{' '} | ||
</h3> | ||
<Table></Table> | ||
</Col> | ||
</Row> | ||
<Row className='w3-margin-top'> | ||
<Col xs={10}> | ||
<h3 | ||
style={{ | ||
fontSize: theme.typography.subtitle.fontSize, | ||
fontWeight: theme.typography.subtitle.fontWeight, | ||
lineHeight: theme.typography.subtitle.lineHeight, | ||
letterSpacing: theme.typography.subtitle.letterSpacing | ||
}} | ||
> | ||
{' '} | ||
Impact categories{' '} | ||
</h3> | ||
<div style={{ marginBottom: 30 }}> | ||
<Table></Table> | ||
</div> | ||
</Col> | ||
</Row> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default CompareCanvas; |
54 changes: 54 additions & 0 deletions
54
frontend/src/components/details/CompareVariablesComponent.jsx
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,54 @@ | ||
import React, { Component } from 'react'; | ||
import theme from 'resources/theme'; | ||
|
||
/** | ||
a drop down component for selecting variables | ||
if we need to compare two variables | ||
@author Parham Gandomkar | ||
*/ | ||
const CompareVariablesComponent = (props) => { | ||
const {state} = props; | ||
return ( | ||
|
||
<div> | ||
Pick your desire variable: | ||
<div className='w3-dropdown-hover w3-margin-left w3-margin-right w3-margin-top'> | ||
<button className='w3-button w3-2018-sailor-blue' style={{fontSize:theme.typography.buttontitle.fontSize,fontWeight:theme.typography.buttontitle.fontWeight,lineHeight:theme.typography.buttontitle.lineHeight,letterSpacing:theme.typography.buttonSendtitle.letterSpacing}}> | ||
{state.selectedVariable} | ||
</button> | ||
<div className='w3-dropdown-content w3-bar-block w3-border' style={{fontSize:theme.typography.buttontitle.fontSize,fontWeight:theme.typography.buttontitle.fontWeight,lineHeight:theme.typography.buttontitle.lineHeight,letterSpacing:theme.typography.buttonSendtitle.letterSpacing}}> | ||
{state.variables.map((item) => ( | ||
<a | ||
onClick={() => props.firstDropDownHandler(item.name)} | ||
className='w3-bar-item w3-button' | ||
key={item.id} | ||
> | ||
{item.name} | ||
</a> | ||
))} | ||
</div> | ||
</div> | ||
<div className='w3-dropdown-hover w3-margin-left w3-margin-right w3-margin-top'> | ||
<button className='w3-button w3-2018-sailor-blue' style={{fontSize:theme.typography.buttontitle.fontSize,fontWeight:theme.typography.buttontitle.fontWeight,lineHeight:theme.typography.buttontitle.lineHeight,letterSpacing:theme.typography.buttonSendtitle.letterSpacing}}> | ||
{state.secondVariable} | ||
</button> | ||
<div className='w3-dropdown-content w3-bar-block w3-border' style={{fontSize:theme.typography.buttontitle.fontSize,fontWeight:theme.typography.buttontitle.fontWeight,lineHeight:theme.typography.buttontitle.lineHeight,letterSpacing:theme.typography.buttonSendtitle.letterSpacing}}> | ||
{state.variables.map((item) => ( | ||
<a | ||
onClick={() => props.secondDropDownHandler(item.name)} | ||
className='w3-bar-item w3-button' | ||
key={item.id} | ||
> | ||
{item.name} | ||
</a> | ||
))} | ||
</div> | ||
</div> | ||
<button onClick={props.submitHandler} style={{backgroundColor:theme.uniformStyle.color.sendButtonColor}} className='w3-button w3-wide'> | ||
<b style={{fontSize:theme.typography.buttonSendtitle.fontSize,fontWeight:theme.typography.buttonSendtitle.fontWeight,letterSpacing:theme.typography.buttonSendtitle.letterSpacing,lineHeight:theme.typography.buttonSendtitle.lineHeight}}>Send Request</b> | ||
</button> | ||
</div> ); | ||
} | ||
|
||
export default CompareVariablesComponent; |
Oops, something went wrong.