Files
SGF/resources/views/partials/purchasing-navigation.blade.php
2026-11-04 09:37:20 +02:00

15 lines
1.3 KiB
PHP

@php($purchasingLinks=app(\App\Modules\Purchasing\WorkspaceNavigation::class)->links())
@if(config('purchasing_workspace.single_installation')===true)
@php($activeProfile=collect(config('purchasing_workspace.profiles',[]))->firstWhere('user_id',auth()->id()))
<script type="module" src="/purchasing-exit.mjs"></script>
<header style="padding:14px 20px;background:#173e36;color:white"><strong>Compras · {{ $activeProfile['label'] ?? 'Função autorizada' }}</strong> · <a data-purchasing-entry style="color:white" href="/compras?{{ http_build_query(['return_to'=>request()->getRequestUri()]) }}">Entrada de Compras / trocar função</a> · {{ \Illuminate\Support\Facades\DB::table('companies')->where('id',app(\App\Shared\Context\CompanyContext::class)->identifiers()['company_id'])->value('name') }} · {{ \Illuminate\Support\Facades\DB::table('units')->where('id',app(\App\Shared\Context\CompanyContext::class)->unitId())->value('name') }}</header>
@endif
@if(count($purchasingLinks))
<nav aria-label="Etapas de Compras" style="padding:16px;background:#fff;border-bottom:1px solid #bed0c9;display:flex;gap:16px;flex-wrap:wrap">
<a href="/purchasing/workspace">Percurso de Compras</a>
@foreach($purchasingLinks as $step)
<a href="{{ $step['url'] }}" @if(request()->path()===ltrim($step['url'],'/'))aria-current="page"@endif>{{ $step['label'] }}</a>
@endforeach
</nav>
@endif