Directory tab inside Project Profile page not displayed properly (tab within tab issue) #464

Merged
pramod.mahajan merged 2 commits from Kartik_Bug#1408 into OnFieldWork_V1 2025-10-09 12:56:41 +00:00
Showing only changes of commit 5c8a6c8c65 - Show all commits

View File

@ -139,8 +139,7 @@ export default function DirectoryPage({ IsPage = true, projectId = null }) {
<ul className="nav nav-tabs">
<li className="nav-item cursor-pointer">
<a
className={`nav-link ${
activeTab === "notes" ? "active" : ""
className={`nav-link ${activeTab === "notes" ? "active" : ""
} fs-6`}
onClick={(e) => handleTabClick("notes", e)}
>
@ -150,8 +149,7 @@ export default function DirectoryPage({ IsPage = true, projectId = null }) {
</li>
<li className="nav-item cursor-pointer">
<a
className={`nav-link ${
activeTab === "contacts" ? "active" : ""
className={`nav-link ${activeTab === "contacts" ? "active" : ""
} fs-6`}
onClick={(e) => handleTabClick("contacts", e)}
>
@ -160,7 +158,6 @@ export default function DirectoryPage({ IsPage = true, projectId = null }) {
</a>
</li>
</ul>
</div>
<div className="mb-1 px-2 py-3">
<div className="d-flex align-items-center justify-content-between">
@ -185,11 +182,8 @@ export default function DirectoryPage({ IsPage = true, projectId = null }) {
value={searchContact}
onChange={(e) => setsearchContact(e.target.value)}
/>
<button
className={`btn btn-sm p-1 ${
gridView ? " btn-primary" : " btn-outline-primary"
className={`btn btn-sm p-1 ${gridView ? " btn-primary" : " btn-outline-primary"
}`}
onClick={() => setGridView(true)}
>
@ -197,15 +191,35 @@ export default function DirectoryPage({ IsPage = true, projectId = null }) {
</button>
<button
className={`btn btn-sm p-1 ${
!gridView ? "btn-primary" : "btn-outline-primary"
className={`btn btn-sm p-1 ${!gridView ? "btn-primary" : "btn-outline-primary"
}`}
onClick={() => setGridView(false)}
>
<i className="bx bx-list-ul"></i>
</button>
</div>
</div>
)}
</div>
<div class="dropdown z-2">
<button type="button"
class="btn btn-xs btn-icon btn-text-secondary rounded-pill dropdown-toggle hide-arrow p-0 m-0" data-bs-toggle="dropdown" aria-expanded="true">
<i class="bx bx-dots-vertical-rounded text-muted p-0" data-bs-toggle="tooltip"
data-bs-offset="0,8" data-bs-placement="top" data-bs-custom-class="tooltip-dark" title="More Action">
</i>
</button>
<ul class="dropdown-menu dropdown-menu-end p-5" data-popper-placement="bottom-end"
>
<li>
<a
className="dropdown-item cursor-pointer"
onClick={() => handleExport("csv")}
>
<i className="bx bx-file"></i> Export to CSV
</a>
</li>
{activeTab === "contacts" && (
<li>
<div className="form-check form-switch d-flex align-items-center m-0">
<input
type="checkbox"
@ -222,32 +236,16 @@ export default function DirectoryPage({ IsPage = true, projectId = null }) {
{showActive ? "Active" : "Inactive"} Contacts
</label>
</div>
</div>
)}
</div>
<div className="btn-group">
<button
className="btn btn-sm btn-label-secondary dropdown-toggle"
type="button"
data-bs-toggle="dropdown"
aria-expanded="false"
>
<i className="bx bx-export me-2 bx-sm"></i>Export
</button>
<ul className="dropdown-menu">
<li>
<a
className="dropdown-item cursor-pointer"
onClick={() => handleExport("csv")}
>
<i className="bx bx-file me-1"></i> CSV
</a>
</li>
)}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>