@php $menu=[ ['heading'=>'Workspace','items'=>[['overview','Overview','dashboard']]], ['heading'=>'Operations','items'=>[['products','Products','products'],['inventory','Inventory','inventory'],['sales','Sales & Orders','sales'],['customers','Customers','customers'],['purchasing','Purchasing','purchasing'],['finance','Finance','finance']]], ['heading'=>'Organization','items'=>[['companies','Company & Branches','companies']]], ['heading'=>'Management','items'=>[['hr','People & HR','hr'],['fleet','Fleet & Field','fleet'],['reports','Reports','reports'],['settings','Settings','settings']]], ]; $names=['products'=>'Products','inventory'=>'Inventory','sales'=>'Sales & Orders','customers'=>'Customers','purchasing'=>'Purchasing','finance'=>'Finance','hr'=>'People & HR','fleet'=>'Fleet & Field','reports'=>'Reports','settings'=>'Settings']; $descriptions=['products'=>'Item master, variants and pricing','inventory'=>'Warehouses and stock control','sales'=>'Quotations, orders and invoicing','customers'=>'Customer records and accounts','purchasing'=>'Suppliers and purchase orders','finance'=>'Accounting, payments and VAT','hr'=>'Teams, employees and payroll','fleet'=>'Field visits and fleet operations','reports'=>'Operational and financial reports','settings'=>'Company and system configuration']; $shapes=['overview'=>'
','products'=>'
','inventory'=>'
','sales'=>'
','customers'=>'
','purchasing'=>'
','finance'=>'
','hr'=>'
','fleet'=>'
','reports'=>'
','settings'=>'
']; $shapes['companies']='
'; $svg=fn($key)=>'
'.($shapes[$key]??'').'
'; $favorites=\App\Models\UserFavorite::where('user_id',auth()->id())->orderBy('position')->orderBy('id')->pluck('module_key')->all(); $companyContext=\App\Support\CompanyContext::current(auth()->id()); $menu=collect($menu)->map(fn($group)=>[...$group,'items'=>array_values(array_filter($group['items'],fn($item)=>$item[2]==='dashboard'||\App\Support\AccessControl::moduleAllowed(auth()->id(),$item[2])) )])->filter(fn($group)=>count($group['items']))->values()->all(); $favorites=array_values(array_filter($favorites,fn($key)=>$key!=='products' && \App\Support\AccessControl::moduleAllowed(auth()->id(),$key))); $active=request()->routeIs('erp.products*','erp.catalogs*','erp.categories*')?'products':(request()->routeIs('dashboard')?'overview':(request()->routeIs('companies.*','branches.*','setup.*')?'companies':request()->route('module'))); @endphp
☰
SNYT ERP /
@yield('title','Overview')
⌕
Search applications and pages...
⌘ K
{{ $companyContext['company']?->name??'Set up company' }}@if($companyContext['branch']) · {{ $companyContext['branch']->name }}@endif
◐
{{ strtoupper(substr(auth()->user()->name,0,1)) }}
{{ auth()->user()->name }}
Workspace member
@csrf
Sign out
@yield('content')
⌕
Esc
Navigate with ↑ ↓ · Enter to open · Esc to close