import React, { useState } from "react";
import { useParams } from "react-router-dom";
import { useServiceProject } from "../../hooks/useServiceProject";
import { formatUTCToLocalTime } from "../../utils/dateUtils";
import ManageServiceProject from "./ManageServiceProject";
import GlobalModel from "../common/GlobalModel";
const ServiceProjectProfile = () => {
const { projectId } = useParams();
const [IsOpenModal, setIsOpenModal] = useState(false);
const { data, isLoading, isError, error } = useServiceProject(projectId);
if (isLoading) {
return
Loadng.
;
}
return (
<>
{IsOpenModal && (
setIsOpenModal(false)}>
setIsOpenModal(false)}
/>
)}
{" "}
Project Profile
-
Name:
{/* Content section that wraps nicely */}
{data.name}
-
Nick Name:
{data.shortName}
-
Assign Date:
{data.assignedDate ? formatUTCToLocalTime(data.assignedDate) : "NA"}
-
Status:
{data?.status.status}
-
Contact:
{data.contactName}
-
{/* Label section with icon */}
Address:
{/* Content section that wraps nicely */}
{data.address}
- {/* Added mt-4 for some top margin */}
{/* Added mt-4 for some top margin */}
>
);
};
export default ServiceProjectProfile;