add fields env functionality to grid mode
This commit is contained in:
parent
7515d6fd5e
commit
f92f1248d9
|
@ -16,14 +16,35 @@
|
|||
<header>
|
||||
<div class="mt-4">
|
||||
<h1 class="text-3xl clamp one-line">{{ $vehicle->getVehicleName() }}</h1>
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Brand') }}: {{ $brand }}</span>
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Class') }}: {{ $class }}</span>
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Storage') }}: {{ $vehicle->getVehicleStorage() }}</span>
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Fuel Type') }}: {{ $fuelType }}</span>
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Fuel Volume') }}: {{ $vehicle->getVehicleFuelVolume() }}</span>
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Seats') }}: {{ $vehicle->getVehicleSeats() }}</span>
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Price') }}: {{ $vehicle->getVehiclePrice() }}</span>
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Top Speed') }}: {{ $vehicle->getVehicleTopSpeed() }}</span>
|
||||
@foreach(explode(',', env('FIELDS')) as $field)
|
||||
@switch($field)
|
||||
@case('brand')
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Brand') }}: {{ $brand }}</span>
|
||||
@break
|
||||
@case('class')
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Class') }}: {{ $class }}</span>
|
||||
@break
|
||||
@case('storage')
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Storage') }}: {{ $vehicle->getVehicleStorage() }}</span>
|
||||
@break
|
||||
@case('fuel_type')
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Fuel Type') }}: {{ $fuelType }}</span>
|
||||
@break
|
||||
@case('fuel_volume')
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Fuel Volume') }}: {{ $vehicle->getVehicleFuelVolume() }}</span>
|
||||
@break
|
||||
@case('seats')
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Seats') }}: {{ $vehicle->getVehicleSeats() }}</span>
|
||||
@break
|
||||
@case('price')
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Price') }}: {{ $vehicle->getVehiclePrice() }}</span>
|
||||
@break
|
||||
@case('top_speed')
|
||||
<span class="mt-2 block text-zinc-400 text-xs">{{ __('Top Speed') }}: {{ $vehicle->getVehicleTopSpeed() }}</span>
|
||||
@break
|
||||
@default
|
||||
@endswitch
|
||||
@endforeach
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
@ -33,6 +54,11 @@
|
|||
<p>{{ __('Sold at') }}: {{ $vendor }}</p>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="flex items-center text-sm">
|
||||
<h5 class="font-bold mr-3">
|
||||
<p>{{ __('ID') }}: {{ $vehicle->getVehicleId() }}</p>
|
||||
</h5>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue