@extends('layouts.users.app') @section('content')
{{-- Breadcrumb Component --}}

{{ __('Used Machine Details') }}

{{ __('Name') }} {{ $machine->brand . $machine->model }}
{{ __('Brand') }} {{ $machine->brand }}
{{ __('Model') }} {{ $machine->model }}
{{ __('Year') }} {{ $machine->year }}
{{ __('Type of Machine') }} {{ __($machine->type_of_machine) }}
{{ __('Status') }} {{ $machine->sale_status->label() }}
{{ __('Sales user') }} @if ($machine->saleTicket?->user) {{ $machine->saleTicket->user->name }} ({{ $machine->saleTicket->user->email }}) @else {{ __('No User Assigned') }} @endif
{{-- Machine Details Table DinĂ¡mica --}}
@php $ordered = collect($sectionOrder) ->filter(fn($key) => isset($machineData[$key])) ->mapWithKeys(fn($key) => [$key => $machineData[$key]]); $remaining = collect($machineData)->except($sectionOrder); $sections = $ordered->merge($remaining); @endphp @foreach ($sections as $sectionKey => $sectionData) @if (is_array($sectionData) && !empty($sectionData)) @if ($sectionKey === 'generalInfo') @foreach ($extraGeneralFields as $extraKey => $extraValue) @endforeach @endif @foreach ($sectionData as $key => $value) @endforeach @endif @endforeach @if (!empty($machine->additional_information)) @endif
{{ __(Str::headline($sectionKey)) }}
{{ __(Str::headline($extraKey)) }} {{ __($extraValue ?? '-') }}
{{ __(str_replace('_', ' ', $key)) }} @if ($key === 'currency_id') {{ \App\Models\Currency::getLabelById($value) ?? $value }} @elseif(is_bool($value)) {{ $value ? __('Yes') : __('No') }} @elseif(is_array($value)) {{ implode(', ', array_map(fn($item) => __($item), $value)) }} @else {{ __($value) }} @endif
{{ __('Additional Information') }}
{!! nl2br(e($machine->additional_information)) !!}
@if ($machine->media && $machine->media->isNotEmpty())
@if ($images->isNotEmpty())

{{ __('Images') }}

@foreach ($images as $media)
{{-- Enlace GLightbox para la galerĂ­a --}} Machine Image
@endforeach
@endif @if ($video)

{{ __('Video') }}

@endif
@endif @if ($machine->promo_flyer_path)

{{ __('Promotional Flyer') }}

@endif
@endsection @push('styles') @endpush @push('scripts') @endpush