@extends('layouts.app') @section('title', 'Approval Instances') @section('content')

Approval Instances

Pending Approvals

{{ $instances->total() }}

Total Records

{{ $instances->where('status', 'PENDING')->count() }}

Pending

{{ $instances->where('status', 'APPROVED')->count() }}

Approved

{{ $instances->where('status', 'REJECTED')->count() }}

Rejected

@if($instances->count() > 0)
@foreach($instances as $index => $instance) @endforeach
# Reference Workflow Initiated By Status Current Step Created Actions
{{ $instances->firstItem() + $index }} {{ $instance->record_number ?? 'N/A' }}
{{ $instance->record_title ?? 'Untitled' }}
@if($instance->workflow) {{ $instance->workflow->workflow_name }} @else N/A @endif {{ $instance->initiatedBy->name ?? 'System' }} @switch($instance->status) @case('PENDING') Pending @break @case('IN_PROGRESS') In Progress @break @case('APPROVED') Approved @break @case('REJECTED') Rejected @break @default {{ $instance->status }} @endswitch @if($instance->current_step) Step {{ $instance->current_step }} @else - @endif {{ $instance->created_at ? $instance->created_at->format('d M Y H:i') : 'N/A' }} View
Showing {{ $instances->firstItem() }} to {{ $instances->lastItem() }} of {{ $instances->total() }} records
{{ $instances->links('pagination::bootstrap-4') }}
@else
No approval instances found.
@endif
@endsection