style: add condition for active menu per area
parent
f67250fac3
commit
ef376bea65
|
|
@ -11,38 +11,95 @@
|
|||
</div>
|
||||
<span class="font-jakarta-plus text-xl">e-Bank Sampah</span>
|
||||
</div>
|
||||
<ul class="menu menu-sidebar bg-base-100 text-base-content min-h-full w-64 p-4">
|
||||
<ul class="menu menu-sidebar bg-base-100 text-base-content min-h-full w-64 p-4 text-gray-500">
|
||||
<!-- Sidebar content here -->
|
||||
<li>
|
||||
<a href="@Url.Action("Index","Dashboard")" class="w-full rounded-full text-gray-500 @ViewData["DashboardActive"]">
|
||||
<i class="ph ph-gauge me-2 text-lg"></i>
|
||||
Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Index","DataBankSampah")" class="rounded-full text-gray-500 @ViewData["DataBankSampahActive"]">
|
||||
<i class="ph ph-house-line me-2 text-lg"></i>
|
||||
Data Bank Sampah
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="rounded-full text-gray-500">
|
||||
<i class="ph ph-users-four me-2 text-lg"></i>
|
||||
Data Nasabah
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Index","DataOfftaker")" class="rounded-full text-gray-500 @ViewData["DataOfftakerActive"]">
|
||||
<i class="ph ph-read-cv-logo me-2 text-lg"></i>
|
||||
Data Offtaker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Index","TransaksiLaporan")" class="rounded-full text-gray-500 @ViewData["TransaksiLaporanActive"]">
|
||||
<i class="ph ph-database me-2 text-lg"></i>
|
||||
Transaksi Laporan
|
||||
</a>
|
||||
</li>
|
||||
@{
|
||||
var currentArea = ViewContext.RouteData.Values["area"] as string;
|
||||
var controller = ViewContext.RouteData.Values["controller"] as string;
|
||||
}
|
||||
@if (currentArea == "Sudin")
|
||||
{
|
||||
<li>
|
||||
<a href="@Url.Action("Index","Dashboard")" class="w-full rounded-full @ViewData["DashboardActive"]">
|
||||
<i class="ph ph-gauge me-2 text-lg"></i>
|
||||
Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Index","DataBankSampah")" class="rounded-full @ViewData["DataBankSampahActive"]">
|
||||
<i class="ph ph-house-line me-2 text-lg"></i>
|
||||
Data Bank Sampah
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="rounded-full">
|
||||
<i class="ph ph-users-four me-2 text-lg"></i>
|
||||
Data Nasabah
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Index","DataOfftaker")" class="rounded-full @ViewData["DataOfftakerActive"]">
|
||||
<i class="ph ph-read-cv-logo me-2 text-lg"></i>
|
||||
Data Offtaker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Index","TransaksiLaporan")" class="rounded-full @ViewData["TransaksiLaporanActive"]">
|
||||
<i class="ph ph-database me-2 text-lg"></i>
|
||||
Transaksi Laporan
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
else if (currentArea == "Bsi")
|
||||
{
|
||||
<li>
|
||||
<a href="#" class="w-full rounded-full">
|
||||
<i class="ph ph-gauge me-2 text-lg"></i>
|
||||
Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="w-full rounded-full @(controller=="Profil" ? "menu-active" : "")">
|
||||
<i class="ph ph-gauge me-2 text-lg"></i>
|
||||
Profil Bank Sampah
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<details>
|
||||
<summary>
|
||||
<i class="ph ph-database me-2 text-lg"></i>
|
||||
Data
|
||||
</summary>
|
||||
<ul>
|
||||
<li><a>Nasabah</a></li>
|
||||
<li><a>Bank Sampah Induk</a></li>
|
||||
<li><a>Aktifitas</a></li>
|
||||
<li><a>Harga Sampah</a></li>
|
||||
<li><a>Offtaker</a></li>
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
<li>
|
||||
<details>
|
||||
<summary>
|
||||
<i class="ph ph-cash-register me-2 text-lg"></i>
|
||||
Transaksi
|
||||
</summary>
|
||||
<ul>
|
||||
<li><a>Nasabah</a></li>
|
||||
<li><a>Penarikan Tabungan</a></li>
|
||||
<li><a>BSI</a></li>
|
||||
<li><a>Offtaker</a></li>
|
||||
<li><a>Laporan</a></li>
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="card absolute inset-x-0 bottom-0 m-3 bg-gradient-to-tl from-[#FFDBAC] to-[#F79009] text-white">
|
||||
<div class="card-body px-2 py-4">
|
||||
|
|
|
|||
Loading…
Reference in New Issue