@extends('layouts/layoutMaster') @section('title', __('locale.Rental Details')) @section('vendor-style') @vite(['resources/assets/css/datatables.scss', 'resources/assets/vendor/libs/flatpickr/flatpickr.scss']) @endsection @section('page-style') @vite('resources/assets/vendor/scss/pages/page-user-view.scss') @endsection @section('vendor-script') @vite(['resources/assets/js/datatables.js', 'resources/assets/vendor/libs/flatpickr/flatpickr.js']) @endsection @section('content')
Driver avatar
{{ __('locale.Driver Details') }}
  • {{ __('locale.Name') }}: {{ $rental->driver?->user?->name ?? '-' }}
  • {{ __('locale.Email') }}: {{ $rental->driver?->user?->email ?? '-' }}
  • {{ __('locale.Phone') }}: {{ $rental->driver?->user?->phone ?? '-' }}
Car Image
{{ __('locale.Car Details') }}
  • {{ __('locale.Model') }}: {{ $rental->car?->vehicle_model ?? '-' }}
  • {{ __('locale.Brand') }}: {{ $rental->car?->vehicle_brand ?? '-' }}
  • {{ __('locale.Number Plate') }}: {{ $rental->car?->vehicle_number ?? '-' }}
@php // Prepare installments array safely $installmentsArray = $rental->installments ->map(function ($ins) { return [ 'id' => $ins->id, 'due_date' => $ins->payment_date, 'amount' => $ins->amount, 'paid_amount' => $ins->paid_amount, 'status' => $ins->paid_amount >= $ins->amount ? 'Paid' : ($ins->paid_amount > 0 ? 'Partial' : 'Unpaid'), ]; }) ->toArray(); @endphp @endsection @section('page-script') @vite(['resources/assets/js/installment.js', 'resources/assets/js/forms-pickers.js']) @endsection