<table class="table table-bordered">
    <thead class="thead">
        <tr>
            <th class="sorting_asc">{{ _trans('common.SL') }}</th>
            <th class="sorting_asc">{{ _trans('common.Title') }}</th>
            <th class="sorting_asc">{{ _trans('common.Type') }}</th>
            <th class="sorting_asc">{{ _trans('common.Threshold Minutes') }}</th>
            <th class="sorting_asc">{{ _trans('common.Threshold Days') }}</th>
            <th class="sorting_asc">{{ _trans('common.Deduction Days') }}</th>
            <th class="sorting_asc">{{ _trans('common.Description') }}</th>
        </tr>
    </thead>
    <tbody class="tbody ">
        @if (count(@$data['show']->original['data']['tardyRules']) > 0)
            @foreach (@$data['show']->original['data']['tardyRules'] as $key => $row)
                <tr>
                    <td>{{ ++$key }}</td>
                    <td>{{ $row->tardyRule->title }}</td>
                    <td>
                        @php
                            $className = 'success';
                            if (@$row->tardyRule->type == 'checkout') {
                                $className = 'danger';
                            }
                            if (@$row->tardyRule->type == 'break') {
                                $className = 'warning';
                            }
                        @endphp
                        <small class="badge badge-{{ $className }}">{{ ucfirst(@$row->tardyRule->type) }}</small>
                    </td>
                    <td>{{ @$row->tardyRule->threshold_minutes }}</td>
                    <td>{{ @$row->tardyRule->threshold_days }}</td>
                    <td>{{ @$row->tardyRule->deduction_days }}</td>
                    <td>{{ @$row->tardyRule->description }}</td>
                </tr>
            @endforeach
        @else
            <tr class="odd">
                <td valign="top" colspan="9" class="dataTables_empty">
                    <div class="no-data-found-wrapper text-center ">
                        <img src="{{ asset('assets/images/empty.png') }}" alt="" class="mb-primary empty_table" width="200">
                    </div>
                </td>
            </tr>
        @endif
    </tbody>
</table>