@extends('adminlte::page') @section('title', 'Job Cards') @section('content_header')

Job Cards

@stop @section('content')
@can('create jobcards') Create New Job Card @endcan
@forelse($jobCards as $job) @empty @endforelse
# Title Description Assigner Assignee Status Due Date Rating Actions
{{ $loop->iteration + ($jobCards->currentPage() - 1) * $jobCards->perPage() }} {{ $job->title }} {{ $job->description ?? '-' }} {{ $job->assigner?->name ?? 'N/A' }} {{ $job->assignee?->name ?? 'N/A' }} {{ ucfirst($job->status) }} {{ $job->due_date?->format('d M Y') ?? '-' }} @if($job->status === 'completed') @if($job->rating) ⭐ {{ $job->rating }}/5 @elseif(Auth::user()->staff && Auth::user()->staff->id === $job->assigned_by && auth()->user()->can('rate jobcards'))
@csrf @method('PATCH')
@else Awaiting rating @endif @else Pending @endif
@can('edit jobcards') Edit @endcan @can('delete jobcards')
@csrf @method('DELETE')
@endcan
No job cards found.
@stop