feat(storages): add method to retrieve the first storage ID for improved stability in storage display

This commit is contained in:
Andras Bacsai
2025-09-11 13:41:22 +02:00
parent 5e0b86f322
commit 13af4811f5
2 changed files with 13 additions and 2 deletions

View File

@@ -3,10 +3,10 @@
@foreach ($resource->persistentStorages as $storage)
@if ($resource->type() === 'service')
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage"
:resource="$resource" :isFirst="$loop->first" isService='true' />
:resource="$resource" :isFirst="$storage->id === $this->firstStorageId" isService='true' />
@else
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage"
:resource="$resource" startedAt="{{ data_get($resource, 'started_at') }}" />
:resource="$resource" :isFirst="$storage->id === $this->firstStorageId" startedAt="{{ data_get($resource, 'started_at') }}" />
@endif
@endforeach
</div>