@extends('layouts.app') @section('content')

{{ app()->getLocale() == 'ar' ? 'تسجيل التأمين على المركبات' : 'Vehicle Insurances' }}

@foreach($insurances as $insurance) @endforeach
{{ app()->getLocale() == 'ar' ? 'السيارة' : 'Vehicle' }} {{ app()->getLocale() == 'ar' ? 'شركة التأمين' : 'Company' }} {{ app()->getLocale() == 'ar' ? 'رقم الوثيقة' : 'Policy #' }} {{ app()->getLocale() == 'ar' ? 'نوع التأمين' : 'Type' }} {{ app()->getLocale() == 'ar' ? 'تاريخ الانتهاء' : 'Expiry Date' }} {{ app()->getLocale() == 'ar' ? 'الحالة' : 'Status' }} {{ app()->getLocale() == 'ar' ? 'العمليات' : 'Actions' }}
{{ $insurance->car->brand?->name }} {{ $insurance->car->carModel?->name }}
{{ $insurance->car->plate_number }}
{{ $insurance->company->name }} {{ $insurance->policy_number }} {{ $insurance->insurance_type == 'comprehensive' ? (app()->getLocale() == 'ar' ? 'شامل' : 'Comprehensive') : (app()->getLocale() == 'ar' ? 'ضد الغير' : 'Third Party') }}
{{ $insurance->end_date->format('Y-m-d') }}
{{ $insurance->status == 'active' ? (app()->getLocale() == 'ar' ? 'ساري' : 'Active') : (app()->getLocale() == 'ar' ? 'منتهي' : 'Expired') }}
@csrf @method('DELETE')
@if($insurance->document_path) @endif
{{ $insurances->links() }}
@endsection