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

52 lines
2.5 KiB
PHP

<div class="table-responsive">
<table class="table table-bordered table-striped" id="holding_units_table" style="width:100%">
<thead>
<tr>
<th>@lang('lang_v1.holding_unit_name')</th>
<th>@lang('lang_v1.holding_code')</th>
<th>@lang('lang_v1.holding_entity')</th>
<th>@lang('lang_v1.holding_parent_unit')</th>
<th>@lang('essentials::lang.department')</th>
<th>@lang('lang_v1.holding_status')</th>
<th>@lang('messages.action')</th>
</tr>
</thead>
<tbody>
@forelse($units as $unit)
<tr>
<td><strong>{{ $unit->name }}</strong></td>
<td>{{ $unit->code ?: '—' }}</td>
<td>{{ optional($unit->entity)->name }}</td>
<td>{{ optional($unit->parent)->name ?: '—' }}</td>
<td>
@if(!empty($unit->meta['hrm_department_id']))
<span class="label label-info">@lang('lang_v1.holding_hrm_linked')</span>
@else
@endif
</td>
<td>
@if($unit->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.units.edit', $unit->id) }}" data-container=".holding_unit_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.units.destroy', $unit->id) }}" data-tab="units_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>