update time visualization
This commit is contained in:
@@ -5,7 +5,7 @@ import { ProjectColorDot } from "@/components/ProjectColorDot";
|
||||
import { StatCard } from "@/components/StatCard";
|
||||
import {
|
||||
formatDate,
|
||||
formatDurationFromDates,
|
||||
formatDurationFromDatesHoursMinutes,
|
||||
formatDurationHoursMinutes,
|
||||
calculateDuration,
|
||||
} from "@/utils/dateUtils";
|
||||
@@ -123,8 +123,8 @@ export function DashboardPage() {
|
||||
<td className="px-4 py-3 whitespace-nowrap text-sm text-gray-500">
|
||||
{formatDate(entry.startTime)}
|
||||
</td>
|
||||
<td className="px-4 py-3 whitespace-nowrap text-sm text-gray-900 font-mono">
|
||||
{formatDurationFromDates(entry.startTime, entry.endTime)}
|
||||
<td className="px-4 py-3 whitespace-nowrap text-sm text-gray-900 font-mono">
|
||||
{formatDurationFromDatesHoursMinutes(entry.startTime, entry.endTime)}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { useStatistics } from "@/hooks/useTimeEntries";
|
||||
import { useClients } from "@/hooks/useClients";
|
||||
import { useProjects } from "@/hooks/useProjects";
|
||||
import { ProjectColorDot } from "@/components/ProjectColorDot";
|
||||
import { formatDuration, toISOTimezone } from "@/utils/dateUtils";
|
||||
import { formatDurationHoursMinutes, toISOTimezone } from "@/utils/dateUtils";
|
||||
import type { StatisticsFilters } from "@/types";
|
||||
|
||||
export function StatisticsPage() {
|
||||
@@ -166,7 +166,7 @@ export function StatisticsPage() {
|
||||
{isLoading ? (
|
||||
<span className="text-2xl">Loading...</span>
|
||||
) : (
|
||||
formatDuration(statistics?.totalSeconds || 0)
|
||||
formatDurationHoursMinutes(statistics?.totalSeconds || 0)
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
@@ -202,7 +202,7 @@ export function StatisticsPage() {
|
||||
</span>
|
||||
</div>
|
||||
<span className="font-mono font-semibold text-gray-900">
|
||||
{formatDuration(project.totalSeconds)}
|
||||
{formatDurationHoursMinutes(project.totalSeconds)}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
@@ -232,7 +232,7 @@ export function StatisticsPage() {
|
||||
</span>
|
||||
</div>
|
||||
<span className="font-mono font-semibold text-gray-900">
|
||||
{formatDuration(client.totalSeconds)}
|
||||
{formatDurationHoursMinutes(client.totalSeconds)}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useProjects } from '@/hooks/useProjects';
|
||||
import { Modal } from '@/components/Modal';
|
||||
import { Spinner } from '@/components/Spinner';
|
||||
import { ProjectColorDot } from '@/components/ProjectColorDot';
|
||||
import { formatDate, formatDurationFromDates, getLocalISOString, toISOTimezone } from '@/utils/dateUtils';
|
||||
import { formatDate, formatDurationFromDatesHoursMinutes, getLocalISOString, toISOTimezone } from '@/utils/dateUtils';
|
||||
import type { TimeEntry, CreateTimeEntryInput, UpdateTimeEntryInput } from '@/types';
|
||||
|
||||
export function TimeEntriesPage() {
|
||||
@@ -127,7 +127,7 @@ export function TimeEntriesPage() {
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td className="px-4 py-3 whitespace-nowrap text-sm font-mono text-gray-900">{formatDurationFromDates(entry.startTime, entry.endTime)}</td>
|
||||
<td className="px-4 py-3 whitespace-nowrap text-sm font-mono text-gray-900">{formatDurationFromDatesHoursMinutes(entry.startTime, entry.endTime)}</td>
|
||||
<td className="px-4 py-3 whitespace-nowrap text-right">
|
||||
<button onClick={() => handleOpenModal(entry)} className="p-1.5 text-gray-400 hover:text-gray-600 mr-1"><Edit2 className="h-4 w-4" /></button>
|
||||
<button onClick={() => handleDelete(entry)} className="p-1.5 text-gray-400 hover:text-red-600"><Trash2 className="h-4 w-4" /></button>
|
||||
|
||||
Reference in New Issue
Block a user