diff --git a/artifacts/cra-app/src/pages/timesheet-detail.tsx b/artifacts/cra-app/src/pages/timesheet-detail.tsx index 7f4ddef..bc46edb 100644 --- a/artifacts/cra-app/src/pages/timesheet-detail.tsx +++ b/artifacts/cra-app/src/pages/timesheet-detail.tsx @@ -112,6 +112,7 @@ export default function TimesheetDetailPage() { const [localDescriptions, setLocalDescriptions] = useState>({}); const [isAddingLine, setIsAddingLine] = useState(false); const [hasUnsavedChanges, setHasUnsavedChanges] = useState(false); + const [showDays, setShowDays] = useState(false); const dirtyKeysRef = useRef>(new Set()); const { data: projects } = useListProjects({ query: { queryKey: getListProjectsQueryKey() } }); @@ -421,17 +422,43 @@ export default function TimesheetDetailPage() {
- {isEditable && ( -
- +
+
+ {isEditable && ( + + )} +
+
+
+ h + + j +
- Total: {grandTotal}h + Total: + {showDays ? `${Math.ceil(grandTotal / 8)}j` : `${grandTotal}h`} +
- )} +
@@ -571,7 +598,9 @@ export default function TimesheetDetailPage() { @@ -593,12 +622,12 @@ export default function TimesheetDetailPage() { total >= 8 ? "text-green-700 font-bold bg-green-50" : "" )} > - {total > 0 ? total : ""} + {total > 0 ? (showDays ? `${Math.ceil(total / 8)}j` : total) : ""} ); })}
{rowTotals[line.id] > 0 ? ( - {rowTotals[line.id]}h + + {showDays ? `${Math.ceil(rowTotals[line.id] / 8)}j` : `${rowTotals[line.id]}h`} + ) : "-"}
- {grandTotal}h + {showDays ? `${Math.ceil(grandTotal / 8)}j` : `${grandTotal}h`}