@php $user = Auth::user(); $isSuperAdmin = $user->isSuperAdmin(); $companyName = $user->company->name ?? 'No company linked'; $authUser = auth()->user(); $canCreateLead = $authUser && $authUser->hasPermission('leads.create'); @endphp

Dashboard

@if($canCreateLead) + Add New Lead @endif

Welcome back, {{ $user->name }}!

Here's what's happening with your customers today.

@if (Auth::user()->isSuperAdmin())

Super Admin Portal

Quick access to global admin tools.

@elseif($isSuperAdmin === false && Auth::user()->isCompanyAdmin())
Leads In Last 15 Days
{{ $dashboardCounts['leads']['inactive_15_days'] ?? 0 }}
Projects In Last 15 Days
{{ $dashboardCounts['projects']['inactive_15_days'] ?? 0 }}
Present Today
{{ $dashboardCounts['staff']['present_today'] ?? 0 }}
Absent Today
{{ $dashboardCounts['staff']['absent_today'] ?? 0 }}

Lead & Project Activity Calendar

Hover a dot to see details or click to add tasks.

Lead Project Absent Task

Recent Staff

View all
@forelse($staffList->take(5) as $staff) @empty @endforelse
Employee Name Registered
{{ $staff->name }}
{{ $staff->email }}
{{ $staff->employee_id }} {{ $staff->contact_number }} {{ $staff->join_date }}
No staff members found.

Storage Remaining

{{ $storageUsage['remaining_percent'] }}% free
{{ number_format($storageUsage['remaining_bytes'] / (1024 * 1024), 1) }} MB left Used {{ number_format($storageUsage['used_bytes'] / (1024 * 1024), 1) }} MB

Today's Schedule

Today's follow-ups, deadlines, tasks, and status items.

{{ $todaySchedule->count() }} items
@forelse($todaySchedule as $item)

{{ $item['title'] }}

{{ $item['meta'] }}

@empty
No items for today.
@endforelse
{{--

Sales Pipeline

Week overview

Week
Week 1
Week 2
Week 3
Week 4

Recent Customers

View all
Customer Company Status Deal Value
Sarah JohnsonTech Solutions IncActive$12,500
Michael ChenGlobal Markets LLCPending$7,900
Emma WilsonCreative AgencyActive$23,400

Today’s Schedule

Team Standup
10:00 AM
Client Demo
12:30 PM
Sales Review
3:00 PM

Quick Info

Role: {{ $isSuperAdmin ? 'Super Admin' : 'Company User' }}
Company: {{ $companyName }}
--}}

{{$dashboardCounts['leads']['fresh']}}
Fresh Leads
{{$dashboardCounts['projects']['total'] }}
Ongoing Projects
{{$dashboardCounts['projects']['completed']}}
Projects Completed

Recent Feedback

Sarah Williams - Great service experience.
John Peters - Fast follow-up and clear communication.
Global Imports LLC - Highly recommend your team.
@endif