Add “Organization Type” Column in Project > Organization Page

This commit is contained in:
Kartik Sharma 2025-09-30 18:03:49 +05:30
parent d5df200ede
commit f0ce1e30fb
2 changed files with 11 additions and 10 deletions

View File

@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import { useProjectAssignedOrganizations } from "../../../hooks/useProjects"; import { useProjectAssignedOrganizations } from "../../../hooks/useProjects";
import { useSelectedProject } from "../../../slices/apiDataManager"; import { useSelectedProject } from "../../../slices/apiDataManager";
import { formatUTCToLocalTime } from "../../../utils/dateUtils";
const ProjectAssignedOrgs = () => { const ProjectAssignedOrgs = () => {
const selectedProject = useSelectedProject(); const selectedProject = useSelectedProject();
@ -48,17 +49,18 @@ const ProjectAssignedOrgs = () => {
align: "text-center", align: "text-center",
}, },
{ {
key: "isActive", key: "assignedDate",
label: "Status", label: "Assigned Date",
getValue: (org) => ( getValue: (org) => (
<span <span
className={`text-truncate d-inline-block badge bg-label-${org.isActive ? "primary" :"secondary"}`} className="text-truncate d-inline-block"
style={{ maxWidth: "80px" }} style={{ maxWidth: "200px" }}
> >
{org?.isActive ? "Active" : "Inactive"} {/* {org?.assignedDate || "N/A"} */}
{formatUTCToLocalTime(org?.assignedDate)}
</span> </span>
), ),
align: "text-start", align: "text-center",
}, },
]; ];

View File

@ -14,7 +14,6 @@ export const useProjectAccess = (projectId) => {
const canView = useHasUserPermission(VIEW_PROJECTS); const canView = useHasUserPermission(VIEW_PROJECTS);
const loading = isLoading || !isFetched; const loading = isLoading || !isFetched;
debugger
useEffect(() => { useEffect(() => {
if (projectId && !loading && !canView) { if (projectId && !loading && !canView) {
showToast("You don't have permission to view project details", "warning"); showToast("You don't have permission to view project details", "warning");