<table>
    <thead>
    <tr>
        @if($user->disabledColumn('employee_id','targets'))
            <th scope="col">{{ __('targets.employee_id') }}</th>
        @endif
        @if($user->disabledColumn('year','targets'))
            <th scope="col">{{ __('targets.year') }}</th>
        @endif
        @if($user->disabledColumn('product_id','targets'))
            <th scope="col">{{ __('targets.product_id') }}</th>
        @endif
        @if($user->disabledColumn('total_target','targets'))
            <th scope="col" >{{ __('targets.total_target') }}</th>
        @endif
    </tr>
    </thead>
    <tbody class="response">
    @foreach($targets as $key=> $row)
        <tr>
            @if($user->disabledColumn('employee_id','targets'))
                <td>{{ $row->employee->name }}</td>
            @endif
            @if($user->disabledColumn('year','targets'))
                <td>{{ $row->year }}</td>
            @endif
            @if($user->disabledColumn('product_id','targets'))
                <td>{{ $row->product->currentDescription->title ?? '' }}</td>
            @endif
            @if($user->disabledColumn('total_target','targets'))
                <td>{{ $row->total_target }}</td>
            @endif
        </tr>
    @endforeach
    </tbody>
</table>
