Highlight daily totals in green when reaching a target time
Update the daily total column to conditionally apply green text and background when the total hours reach 8 or more. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 55837015-10e9-4be9-b857-7f5e6be73772 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: ddf2416a-27fb-4a3f-a16f-eac615deea14 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1cc377db-7ea0-49f2-97ce-c3e87e0228cc/55837015-10e9-4be9-b857-7f5e6be73772/VNBDw7e Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
26d16b9c93
commit
e87dc0dfb9
@ -517,11 +517,20 @@ export default function TimesheetDetailPage() {
|
||||
<td className="sticky left-0 z-30 px-2 py-1.5 border-r border-t text-right text-xs bg-muted/80">
|
||||
Total du jour
|
||||
</td>
|
||||
{daysArray.map(day => (
|
||||
<td key={day.dateStr} className="px-0 py-1.5 text-center border-r border-t text-xs">
|
||||
{colTotals[day.dateStr] > 0 ? colTotals[day.dateStr] : ""}
|
||||
{daysArray.map(day => {
|
||||
const total = colTotals[day.dateStr] || 0;
|
||||
return (
|
||||
<td
|
||||
key={day.dateStr}
|
||||
className={cn(
|
||||
"px-0 py-1.5 text-center border-r border-t text-xs",
|
||||
total >= 8 ? "text-green-700 font-bold bg-green-50" : ""
|
||||
)}
|
||||
>
|
||||
{total > 0 ? total : ""}
|
||||
</td>
|
||||
))}
|
||||
);
|
||||
})}
|
||||
<td className="px-1 py-1.5 text-center text-primary font-bold border-t sticky right-0 z-20 bg-muted/80">
|
||||
{grandTotal}h
|
||||
</td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user