@extends('layouts.app') @section('title', isset($isTrades) && $isTrades ? 'My Assigned Jobs' : 'Jobs') @section('breadcrumb'){{ isset($isTrades) && $isTrades ? 'My Jobs' : 'Jobs' }}@endsection @section('content') @php $isTrades = isset($isTrades) && $isTrades; @endphp @if($isTrades) {{-- ── TRADES: simplified assigned jobs view ──────────────────────────────── --}}

My Assigned Jobs

Jobs assigned to you that are available for time logging

{{ $stats['all'] }}
Total Assigned
{{ $stats['active'] }}
Active
{{ $stats['completed'] }}
Completed
@forelse($jobs as $job)
{{ $job->contact?->initials ?? '??' }}
{{ $job->job_number }} {{ $job->stageLabel() }}
{{ $job->contact?->full_name ?? '—' }}
{{ $job->site_address }}{{ $job->site_suburb ? ', '.$job->site_suburb : '' }}
@if($job->expected_completion)
Due {{ $job->expected_completion->format('d M Y') }}
@endif {{ ucwords(str_replace('_', ' ', $job->status)) }}
@empty

No jobs assigned to you yet.

Contact your manager to have jobs assigned to your account.

@endforelse
@if($jobs->hasPages())
{{ $jobs->links() }}
@endif
Go to My Timesheet
@else {{-- ── STANDARD: full jobs list for non-trades ──────────────────────────────── --}}

Jobs

Track all jobs through the pipeline

New Job
@foreach([ ['label' => 'All Jobs', 'key' => 'all', 'icon' => 'briefcase'], ['label' => 'Active', 'key' => 'active', 'icon' => 'play-circle'], ['label' => 'On Hold', 'key' => 'on_hold', 'icon' => 'pause-circle'], ['label' => 'Completed', 'key' => 'completed', 'icon' => 'check-circle'], ['label' => 'Overdue', 'key' => 'overdue', 'icon' => 'exclamation-triangle'], ] as $stat)
{{ $stats[$stat['key']] }}
{{ $stat['label'] }}
@endforeach
@forelse($jobs as $job) @empty @endforelse
Job Client Stage Consultant Value Due Status
{{ $job->job_number }}
{{ $job->project_type ? ucfirst($job->project_type) : '—' }}
{{ $job->contact?->initials ?? '??' }}
{{ $job->contact?->full_name ?? '—' }}
{{ $job->site_suburb }}
{{ $job->stageLabel() }} {{ $job->consultant?->name ?? '—' }} ${{ number_format($job->job_value ?? 0) }} @if($job->expected_completion) {{ $job->expected_completion->format('d M Y') }} @else@endif {{ ucwords(str_replace('_', ' ', $job->status)) }}
No jobs found.
@if($jobs->hasPages())
{{ $jobs->links() }}
@endif
@endif @endsection