@extends('layout.app') @section('title', 'Edit Job Card') @push('header_script') @endpush @section('content')
{!! Form::model($jobCard, ['route' => ['job-card.update', $jobCard->id], 'method' => 'PUT', 'class' => 'row g-3']) !!} {{-- Header Section --}}
{!! Form::select('vehicle_id', ['' => '-- Select Truck --'] + $vehicles, null, [ 'class' => 'form-control select2', 'id' => 'vehicle_id', 'required' ]) !!}
{!! Form::select('driver_id', ['' => '-- Select Driver --'] + $drivers, null, [ 'class' => 'form-control select2', 'id' => 'driver_id', 'required' ]) !!}
@php $workTypes = is_string($jobCard->work_type) ? explode(',', $jobCard->work_type) : ($jobCard->work_type ?? []); @endphp
{!! Form::select('status', ['Open' => 'Open', 'Closed' => 'Closed'], null, [ 'class' => 'form-control select2', 'id' => 'status' ]) !!}
{{-- Work Details Table --}}
Work Details
@foreach($jobCard->items as $index => $item) @endforeach
Sr No Description Parts Used Qty Mechanic Amount
{{ $index + 1 }}
Total Amount: {{ number_format($jobCard->items->sum('amount'), 2) }}
{!! Form::close() !!}
@endsection @push('footer_script') @endpush