update os group

This commit is contained in:
pbao9
2026-02-02 09:07:33 +07:00
parent b3ad727d55
commit af71413a69
9 changed files with 182 additions and 106 deletions
@@ -1,79 +1,32 @@
@php use App\Http\Helpers\Helper; @endphp
@extends('admin.main')
@extends('administrator.layout.master')
@push('plugin-styles')
<link href="{{ asset('build/plugins/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@section('breadcrumb')
@php
$breadcrumbItems = [
['label' => 'Modules'],
['label' => 'Package vCenter'],
['label' => 'Datacenter', 'active' => true],
];
@endphp
<x-breabcrumb :items="$breadcrumbItems" />
@endsection
@section('content')
@if(auth()->guard('admins')->user()->can("manager package module"))
@if (auth()->guard('admins')->user()->can('manager package module'))
<div class="card card-primary card-outline">
<div class="card-header">
@include("admin.block.Group")
@include('administrator.pages.block.Group')
</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>Group Name</th>
<th>Thumbnail</th>
<th>Host Name</th>
<th>Status</th>
<th style="width: 40px"></th>
<th style="width: 40px"></th>
</tr>
</thead>
<tbody>
@if($group->count())
@foreach($group->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->name }}
</td>
<td class="text-center">
<img
style="height: 60px"
src="{{ $item->thumbnail ?? "" }}"
alt="{{ $item->name }}">
</td>
<td class="text-center">
@isset( $item->host->name)
{{$item->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.group.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.group.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">
{{ $group->withQueryString()->links() }}
<x-datatable id="groupTable" ajax="{{ route('package.group.datatable') }}" :columns="[
['key' => 'name', 'label' => 'Name'],
['key' => 'thumbnail', 'label' => 'Thumbnail'],
['key' => 'module_host_id', 'label' => 'Host'],
['key' => 'status', 'label' => 'Status'],
['key' => 'action', 'label' => 'Action'],
]" />
</div>
</div>
@else
@@ -83,3 +36,9 @@
</div>
@endif
@endsection
@push('plugin-scripts')
<script src="{{ asset('build/plugins/jquery/jquery.min.js') }}"></script>
<script src="{{ asset('build/plugins/select2/select2.min.js') }}"></script>
<script src="{{ asset('build/plugins/datatables.net/dataTables.min.js') }}"></script>
<script src="{{ asset('build/plugins/datatables.net-bs5/dataTables.bootstrap5.min.js') }}"></script>
@endpush