Skip to content

Commit

Permalink
Fixed TableComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
ScoutAtlas committed Jun 22, 2021
1 parent 796ad75 commit bd73f1f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
18 changes: 17 additions & 1 deletion frontend/src/components/details/TableComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
*
*
*/

class TableComponent extends Component {
state = {
headers: getImpactCategoriesTableHeaders(),
Expand All @@ -30,8 +31,23 @@ class TableComponent extends Component {
};
render() {
console.log('getImpactAssessmentData[6]');
console.log(getImpactAssessmentData[6]);
var ImpactData = getImpactAssessmentData();
console.log(ImpactData[6]);
const idKey = this.props.id;

this.setState(this.state.header, getImpactCategoriesTableHeaders());
this.setState(this.state.rows, [
{
key: 'row-1',
impactCategory: 'Global Warming',
unit: ImpactData[6],
total: ImpactData[5],
materialsLPT: ImpactData[4],
manufacturing: ImpactData[0],
operations: ImpactData[3],
endOfLife: ImpactData[2]
}
]);
return (
// TODO:left margin value needed to be fixed
<Container fluid={true}>
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/interface/projectInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ export function setLifeCycleStages(assessmentModels) {
console.log(lifeCycleStages);
}
/**
* Getter method to recieve the filtered Life Cycle Stages from API
* Getter method to recieve the fixed Life Cycle Stages
* These stages wil always stay constant
*/
export function getLifeCycleStages() {
return lifeCycleStages;
return ['Materials', 'Manufacturing and Transport', 'Operation 30a (75% load)', 'End of Life'];
}

/**
Expand Down

0 comments on commit bd73f1f

Please sign in to comment.