causal_child.blade.php 1.0 KB

123456789101112131415
  1. @foreach($records as $record)
  2. <tr>
  3. <td>{!! str_repeat("&nbsp;", $indentation * 5) !!} {{$record->name}}</td>
  4. <td>{{$record->type == 'IN' ? 'Ingresso' : 'Uscita'}}</td>
  5. <td> <span class="tablesaw-cell-content"><span class="badge tessera-badge {{$record->enabled ? 'active' : 'suspended'}}">{{$record->enabled ? 'attivo' : 'disattivo'}}</span></span></td>
  6. <td>
  7. <button type="button" class="btn btn-outline-success btn-sm" wire:click="addLevel({{ $record->id }})">Aggiungi livello</button>
  8. <button type="button" class="btn btn-outline-primary btn-sm" wire:click="edit({{ $record->id }})">Modifica</button>
  9. <button type="button" class="btn btn-outline-danger btn-sm" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="delete({{ $record->id }})">Elimina</button>
  10. </td>
  11. </tr>
  12. @if(count($record->childs))
  13. @include('livewire/causal_child',['records' => $record->childs, 'indentation' => $indentation + 1])
  14. @endif
  15. @endforeach