@extends('dashboard.layouts.app') @section('title', __('Orders')) @section('page_heading', __('Orders')) @section('breadcrumb') @endsection @section('content')

{{ __('Orders') }}

{{ __('Create Order') }}
{{-- Filter Form --}}
{{ __('Reset') }}
@if($orders->isEmpty())
{{ __('No orders found.') }}
@else
@foreach ($orders as $order) @endforeach
{{ __('ID') }} {{ __('Source') }} {{ __('Created By') }} {{ __('Assigned To') }} {{ __('Status') }} {{ __('Invoice') }} {{ __('Created At') }} {{ __('Actions') }}
{{ $order->id }} {{ ucfirst($order->source) }} {{ $order->createdBy->name ?? 'N/A' }} {{ $order->assignedTo->name ?? 'N/A' }} @switch($order->status) @case('new') {{ __('New') }} @break @case('pending') {{ __('Pending') }} @break @case('completed') {{ __('Completed') }} @break @case('canceled') {{ __('Canceled') }} @break @default {{ ucfirst($order->status) }} @endswitch @if ($order->invoice) {{ __('View Invoice') }} #{{ $order->invoice->id }} @else
@csrf
@endif
{{ $order->created_at->format('Y-m-d H:i:s') }}
{{ __('View') }} @if(!$order->invoice) {{ __('Edit') }} @endif
@csrf @method('DELETE')
{{ $orders->appends(request()->query())->links() }} {{-- Pagination links with query string --}}
@endif
@endsection @section('scripts') @endsection