render energy savings table
This commit is contained in:
@@ -35,8 +35,9 @@ var Layout = React.createClass({
|
||||
var layout = this,
|
||||
view = event.target.value;
|
||||
layout.view_name = event.target.innerText;
|
||||
layout.setState({view: view});
|
||||
layout.ensureHouseViewData();
|
||||
layout.setState({view: view}, function(){
|
||||
layout.ensureHouseViewData();
|
||||
});
|
||||
},
|
||||
|
||||
setHouse: function(event){
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Day</th>
|
||||
<th>Consumption (Wh)</th>
|
||||
<th>Production (Wh)</th>
|
||||
<th>Consumption (kWh)</th>
|
||||
<th>Production (kWh)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function () {
|
||||
'onChange': this.setHouse
|
||||
},
|
||||
_.map(this.state.houses, repeatHouse2.bind(this))
|
||||
])) : null, this.state.view === 'energy' && this.state.house ? React.createElement('table', { 'className': 'table' }, React.createElement('thead', {}, React.createElement('tr', {}, React.createElement('th', {}), React.createElement('th', {}, 'Day'), React.createElement('th', {}, 'Consumption (Wh)'), React.createElement('th', {}, 'Production (Wh)'))), React.createElement.apply(this, [
|
||||
])) : null, this.state.view === 'energy' && this.state.house ? React.createElement('table', { 'className': 'table' }, React.createElement('thead', {}, React.createElement('tr', {}, React.createElement('th', {}), React.createElement('th', {}, 'Day'), React.createElement('th', {}, 'Consumption (kWh)'), React.createElement('th', {}, 'Production (kWh)'))), React.createElement.apply(this, [
|
||||
'tbody',
|
||||
{},
|
||||
_.map(this.state.house.energy_data, repeatEnergy_datum3.bind(this))
|
||||
|
||||
Reference in New Issue
Block a user