@inject('actionRulesClass','PowerComponents\LivewirePowerGrid\Helpers\ActionRules') @if(data_get($setUp, 'detail.showCollapseIcon')) @endif @if($checkbox) @endif @foreach($columns as $column) @endforeach @if(isset($actions) && count($actions)) {{ trans('livewire-powergrid::datatable.labels.action') }} @endif @if(is_null($data) || count($data) === 0) {{ trans('livewire-powergrid::datatable.labels.no_data') }} @else @includeWhen($headerTotalColumn, 'livewire-powergrid::components.table-header') @foreach($data as $row) @php $class = $theme->table->trBodyClass; $rules = $actionRulesClass->recoverFromAction('pg:rows', $row); $ruleSetAttribute = data_get($rules, 'setAttribute'); if (filled($ruleSetAttribute)) { foreach ($ruleSetAttribute as $attribute) { if (isset($attribute['attribute'])) { $class .= ' '.$attribute['value']; } } } @endphp @if(isset($setUp['detail'])) @else @endif @php $ruleRows = $actionRulesClass->recoverFromAction('pg:rows', $row); $ruleDetailView = data_get($ruleRows, 'detailView'); @endphp @includeWhen(data_get($setUp, 'detail.showCollapseIcon'), powerGridThemeRoot().'.toggle-detail', [ 'theme' => $theme->table, 'view' => data_get($setUp, 'detail.viewIcon') ?? null ]) @if($checkbox) @php $rules = $actionRulesClass->recoverFromAction('pg:checkbox', $row); $ruleHide = data_get($rules, 'hide'); $ruleDisable = data_get($rules, 'disable'); $ruleSetAttribute = data_get($rules, 'setAttribute')[0] ?? []; @endphp @include('livewire-powergrid::components.checkbox-row', [ 'attribute' => $row->{$checkboxAttribute} ]) @endif @include('livewire-powergrid::components.row') @if(isset($setUp['detail'])) @endif @if(isset($setUp['detail'])) @endif @endforeach @includeWhen($footerTotalColumn, 'livewire-powergrid::components.table-footer') @endif