{{ __('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))
|
{{ __(Str::headline($sectionKey)) }}
|
@if ($sectionKey === 'generalInfo')
@foreach ($extraGeneralFields as $extraKey => $extraValue)
|
{{ __(Str::headline($extraKey)) }}
|
{{ __($extraValue ?? '-') }}
|
@endforeach
@endif
@foreach ($sectionData as $key => $value)
|
{{ __(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
|
@endforeach
@endif
@endforeach
@if (!empty($machine->additional_information))
|
{{ __('Additional Information') }}
|
| {!! nl2br(e($machine->additional_information)) !!} |
@endif
@if ($machine->media && $machine->media->isNotEmpty())
@if ($images->isNotEmpty())
{{ __('Images') }}
@foreach ($images as $media)
{{-- Enlace GLightbox para la galerĂa --}}
@endforeach
@endif
@if ($video)
{{ __('Video') }}
@endif
@endif
@if ($machine->promo_flyer_path)
{{ __('Promotional Flyer') }}
@endif