Files
portal-api/resources/views/administrator/pages/addon/index.blade.php
T
pbao9 17b02631e4 Refactor views to use new layout structure and update routes for administrator pages
- Changed view extends from "admin.main" to "administrator.layout.master" across multiple files.
- Updated route names in admin.php and administrator.php to reflect new structure for user, order, invoice, and other management functionalities.
- Adjusted view includes to point to the new directory structure for blocks and components.
- Ensured all permission checks remain intact while refactoring the views.
2026-02-02 10:31:11 +07:00

60 lines
2.5 KiB
PHP

@extends("administrator.layout.master")
@section("content")
<div class="card card-primary card-outline">
<div class="card-header">
<a href="{{ route('addon.create') }}" class="btn btn-outline-secondary">
<i class="fas fa-plus"></i> Add New Addon
</a>
</div>
<div class="card-body">
<table class="table table-invoice table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Price</th>
<th>Type</th>
<th style="width:40px"></th>
<th style="width: 40px"></th>
</tr>
</thead>
<tbody>
@if(count($addOns) > 0)
@foreach($addOns->all() as $item)
<tr>
<td class="text-center">
{{ $item->name }}
</td>
<td class="text-center">
{{ number_format($item->price,0,',','.') }} vnđ
</td>
<td class="text-center">
{{ $item->Type->name }}
</td>
<td>
<a class="btn btn-warning btn-sm" href="{{ route('addon.edit',['id' => $item->id]) }}">
<i class="fas fa-user-edit"></i>
</a>
</td>
<td>
<form method="post" class="d-inline"
action="{{ route('addon.destroy',['id' => $item->id]) }}">
@csrf
@method('delete')
<button type="submit" data-toggle="tooltip" data-placement="top" title=""
class="btn btn-sm btn-danger" data-original-title="Xoá">
<i class="fas fa-trash"></i>
</button>
</form>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="card-footer">
{{ $addOns->withQueryString()->links() }}
</div>
</div>
@endsection