Revize 1865a0be
Přidáno uživatelem Pavel Fidransky před více než 4 roky(ů)
client/src/Overview.js | ||
---|---|---|
1 | 1 |
import React from 'react'; |
2 | 2 |
import './App.css'; |
3 | 3 |
|
4 |
export default function OffsAvailable(props) { |
|
4 | 5 |
|
5 |
const OffsAvailable = (props) => { |
|
6 |
if (props.currentUser === undefined) { |
|
7 |
return null; |
|
8 |
} |
|
6 | 9 |
|
7 |
return props.currentUser === undefined ? null : (
|
|
8 |
<div>
|
|
9 |
<div className="side-content">
|
|
10 |
<div className="side-board column">
|
|
11 |
<div className="side-board-heading row">
|
|
12 |
<h3>Overview</h3>
|
|
13 |
</div>
|
|
14 |
<div className="underline-1"></div>
|
|
15 |
<div className="side-board-items column">
|
|
16 |
<table border = "0">
|
|
17 |
<tbody>
|
|
18 |
<tr>
|
|
19 |
<th className="th-left">Name</th>
|
|
20 |
<th>Sick Days</th>
|
|
21 |
<th>Holiday</th>
|
|
22 |
</tr>
|
|
23 |
<tr>
|
|
24 |
<td>{props.currentUser.name}</td>
|
|
25 |
<td className="td-center">{props.currentUser.takenSickday + '/' + props.currentUser.sickday}</td>
|
|
26 |
<td className="td-center">{props.currentUser.holiday}</td>
|
|
27 |
</tr>
|
|
28 |
</tbody>
|
|
29 |
</table>
|
|
30 |
</div>
|
|
31 |
</div>
|
|
10 |
return (
|
|
11 |
<div> |
|
12 |
<div className="side-content"> |
|
13 |
<div className="side-board column"> |
|
14 |
<div className="side-board-heading row"> |
|
15 |
<h3>Overview</h3> |
|
16 |
</div> |
|
17 |
<div className="underline-1"></div> |
|
18 |
<div className="side-board-items column"> |
|
19 |
<table border = "0"> |
|
20 |
<tbody> |
|
21 |
<tr> |
|
22 |
<th className="th-left">Name</th> |
|
23 |
<th>Sick Days</th> |
|
24 |
<th>Holiday</th> |
|
25 |
</tr>
|
|
26 |
<tr> |
|
27 |
<td>{props.currentUser.name}</td> |
|
28 |
<td className="td-center">{props.currentUser.takenSickday + '/' + props.currentUser.sickday}</td> |
|
29 |
<td className="td-center">{props.currentUser.holiday}</td> |
|
30 |
</tr> |
|
31 |
</tbody> |
|
32 |
</table> |
|
33 |
</div> |
|
34 |
</div> |
|
32 | 35 |
</div> |
33 |
</div> |
|
34 |
);
|
|
36 |
</div>
|
|
37 |
); |
|
35 | 38 |
} |
36 |
|
|
37 |
|
|
38 |
export default OffsAvailable; |
Také k dispozici: Unified diff
re #58 massive code formatting