feat(workspace): 增加个人今日日报列
This commit is contained in:
@@ -5,6 +5,7 @@ import { Plus, Trash2 } from 'lucide-react';
|
||||
import { useTaskWorklogStore } from '@/stores/useTaskWorklogStore';
|
||||
import { useAuthStore } from '@/stores/useAuthStore';
|
||||
import { getTaskWorklogs } from '@/lib/task-worklog';
|
||||
import { formatLocalDate } from '@/lib/format';
|
||||
|
||||
interface Props {
|
||||
taskId: string;
|
||||
@@ -17,7 +18,7 @@ export function WorklogPanel({ taskId }: Props) {
|
||||
const taskLogs = getTaskWorklogs(worklogs, taskId);
|
||||
const totalHours = taskLogs.reduce((sum, w) => sum + w.hours, 0);
|
||||
|
||||
const today = new Date().toISOString().slice(0, 10);
|
||||
const today = formatLocalDate();
|
||||
const [date, setDate] = useState(today);
|
||||
const [hours, setHours] = useState<number>(1);
|
||||
const [workContent, setWorkContent] = useState('');
|
||||
|
||||
Reference in New Issue
Block a user