Created
June 22, 2018 05:12
-
-
Save khanof89/2aaa02227d7b808b1ce31868e52ef5fd to your computer and use it in GitHub Desktop.
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
const table = (props) => { | |
return ( | |
<table className="customeTable tableInventory"> | |
<TableHead/> | |
<tbody className="admin-list-table-body"> | |
{props.dayNames.map((index, value) => { | |
return (<tr className="rowClickable" key={value}> | |
<th className="table_head" key={value}>{moment().format('YYYY-MM-DD') === index ? 'Today' : moment(index).format('dddd')}</th> | |
{[...Array(24).keys()].map((i) => { | |
return (<td className="tableCells" key={i}> | |
<input type="text" className="inputBox" value={(props.availabilities) ? props.availabilities[i] : '0'} onChange={e =>props.textInput(e)} data-id={index+'_'+i} defaultValue="0"/> | |
</td>); | |
})} | |
</tr>); | |
})} | |
</tbody> | |
</table> | |
); | |
}; | |
const table = (props) => { | |
return ( | |
<table className="customeTable tableInventory"> | |
<TableHead/> | |
<tbody className="admin-list-table-body"> | |
{props.dayNames.map((index, value) => { | |
return (<tr className="rowClickable" key={value}> | |
<th className="table_head" key={value}>{moment().format('YYYY-MM-DD') === index ? 'Today' : moment(index).format('dddd')}</th> | |
{[...Array(24).keys()].map((i) => { | |
{[...Array(7).keys()].map((j) => { | |
return (<td className="tableCells" key={i}> | |
<input type="text" className="inputBox" value={(props.availabilities) ? props.availabilities[i] : '0'} onChange={e =>props.textInput(e)} data-id={index+'_'+i} defaultValue="0"/> | |
</td>); | |
})} | |
})} | |
</tr>); | |
})} | |
</tbody> | |
</table> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment