-
- {row.name.charAt(0)}
+
+ {row.fullname?.charAt(0)}
- {row.name}
- {row.position}
+ {row.fullname}
+ {row.position?.name}
{row.email}
@@ -170,17 +168,17 @@ export function ManageTeam({ assignmentId, onClose }: { assignmentId: number, on
{isEditing ?
- handleDraftChange("start_date_assign", date as any)} />
+ handleDraftChange("start_date", date as any)} />
:
- {row.start_date_assign}
+ {row.start_date}
}
{isEditing ?
- handleDraftChange("end_date_assign", date as any)} />
+ handleDraftChange("end_date", date as any)} />
:
- {row.end_date_assign}
+ {row.end_date}
}
@@ -191,9 +189,8 @@ export function ManageTeam({ assignmentId, onClose }: { assignmentId: number, on
- Active
- In Active
- Completed
+ Active
+ In Active
:
diff --git a/app/(dashboard)/task/component/UpdateTimelineStatus.tsx b/app/(dashboard)/task/component/UpdateTimelineStatus.tsx
index 1a306c4..b2f4895 100644
--- a/app/(dashboard)/task/component/UpdateTimelineStatus.tsx
+++ b/app/(dashboard)/task/component/UpdateTimelineStatus.tsx
@@ -19,13 +19,6 @@ import {
} from "@/components/ui/table";
import BadgeStatus from '@/components/ui/badge-status';
-const validationSchema = Yup.object().shape({
- project_status_id: Yup.string().required(),
- date: Yup.date().required('Date is required'),
- note: Yup.string().optional().default(''),
-});
-
-type FormDataType = Yup.InferType
;
type Props = {
assignmentId: string | number
@@ -39,10 +32,6 @@ const UpdateTimelineStatus: FC = ({ assignmentId, onClose }) => {
const { data: existTimeline, isLoading: isLoadingTimeline, mutate } = useFetchWithAxios(`project-assignment/status-detail/${assignmentId}`)
- const form = useForm({
- resolver: yupResolver(validationSchema),
- });
-
const router = useRouter()
const handleEdit = (row: any) => {
@@ -60,7 +49,7 @@ const UpdateTimelineStatus: FC = ({ assignmentId, onClose }) => {
setIsSaving(true);
const submitPayload = {
- "project_status_id": Number(draftData.project_status_id),
+ "project_status_id": Number(draftData.id),
"start_date": draftData.start_date_assign ? new Date(draftData.start_date_assign).toISOString() : '',
"end_date": draftData.end_date_assign ? new Date(draftData.end_date_assign).toISOString() : '',
"note": draftData.note,
@@ -98,11 +87,11 @@ const UpdateTimelineStatus: FC = ({ assignmentId, onClose }) => {
return (
<>
-
+
Update Status
-
- Update the timeline status for this assignment. You can also add a note or remark regarding this status change. This will help you keep track of the progress and any important information related to this assignment.
+
+ Update the timeline status for this assignment. You can also add a note or remark regarding this status change. This will help to keep track of the progress.
@@ -130,7 +119,7 @@ const UpdateTimelineStatus: FC
= ({ assignmentId, onClose }) => {
- No team members have been added yet. Create a team to get started with project assignments
+ No team members have been added yet.
Create a team to get started with project assignments
@@ -163,7 +152,7 @@ const UpdateTimelineStatus: FC = ({ assignmentId, onClose }) => {
{isEditing ?
-