@extends('layouts.app') @section('title','Overview') @section('content') @php $names=['products'=>'Products','inventory'=>'Inventory','sales'=>'Sales','customers'=>'Customers','purchasing'=>'Purchasing','finance'=>'Finance','hr'=>'HR & Payroll','fleet'=>'Fleet & Field','reports'=>'Reports','settings'=>'Settings']; $names=array_filter($names,fn($label,$key)=>\App\Support\AccessControl::moduleAllowed(auth()->id(),$key),ARRAY_FILTER_USE_BOTH); $visibleWidgets=json_decode(\Illuminate\Support\Facades\DB::table('user_workspace_preferences')->where('user_id',auth()->id())->value('widgets')??'null',true)??['favorites','activity','alerts']; $favorites=array_values(array_filter(\App\Models\UserFavorite::where('user_id',auth()->id())->orderBy('position')->orderBy('id')->pluck('module_key')->all(),fn($key)=>\App\Support\AccessControl::moduleAllowed(auth()->id(),$key))); $icons=['products'=>'📦','inventory'=>'▣','sales'=>'🛒','customers'=>'♙','purchasing'=>'▤','finance'=>'◉','hr'=>'♧','fleet'=>'↗','reports'=>'▥','settings'=>'⚙']; $colors=['products'=>'#ee8b29','inventory'=>'#4e91cf','sales'=>'#2674e7','customers'=>'#12a2aa','purchasing'=>'#7755d3','finance'=>'#13a46d','hr'=>'#d4476a','fleet'=>'#4e84ba','reports'=>'#ce891e','settings'=>'#667a92']; @endphp

Overview

Access your business applications and essential information.

@foreach($names as $key=>$label)
@csrf
{{ $icons[$key] }}{{ $label }}
@endforeach
@if(in_array('favorites',$visibleWidgets))

★ My Favorites

@if(count($favorites))
@foreach($favorites as $key)@if(isset($names[$key])){{ $icons[$key] }}{{ $names[$key] }}↗@endif @endforeach
@else

Select ☆ beside an application to pin it here. Favorites are saved to your account.

@endif
@endif @if(in_array('activity',$visibleWidgets))

â—· Recent Activity

â—·
Activity feed not connected yet

Real transactions and audit events will appear here after the business modules are built.

@endif @if(in_array('alerts',$visibleWidgets))

â™§ Alerts & Notifications

!
No live alerts available

Stock, invoice, and workflow alerts will appear when enabled.

↗
Quick actions

Context-aware actions will be enabled with module permissions.

@endif
@csrf

Customize Overview

Choose which sections appear on your dashboard. Your preferences are saved to your account.

@foreach(['favorites'=>'My Favorites','activity'=>'Recent Activity','alerts'=>'Alerts & Notifications'] as $key=>$label)@endforeach
@endsection