Add spacing to time and day units for better readability

Updates the display format for time and day totals to include a space between the numerical value and its unit (e.g., "9 h" instead of "9h", "2 j" instead of "2j") in the timesheet detail page.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 55837015-10e9-4be9-b857-7f5e6be73772
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 4d5fc4ac-aaa0-45c8-8a5b-b340b393d463
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1cc377db-7ea0-49f2-97ce-c3e87e0228cc/55837015-10e9-4be9-b857-7f5e6be73772/fiIXlhI
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
SylvainP1 2026-04-24 08:42:13 +00:00
parent e8fce75535
commit 8f0cd394c0
2 changed files with 4 additions and 4 deletions

View File

@ -454,7 +454,7 @@ export default function TimesheetDetailPage() {
</div> </div>
<div className="text-sm font-medium"> <div className="text-sm font-medium">
Total: <span className="text-lg text-primary"> Total: <span className="text-lg text-primary">
{showDays ? `${Math.ceil(grandTotal / 8)}j` : `${grandTotal}h`} {showDays ? `${Math.ceil(grandTotal / 8)} j` : `${grandTotal} h`}
</span> </span>
</div> </div>
</div> </div>
@ -599,7 +599,7 @@ export default function TimesheetDetailPage() {
<td className="px-1 py-1.5 text-center font-medium bg-card sticky right-0 z-10 group-hover:bg-muted/20"> <td className="px-1 py-1.5 text-center font-medium bg-card sticky right-0 z-10 group-hover:bg-muted/20">
{rowTotals[line.id] > 0 ? ( {rowTotals[line.id] > 0 ? (
<span className="text-primary text-xs font-bold"> <span className="text-primary text-xs font-bold">
{showDays ? `${Math.ceil(rowTotals[line.id] / 8)}j` : `${rowTotals[line.id]}h`} {showDays ? `${Math.ceil(rowTotals[line.id] / 8)} j` : `${rowTotals[line.id]} h`}
</span> </span>
) : "-"} ) : "-"}
</td> </td>
@ -622,12 +622,12 @@ export default function TimesheetDetailPage() {
total >= 8 ? "text-green-700 font-bold bg-green-50" : "" total >= 8 ? "text-green-700 font-bold bg-green-50" : ""
)} )}
> >
{total > 0 ? (showDays ? `${Math.ceil(total / 8)}j` : total) : ""} {total > 0 ? (showDays ? `${Math.ceil(total / 8)} j` : `${total} h`) : ""}
</td> </td>
); );
})} })}
<td className="px-1 py-1.5 text-center text-primary font-bold border-t sticky right-0 z-20 bg-muted/80"> <td className="px-1 py-1.5 text-center text-primary font-bold border-t sticky right-0 z-20 bg-muted/80">
{showDays ? `${Math.ceil(grandTotal / 8)}j` : `${grandTotal}h`} {showDays ? `${Math.ceil(grandTotal / 8)} j` : `${grandTotal} h`}
</td> </td>
</tr> </tr>
</tfoot> </tfoot>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB