added condition for directory, for hide project dropdown
This commit is contained in:
parent
d1250739f9
commit
f932a4c5a4
@ -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">
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -6,7 +6,7 @@ const Breadcrumb = ({ data }) => {
|
|||||||
|
|
||||||
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}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user