added condition for directory, for hide project dropdown

This commit is contained in:
Pramod Mahajan 2025-06-27 11:45:29 +05:30
parent d1250739f9
commit f932a4c5a4
3 changed files with 10 additions and 9 deletions

View File

@ -17,7 +17,7 @@ const Dashboard = () => {
const { tasksCardData } = useDashboardTasksCardData(); const { tasksCardData } = useDashboardTasksCardData();
return ( return (
<div className="container-fluid"> <div className="container-fluid mt-3">
<div className="row gy-4"> <div className="row gy-4">
{/* Projects Card */} {/* Projects Card */}
<div className="col-sm-6 col-lg-4"> <div className="col-sm-6 col-lg-4">

View File

@ -103,7 +103,8 @@ const Header = () => {
}, [projectNames]); }, [projectNames]);
/** Check if current page id project details page */ /** Check if current page id project details page */
const isProjectPath = /^\/projects\/[a-f0-9-]{36}$/.test(location.pathname); const isProjectPath = /^\/projects\/[a-f0-9-]{36}$/.test(location.pathname)
const isDirectoryPath = /^\/directory$/.test(location.pathname);
const handler = useCallback( const handler = useCallback(
async (data) => { async (data) => {
@ -162,11 +163,11 @@ const Header = () => {
> >
{projectNames?.length > 0 && ( {projectNames?.length > 0 && (
<div className=" align-items-center"> <div className=" align-items-center">
{!isProjectPath && ( {(!isProjectPath && !isDirectoryPath) && (
<> <>
<i <i
className="rounded-circle bx bx-building-house" className="rounded-circle bx bx-building-house bx-sm-lg bx-md"
style={{ fontSize: "xx-large" }}
></i> ></i>
<div className="btn-group"> <div className="btn-group">
<button <button
@ -186,7 +187,7 @@ const Header = () => {
style={{ overflow: "auto", maxHeight: "300px" }} style={{ overflow: "auto", maxHeight: "300px" }}
> >
{[...projectNames] {[...projectNames]
.sort((a, b) => a.name.localeCompare(b.name)) .sort((a, b) => a?.name?.localeCompare(b.name))
.map((project) => ( .map((project) => (
<li key={project?.id}> <li key={project?.id}>
<button <button
@ -197,7 +198,7 @@ const Header = () => {
> >
{project?.name}{" "} {project?.name}{" "}
{project?.shortName ? ( {project?.shortName ? (
<span className="text-primary fw-semibold"> <span className="text-primary fw-semibold ">
{" "} {" "}
({project?.shortName}) ({project?.shortName})
</span> </span>

View File

@ -5,8 +5,8 @@ const Breadcrumb = ({ data }) => {
const navigate = useNavigate(); const navigate = useNavigate();
return ( return (
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb" >
<ol className="breadcrumb breadcrumb-custom-icon"> <ol className="breadcrumb breadcrumb-custom-icon my-3">
{data.map((item, index) => ( {data.map((item, index) => (
item.link ? ( item.link ? (
<li className="breadcrumb-item cursor-pointer" key={index}> <li className="breadcrumb-item cursor-pointer" key={index}>