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();
return (
<div className="container-fluid">
<div className="container-fluid mt-3">
<div className="row gy-4">
{/* Projects Card */}
<div className="col-sm-6 col-lg-4">

View File

@ -103,7 +103,8 @@ const Header = () => {
}, [projectNames]);
/** 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(
async (data) => {
@ -162,11 +163,11 @@ const Header = () => {
>
{projectNames?.length > 0 && (
<div className=" align-items-center">
{!isProjectPath && (
{(!isProjectPath && !isDirectoryPath) && (
<>
<i
className="rounded-circle bx bx-building-house"
style={{ fontSize: "xx-large" }}
className="rounded-circle bx bx-building-house bx-sm-lg bx-md"
></i>
<div className="btn-group">
<button
@ -186,7 +187,7 @@ const Header = () => {
style={{ overflow: "auto", maxHeight: "300px" }}
>
{[...projectNames]
.sort((a, b) => a.name.localeCompare(b.name))
.sort((a, b) => a?.name?.localeCompare(b.name))
.map((project) => (
<li key={project?.id}>
<button
@ -197,7 +198,7 @@ const Header = () => {
>
{project?.name}{" "}
{project?.shortName ? (
<span className="text-primary fw-semibold">
<span className="text-primary fw-semibold ">
{" "}
({project?.shortName})
</span>

View File

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