Comprehensive Report

All data regardless of user role • Comprehensive filtering and export capabilities

@if(auth()->user()->hasPermission('data.export')) @endif
@if($showFilters)
@if($reportType === 'matters')
@elseif($reportType === 'tasks')
@elseif($reportType === 'proposals')
@elseif($reportType === 'timesheets')
@endif
@endif
@if($reportType === 'summary')

Matters

Total: {{ $this->summary['matters']['total'] }}
Active: {{ $this->summary['matters']['active'] }}
Completed: {{ $this->summary['matters']['completed'] }}
Closed: {{ $this->summary['matters']['closed'] }}

Tasks

Total: {{ $this->summary['tasks']['total'] }}
Pending: {{ $this->summary['tasks']['pending'] }}
In Progress: {{ $this->summary['tasks']['in_progress'] }}
Completed: {{ $this->summary['tasks']['completed'] }}
On Hold: {{ $this->summary['tasks']['on_hold'] }}

Proposals

Total: {{ $this->summary['proposals']['total'] }}
Draft: {{ $this->summary['proposals']['draft'] }}
Submitted: {{ $this->summary['proposals']['submitted'] }}
Approved: {{ $this->summary['proposals']['approved'] }}
Rejected: {{ $this->summary['proposals']['rejected'] }}
@else
@if($reportType === 'matters') Showing {{ $this->matters->firstItem() ?? 0 }} to {{ $this->matters->lastItem() ?? 0 }} of {{ $this->matters->total() ?? 0 }} matters @elseif($reportType === 'tasks') Showing {{ $this->tasks->firstItem() ?? 0 }} to {{ $this->tasks->lastItem() ?? 0 }} of {{ $this->tasks->total() ?? 0 }} tasks @elseif($reportType === 'proposals') Showing {{ $this->proposals->firstItem() ?? 0 }} to {{ $this->proposals->lastItem() ?? 0 }} of {{ $this->proposals->total() ?? 0 }} proposals @endif
@if($reportType === 'matters')
@forelse($this->matters as $matter) @empty @endforelse
Subject @if($sortBy === 'subject') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Client @if($sortBy === 'client_id') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Department @if($sortBy === 'department') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Status @if($sortBy === 'status') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Assigned To @if($sortBy === 'user_id') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Created @if($sortBy === 'created_at') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif
{{ $matter->subject }} {{ $matter->client ? $matter->client->company_name : 'N/A' }} {{ $matter->department }} {{ ucfirst($matter->status) }} {{ $matter->user ? $matter->user->name : 'Unassigned' }} {{ $matter->created_at->format('M d, Y') }}
No matters found matching your criteria.
{{ $this->matters->links() }}
@elseif($reportType === 'tasks')
@forelse($this->tasks as $task) @empty @endforelse
Title @if($sortBy === 'title') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Matter @if($sortBy === 'matter_id') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Department @if($sortBy === 'department') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Status @if($sortBy === 'status') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Assigned To @if($sortBy === 'user_id') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Due Date @if($sortBy === 'due_date') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Created @if($sortBy === 'created_at') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif
{{ $task->title }} {{ $task->matter ? $task->matter->subject : 'N/A' }} {{ $task->department }} {{ ucfirst(str_replace('_', ' ', $task->status)) }} {{ $task->user ? $task->user->name : 'Unassigned' }} {{ $task->due_date ? $task->due_date->format('M d, Y') : 'N/A' }} {{ $task->created_at->format('M d, Y') }}
No tasks found matching your criteria.
{{ $this->tasks->links() }}
@elseif($reportType === 'proposals')
@forelse($this->proposals as $proposal) @empty @endforelse
Title @if($sortBy === 'title') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Client @if($sortBy === 'client_id') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Status @if($sortBy === 'status') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Amount @if($sortBy === 'amount') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Assigned To @if($sortBy === 'user_id') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Created @if($sortBy === 'created_at') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif
{{ $proposal->title }} {{ $proposal->client ? $proposal->client->company_name : 'N/A' }} {{ ucfirst($proposal->status) }} {{ $proposal->amount ? '$' . number_format($proposal->amount, 2) : 'N/A' }} {{ $proposal->user ? $proposal->user->name : 'Unassigned' }} {{ $proposal->created_at->format('M d, Y') }}
No proposals found matching your criteria.
{{ $this->proposals->links() }}
@elseif($reportType === 'timesheets')
@forelse($this->timesheets as $timesheet) @empty @endforelse @if($this->timesheets->count() > 0) @endif
Date @if($sortBy === 'date') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif User @if($sortBy === 'created_by') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Matter @if($sortBy === 'matter_id') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Proposal @if($sortBy === 'matter_id') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Description @if($sortBy === 'description') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Time Spent @if($sortBy === 'time_spent') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Hourly Rate @if($sortBy === 'hourly_rate') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @endif Total Cost
{{ $timesheet->date->format('d/m/Y') }} {{ $timesheet->createdBy->name }} {{ $timesheet->matter->subject }} {{ $timesheet->matter->proposal ? $timesheet->matter->proposal->title : '-' }}
{{ $timesheet->description }}
{{ $timesheet->formatted_time_spent }} {{ $timesheet->formatted_hourly_rate }} {{ $timesheet->formatted_total_cost }}
No timesheets found matching your criteria.
TOTALS: {{ number_format($this->timesheets->sum('time_spent'), 2) }}h €{{ number_format(config('app.default_hourly_rate', 75.00), 2) }} €{{ number_format($this->timesheets->sum(function($timesheet) { return $timesheet->time_spent * $timesheet->hourly_rate; }), 2) }}
{{ $this->timesheets->links() }}
@endif @endif
@if($showPreviewModal)

Export Preview

Showing first 10 rows of the export data. This preview shows how your data will appear in the Excel file.
@if(count($previewData) > 0)
@foreach(array_keys($previewData[0] ?? []) as $header) @endforeach @foreach($previewData as $row) @foreach($row as $value) @endforeach @endforeach
{{ $header }}
{{ $value }}
@else
No data available for preview.
@endif
@endif @if($showExportModal)

Export Report

Select the fields you want to include in the export:
@foreach($exportFields as $field => $enabled) @endforeach
@endif