Skip to content

Instantly share code, notes, and snippets.

@zacck-zz
Created January 9, 2017 19:23
Show Gist options
  • Save zacck-zz/cfd7c613270d4b6ecaee05133cff9de7 to your computer and use it in GitHub Desktop.
Save zacck-zz/cfd7c613270d4b6ecaee05133cff9de7 to your computer and use it in GitHub Desktop.
rateperiods.map((period) => {
var filteredCosts = ratecosts.filter((cost) => {
return cost.rate_period == period.id ;
});
if(filteredCosts.length === 0 ){
return(<p>No Periods for supplier yet</p>)
}
return filteredCosts.map((costdata) => {
return(
<div className="row">
<div className="columns small-2 large-2 medium-2">
{period-start} - {period.end}
</div>
<div className="columns small-2 large-2 medium-2">
{costdata.single}
</div>
<div className="columns small-2 large-2 medium-2">
{costdata.pps}
</div>
<div className="columns small-2 large-2 medium-2">
{costdata.thirdadu}
</div>
<div className="columns small-2 large-2 medium-2">
{costdata.child}
</div>
</div>
)
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment