Files
portal-api/resources/views/admin/support/index.blade.php
T
2025-07-24 16:18:27 +07:00

66 lines
2.8 KiB
PHP

@extends("admin.main")
@section("content")
@if(auth()->guard('admins')->user()->can("manager support"))
<div class="card card-primary card-outline">
<div class="card-header">
</div>
<div class="card-body">
<table class="table table-invoice table-bordered">
<thead>
<tr>
<th style="width: 10px">
<label for=""></label><input type="checkbox" name="check" class="check-all" id="">
</th>
<th>Ticket Num</th>
<th>Subject</th>
<th>Room</th>
<th>Status</th>
<th style="width: 40px"></th>
</tr>
</thead>
<tbody>
@if(count($tickets) > 0)
@foreach($tickets->unique('ticket_num')->all() as $item)
<tr>
<td><input type="checkbox" name="id[]" id="" value="{{ $item->id }}"></td>
<td class="text-center">
<a href="{{route('support.edit',['ticket_num' => $item->ticket_num])}}">
{{ $item->ticket_num }}
</a>
</td>
<td class="text-center">
{{ $item->subject }}
</td>
<td class="text-center">
{{ $item->room }}
</td>
<td class="text-center">
{!! Helpers::get_ticket_status($item->status) !!}
</td>
<td class="text-center">
<a class="btn btn-warning btn-sm"
href="{{route('support.edit',['ticket_num' => $item->ticket_num])}}">
<i class="fas fa-search"></i>
</a>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="card-footer">
{{ $tickets->withQueryString()->links() }}
</div>
</div>
@else
<div class="alert alert-danger alert-dismissible">
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to any Support
management department</h5>
</div>
@endif
@endsection