diff --git a/app/(dashboard)/task/client-detail/[client_id]/(main)/page.tsx b/app/(dashboard)/task/client-detail/[client_id]/(main)/page.tsx index 569fba6..422fa57 100644 --- a/app/(dashboard)/task/client-detail/[client_id]/(main)/page.tsx +++ b/app/(dashboard)/task/client-detail/[client_id]/(main)/page.tsx @@ -59,7 +59,7 @@ export default async function ClientDetailPage({ params, searchParams }: Props) ); // --- Status Filter --- - const itemStatus = item.project_status?.name?.toLowerCase(); + const itemStatus = item.project_assignment_status?.name?.toLowerCase(); const matchesStatus = activeStatuses.length === 0 || (itemStatus && activeStatuses.includes(itemStatus)); return matchesSearch && matchesStatus; diff --git a/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/ProjectDetailComponent.tsx b/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/ProjectDetailComponent.tsx index c8dd5e4..f6957fb 100644 --- a/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/ProjectDetailComponent.tsx +++ b/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/ProjectDetailComponent.tsx @@ -7,10 +7,8 @@ import { Card, CardContent, CardHeader, CardTitle, CardDescription, Card900 } fr import { Badge } from '@/components/ui/badge'; import { Separator } from '@/components/ui/separator'; import { Label } from '@/components/ui/label'; -import { cn } from '@/lib/utils'; import { useRouter } from 'next/navigation'; import { useState } from 'react'; -import FormUpdateStatus from '@/app/(dashboard)/task/component/UpdateTimelineStatus'; import { IClient } from '@/app/(dashboard)/task/types'; import { IProjectAssignment } from '@/app/(dashboard)/task/type.assignment'; import { IProject } from '@/app/(dashboard)/task/type.project'; @@ -132,7 +130,7 @@ export default function ProjectDetailComponent({ client, project }: Props) {

{assignment.wo_name}

- +

{assignment.wo_description ?? 'No description available for this project!'}

@@ -163,10 +161,10 @@ export default function ProjectDetailComponent({ client, project }: Props) {
- {history.status} - {new Date(history.date_status_changed).toLocaleDateString()} + {history.project_assignment_status.name} + {new Date(history.updated_at!).toLocaleDateString()}
-

{history.status_remarks}

+ {/*

{history.status_remarks}

*/}
))} @@ -182,16 +180,6 @@ export default function ProjectDetailComponent({ client, project }: Props) {
- - {action === 'ASSIGNMENT' ? - - : null - } - - {action === 'WO' ? - - : null - } ); } \ No newline at end of file diff --git a/app/(dashboard)/task/component/AssignmentTable.tsx b/app/(dashboard)/task/component/AssignmentTable.tsx index ad60582..206f7c5 100644 --- a/app/(dashboard)/task/component/AssignmentTable.tsx +++ b/app/(dashboard)/task/component/AssignmentTable.tsx @@ -100,10 +100,10 @@ export default function AssignmentTable({ data }: { data: IProjectAssignment[] } {assignment.wo_end_date ? new Date(assignment.wo_end_date).toLocaleDateString() : ''} - + - {assignment.project_assignment_status_detail[0]?.status_remarks} + {assignment.note ? {assignment.note} : ''}
diff --git a/app/(dashboard)/task/data.ts b/app/(dashboard)/task/data.ts index 832a320..1ff13cf 100644 --- a/app/(dashboard)/task/data.ts +++ b/app/(dashboard)/task/data.ts @@ -55,7 +55,7 @@ export const getFilteredAssignments = (assignmentList: IProjectAssignment[], que ); // --- Status Filter --- - const itemStatus = item.project_status?.name?.toLowerCase(); + const itemStatus = item.project_assignment_status?.name?.toLowerCase(); const matchesStatus = activeStatuses.length === 0 || (itemStatus && activeStatuses.includes(itemStatus)); return matchesSearch && matchesStatus;