feat(sidebar): Add module gating to Manufacturing section
Manufacturing section now requires has_manufacturing module: - Shows to all sellers with business profile - Displays as locked "Premium Feature" when module disabled - Unlocks with full access when module enabled (for owners/admins) - Consistent with Buyer Analytics and Processing module patterns Manufacturing locked state shows: - Lock icon - "Manufacturing" title - "Premium Feature" subtitle - Greyed out appearance (opacity-50) - Tooltip: "Premium feature - contact support to enable" All premium modules now properly gated: - Buyer Analytics (has_analytics) - Processing (has_processing) - Manufacturing (has_manufacturing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -513,9 +513,11 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($canManageBusiness)
|
||||
{{-- Manufacturing Section for managers and owners only --}}
|
||||
{{-- Manufacturing Module (Premium Feature) --}}
|
||||
@if($sidebarBusiness)
|
||||
<p class="menu-label px-2.5 pt-3 pb-1.5 first:pt-0">Manufacturing</p>
|
||||
@if($sidebarBusiness->has_manufacturing && $canManageBusiness)
|
||||
{{-- Module enabled - full access for owners/admins --}}
|
||||
<div class="group collapse">
|
||||
<input
|
||||
aria-label="Sidemenu item trigger"
|
||||
@@ -528,7 +530,6 @@
|
||||
<span class="grow">Manufacturing</span>
|
||||
<span class="icon-[lucide--chevron-right] arrow-icon size-3.5"></span>
|
||||
</div>
|
||||
@if($sidebarBusiness)
|
||||
<div class="collapse-content ms-6.5 !p-0">
|
||||
<div class="mt-0.5 space-y-0.5">
|
||||
<a class="menu-item {{ request()->routeIs('seller.business.manufacturing.purchase-orders.*') ? 'active' : '' }}" href="{{ route('seller.business.manufacturing.purchase-orders.index', $sidebarBusiness->slug) }}">
|
||||
@@ -547,15 +548,20 @@
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="collapse-content ms-6.5 !p-0">
|
||||
<div class="mt-0.5 px-3 py-2">
|
||||
<p class="text-xs text-base-content/60">Complete your business profile to manage manufacturing</p>
|
||||
</div>
|
||||
@else
|
||||
{{-- Module not enabled - show as locked premium feature --}}
|
||||
<div class="px-2.5 py-1.5 opacity-50 cursor-not-allowed" title="Premium feature - contact support to enable">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="icon-[lucide--lock] size-4"></span>
|
||||
<div class="flex flex-col grow">
|
||||
<span class="text-sm font-medium">Manufacturing</span>
|
||||
<span class="text-xs text-base-content/60">Premium Feature</span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
||||
{{-- Reports Section - Department-based (Bottom of Navigation) --}}
|
||||
|
||||
Reference in New Issue
Block a user