Guest User

Untitled

a guest
Jun 23rd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. const table = (props) => {
  2. return (
  3. <table className="customeTable tableInventory">
  4. <TableHead/>
  5. <tbody className="admin-list-table-body">
  6. {props.dayNames.map((index, value) => {
  7. return (<tr className="rowClickable" key={value}>
  8. <th className="table_head" key={value}>{moment().format('YYYY-MM-DD') === index ? 'Today' : moment(index).format('dddd')}</th>
  9. {[...Array(24).keys()].map((i) => {
  10. return (<td className="tableCells" key={i}>
  11. <input type="text" className="inputBox" value={(props.availabilities) ? props.availabilities[i] : '0'} onChange={e =>props.textInput(e)} data-id={index+'_'+i} defaultValue="0"/>
  12. </td>);
  13. })}
  14. </tr>);
  15. })}
  16. </tbody>
  17. </table>
  18.  
  19. );
  20. };
  21.  
  22.  
  23.  
  24.  
  25. const table = (props) => {
  26. return (
  27. <table className="customeTable tableInventory">
  28. <TableHead/>
  29. <tbody className="admin-list-table-body">
  30. {props.dayNames.map((index, value) => {
  31. return (<tr className="rowClickable" key={value}>
  32. <th className="table_head" key={value}>{moment().format('YYYY-MM-DD') === index ? 'Today' : moment(index).format('dddd')}</th>
  33. {[...Array(24).keys()].map((i) => {
  34. {[...Array(7).keys()].map((j) => {
  35. return (<td className="tableCells" key={i}>
  36. <input type="text" className="inputBox" value={(props.availabilities) ? props.availabilities[i] : '0'} onChange={e =>props.textInput(e)} data-id={index+'_'+i} defaultValue="0"/>
  37. </td>);
  38. })}
  39. })}
  40. </tr>);
  41. })}
  42. </tbody>
  43. </table>
  44.  
  45. );
  46. };
Add Comment
Please, Sign In to add comment