feat: Add date formatting utility functions and integrate them across components
This commit is contained in:
@@ -6,6 +6,7 @@ import TaskStatusDropdownSimple from "./TaskStatusDropdownSimple";
|
||||
import { Card, CardHeader, CardContent } from "./ui/Card";
|
||||
import Button from "./ui/Button";
|
||||
import Badge from "./ui/Badge";
|
||||
import { formatDate } from "@/lib/utils";
|
||||
|
||||
export default function ProjectTasksSection({ projectId }) {
|
||||
const [projectTasks, setProjectTasks] = useState([]);
|
||||
@@ -444,7 +445,7 @@ export default function ProjectTasksSection({ projectId }) {
|
||||
</td>{" "}
|
||||
<td className="px-4 py-4 text-sm text-gray-600">
|
||||
{task.date_started
|
||||
? new Date(task.date_started).toLocaleDateString()
|
||||
? formatDate(task.date_started)
|
||||
: "Not started"}
|
||||
</td>{" "}
|
||||
<td className="px-4 py-4">
|
||||
@@ -519,15 +520,11 @@ export default function ProjectTasksSection({ projectId }) {
|
||||
</div>
|
||||
<p className="text-sm text-gray-800">
|
||||
{note.note}
|
||||
</p>
|
||||
</p>{" "}
|
||||
<p className="text-xs text-gray-500 mt-1">
|
||||
{new Date(
|
||||
note.note_date
|
||||
).toLocaleDateString()}{" "}
|
||||
at{" "}
|
||||
{new Date(
|
||||
note.note_date
|
||||
).toLocaleTimeString()}
|
||||
{formatDate(note.note_date, {
|
||||
includeTime: true,
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
{!note.is_system && (
|
||||
|
||||
Reference in New Issue
Block a user