Compare commits

3 Commits
Author SHA1 Message Date
robin 9935be7a25 Merge branch 'main' into feat/evaluation 2026-08-04 09:36:23 +00:00
robin f19babaa68 style: adjust formats in UI 2026-08-04 11:30:18 +02:00
robin fc8142a131 feat: display total percentage 2026-08-04 11:24:38 +02:00
@@ -108,6 +108,7 @@ export default async function EvaluationPage({ params }: PageProps) {
<th style={{ padding: '0.5rem' }}>Kategorie</th> <th style={{ padding: '0.5rem' }}>Kategorie</th>
<th style={{ padding: '0.5rem' }}>Dauer</th> <th style={{ padding: '0.5rem' }}>Dauer</th>
<th style={{ padding: '0.5rem' }}>Anteil</th> <th style={{ padding: '0.5rem' }}>Anteil</th>
<th style={{ padding: '0.5rem' }}>Insg. Anteil</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -115,11 +116,14 @@ export default async function EvaluationPage({ params }: PageProps) {
<tr key={category} style={{ borderBottom: '1px solid #e5e7eb' }}> <tr key={category} style={{ borderBottom: '1px solid #e5e7eb' }}>
<td style={{ padding: '0.5rem' }}>{category}</td> <td style={{ padding: '0.5rem' }}>{category}</td>
<td style={{ padding: '0.5rem', whiteSpace: 'nowrap' }}> <td style={{ padding: '0.5rem', whiteSpace: 'nowrap' }}>
{Math.floor(minutes / 60)} Std. {Math.round(minutes % 60)} Min. ({Math.round(minutes)} Min. gesamt) {Math.floor(minutes / 60)}:{Math.round(minutes % 60)}h (={Math.round(minutes)} min)
</td> </td>
<td style={{ padding: '0.5rem' }}> <td style={{ padding: '0.5rem' }}>
{total > 0 ? Math.round((minutes / total) * 1000) / 10 : 0}% {total > 0 ? Math.round((minutes / total) * 1000) / 10 : 0}%
</td> </td>
<td style={{ padding: '0.5rem' }}>
{total > 0 ? Math.round((minutes / (daysToFetch * 24 * 60)) * 1000) / 10 : 0}%
</td>
</tr> </tr>
))} ))}
</tbody> </tbody>
@@ -127,9 +131,12 @@ export default async function EvaluationPage({ params }: PageProps) {
<tr style={{ fontWeight: 'bold' }}> <tr style={{ fontWeight: 'bold' }}>
<td style={{ padding: '0.5rem' }}>Total</td> <td style={{ padding: '0.5rem' }}>Total</td>
<td style={{ padding: '0.5rem', whiteSpace: 'nowrap' }}> <td style={{ padding: '0.5rem', whiteSpace: 'nowrap' }}>
{Math.floor(total / 60)} Std. {Math.round(total % 60)} Min. ({Math.round(total)} Min. gesamt) {Math.floor(total / 60)}:{Math.round(total % 60)}h (={Math.round(total)} min)
</td> </td>
<td style={{ padding: '0.5rem' }}>100%</td> <td style={{ padding: '0.5rem' }}>100%</td>
<td style={{ padding: '0.5rem' }}>
{total > 0 ? Math.round((total / (daysToFetch * 24 * 60)) * 1000) / 10 : 0}%
</td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
@@ -190,7 +197,6 @@ export default async function EvaluationPage({ params }: PageProps) {
display: 'inline-block', display: 'inline-block',
background: '#white', background: '#white',
border: '1px solid #e5e7eb', border: '1px solid #e5e7eb',
color: 'black',
padding: '2px 8px', padding: '2px 8px',
borderRadius: '4px', borderRadius: '4px',
fontSize: '0.85rem', fontSize: '0.85rem',