refactor(outlet): conditionally render image section only if images exist
This commit is contained in:
parent
90dd06ff17
commit
8c4a364377
@ -93,18 +93,21 @@ class="font-medium text-gray-700 dark:text-gray-300">{{ $day }}:</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-white mb-2 flex items-center gap-2">
|
||||
<flux:icon.photo class="w-4 h-4" />
|
||||
Gambar
|
||||
</h4>
|
||||
<flux:avatar.group class="mt-6">
|
||||
@foreach ($outlet['images'] as $key => $value)
|
||||
<flux:avatar circle size="lg" src="{{ $value }}"
|
||||
wire:click="openImage('{{ $value }}')" />
|
||||
@endforeach
|
||||
</flux:avatar.group>
|
||||
</div>
|
||||
@if (count($outlet['images']) > 0)
|
||||
<div class="mb-4">
|
||||
<h4
|
||||
class="text-sm font-semibold text-gray-900 dark:text-white mb-2 flex items-center gap-2">
|
||||
<flux:icon.photo class="w-4 h-4" />
|
||||
Gambar
|
||||
</h4>
|
||||
<flux:avatar.group class="mt-6">
|
||||
@foreach ($outlet['images'] as $key => $value)
|
||||
<flux:avatar circle size="lg" src="{{ $value }}"
|
||||
wire:click="openImage('{{ $value }}')" />
|
||||
@endforeach
|
||||
</flux:avatar.group>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@canany(['update outlet', 'delete outlet'])
|
||||
<flux:separator></flux:separator>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user