Files
portal-api/resources/views/administrator/pages/addon/datatable/children.blade.php
T

52 lines
2.0 KiB
PHP

<table class="table table-bordered table-striped table-hover mb-0 bg-light">
<thead>
<tr>
<th>Name</th>
<th>Prefix</th>
<th>Min</th>
<th>Max</th>
<th>Step</th>
<th>Price</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse($children as $child)
<tr>
<td>{{ $child['name'] }}</td>
<td>{{ $child['prefix'] }}</td>
<td>{{ $child['min'] }}</td>
<td>{{ $child['max'] }}</td>
<td>{{ $child['step'] }}</td>
<td>{{ number_format($child['price']) }} VND</td>
<td>
@if($child['status'])
<span class="badge bg-success">Active</span>
@else
<span class="badge bg-danger">Inactive</span>
@endif
</td>
<td>
<div class="d-flex gap-1">
<a href="{{ route('addon.edit', ['id' => $child['id']]) }}" class="btn btn-sm btn-outline-primary">
<i data-lucide="pencil" style="width:14px;height:14px"></i>
</a>
<form action="{{ route('addon.destroy', ['id' => $child['id']]) }}" method="POST" class="d-inline">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-sm btn-outline-danger" onclick="return confirm('Are you sure?')">
<i data-lucide="trash" style="width:14px;height:14px"></i>
</button>
</form>
</div>
</td>
</tr>
@empty
<tr>
<td colspan="8" class="text-center text-muted">No addons in this group</td>
</tr>
@endforelse
</tbody>
</table>