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

87 lines
4.1 KiB
PHP

@php use App\Http\Helpers\Helper; @endphp
@extends('admin.main')
@section('content')
@if(auth()->guard('admins')->user()->can("manager package module"))
<div class="card card-primary card-outline">
<div class="card-header">
<a href="{{ route('package.version.create') }}" class="btn btn-outline-secondary">
<i class="fas fa-plus"></i> Add New Version OS
</a>
</div>
<div class="card-body">
<table class="table table-invoice table-bordered">
<thead>
<tr>
<th>
<label>
<input type="checkbox" name="check" class="check-all">
</label>
</th>
<th>Version</th>
<th>Group Name</th>
<th>Host Location</th>
<th>Status</th>
<th style="width: 40px"></th>
<th style="width: 40px"></th>
</tr>
</thead>
<tbody>
@if(count($versions))
@foreach($versions->all() as $item)
<tr>
<td class="text-center">
<label for=""></label><input type="checkbox" name="id[]" value="{{ $item->id }}"
id="">
</td>
<td class="text-center">
{{ $item->version }}
</td>
<td class="text-center">
@isset($item->osGroup->name)
{{$item->osGroup->name}}
@endisset
</td>
<td class="text-center">
@isset($item->osGroup->host->name)
{{$item->osGroup->host->name}}
@endisset
</td>
<td class="text-center">
{!! $item->getStatus() !!}
</td>
<td class="text-center">
<a class="btn btn-warning btn-sm"
href="{{ route('package.version.edit',['id' => $item->id]) }}">
<i class="fas fa-user-edit"></i>
</a>
</td>
<td class="text-center">
<form method="post"
class="d-inline"
action="{{ route('package.version.destroy',['id' => $item->id]) }}">
@method('delete')
@csrf
<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">
{{ $versions->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 Module Package
management department</h5>
</div>
@endif
@endsection