| 123456789101112131415161718192021222324252627282930 |
- @foreach($records as $record)
- @if($showHidden || (!$record->hidden && $record->hidden !== null))
- <tr class="record-level-{{ $indentation }}" style="padding-left: {{ $indentation * 20 }}px;">
- <td style="padding-left: {{ $indentation * 20 }}px;">
- {{ str_repeat('— ', $indentation) }}{{ $record->name }}
- </td>
- <td>{{ $record->type == 'IN' ? 'Entrata' : 'Uscita' }}</td>
- <td>
- <span class="badge tessera-badge {{ $record->enabled ? 'active' : 'suspended' }}">
- {{ $record->enabled ? 'attivo' : 'disattivo' }}
- </span>
- </td>
- <td>
- <button type="button" class="btn btn-outline-success btn-sm" wire:click="addLevel({{ $record->id }})">Aggiungi livello</button>
- <button type="button" class="btn btn-outline-success btn-sm" wire:click="duplicate({{ $record->id }})">Duplica</button>
- <button type="button" class="btn btn-sm" wire:click="edit({{ $record->id }})"><i class="fa-regular fa-pen-to-square"></i></button>
- @if($record->hidden)
- <button type="button" class="btn btn-success btn-sm" wire:click="show({{ $record->id }})"><i class="fa-regular fa-eye"></i></button>
- @else
- <button type="button" class="btn btn-warning btn-sm" onclick="confirm('Sei sicuro di voler nascondere questo elemento?') || event.stopImmediatePropagation()" wire:click="hide({{ $record->id }})"><i class="fa-regular fa-eye-slash"></i></button>
- @endif
- </td>
- </tr>
- @if(count($record->childs))
- @include('livewire/causal_child', ['records' => $record->childs, 'indentation' => $indentation + 1])
- @endif
- @endif
- @endforeach
|