ultimatepos/resources/views/holding/partials/table_entities.blade.php

46 lines
2.3 KiB
PHP

<div class="table-responsive">
<table class="table table-bordered table-striped" id="holding_entities_table" style="width:100%">
<thead>
<tr>
<th>@lang('lang_v1.name')</th>
<th>@lang('lang_v1.holding_code')</th>
<th>@lang('lang_v1.type')</th>
<th>@lang('lang_v1.holding_internal')</th>
<th>@lang('lang_v1.holding_units_count')</th>
<th>@lang('lang_v1.holding_status')</th>
<th>@lang('messages.action')</th>
</tr>
</thead>
<tbody>
@forelse($entities as $entity)
<tr>
<td><strong>{{ $entity->name }}</strong></td>
<td>{{ $entity->code ?: '—' }}</td>
<td>{{ $entityTypes[$entity->entity_type] ?? $entity->entity_type }}</td>
<td>{{ $entity->is_internal ? __('messages.yes') : __('messages.no') }}</td>
<td>{{ $entity->units->count() }}</td>
<td>
@if($entity->is_active)
<span class="label label-success">@lang('lang_v1.holding_status_active')</span>
@else
<span class="label label-warning">@lang('lang_v1.holding_status_inactive')</span>
@endif
</td>
<td>
<div class="btn-group">
@can('holding.update')
<button type="button" class="btn btn-xs btn-primary btn-modal" data-href="{{ route('holding.entities.edit', $entity->id) }}" data-container=".holding_entity_modal"><i class="glyphicon glyphicon-edit"></i></button>
@endcan
@can('holding.delete')
<button type="button" class="btn btn-xs btn-danger holding-delete" data-href="{{ route('holding.entities.destroy', $entity->id) }}" data-tab="entities_tab"><i class="glyphicon glyphicon-trash"></i></button>
@endcan
</div>
</td>
</tr>
@empty
<tr class="holding-table-empty"><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
@endforelse
</tbody>
</table>
</div>