update hosting

This commit is contained in:
pbao9
2026-02-04 09:49:48 +07:00
parent bae4cc59ae
commit 0b29522bd2
8 changed files with 137 additions and 147 deletions
@@ -1,9 +1,10 @@
<a href="{{ route('module.hosting.create') }}" class="btn btn-outline-secondary"><i class="fas fa-plus-circle"></i> Add New Server</a>
<x-button-crm variant="secondary" size="sm" url="{{ route('module.hosting.create') }}" icon="plus-circle">Add
New Server</x-button-crm>
<form action="{{ route('module.hosting.import') }}" class="d-lg-inline" enctype="multipart/form-data" method="post">
@csrf
<input type="file" name="file" class="d-none file-selector" accept=".csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" onchange="form.submit()" />
<button type="button" class="btn btn-outline-secondary btn-import__from">
<i class="fas fa-plus-circle"></i> Import From Excel
</button>
<input type="file" name="file" class="d-none file-selector"
accept=".csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" onchange="form.submit()" />
<x-button-crm variant="primary" size="sm" url="{{ route('module.hosting.import') }}" icon="plus-circle">Import From
Excel</x-button-crm>
</form>
<a href="{{ url('file/Hosting.xlsx') }}" class="btn btn-outline-secondary"><i class="fas fa-download"></i> File Import Demo</a>
<x-button-crm variant="secondary" size="sm" url="file/Hosting.xlsx" icon="download">File Import Demo</x-button-crm>
@@ -0,0 +1,2 @@
<x-button-crm type="button" variant="primary" size="sm" route="module.hosting.edit" :params="['id' => $row->id]" icon="pencil">Edit</x-button-crm>
<x-button-crm type="button" variant="danger" size="sm" route="module.hosting.destroy" :params="['id' => $row->id]" icon="trash">Delete</x-button-crm>
@@ -1,5 +1,20 @@
@php use App\Http\Helpers\Helper; @endphp
@extends('administrator.layout.master')
@push('plugin-styles')
@foreach (config('assets.datatable.css') as $datatable)
<link href="{{ asset($datatable) }}" rel="stylesheet" />
@endforeach
@endpush
@section('breadcrumb')
@php
$breadcrumbItems = [
['label' => 'Modules'],
['label' => 'Package vCenter'],
['label' => 'Datacenter', 'active' => true],
];
@endphp
<x-admin-breadcrumb :items="$breadcrumbItems" />
@endsection
@section('content')
@if (auth()->guard('admins')->user()->can('manager module hosting'))
<div class="card card-primary card-outline">
@@ -7,70 +22,10 @@
@include('administrator.pages.block.ModuleHosting')
</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>IP Host</th>
<th>Domain Created</th>
<th>Status</th>
<th>Last Updated</th>
<th style="width:40px"></th>
<th style="width: 40px"></th>
</tr>
</thead>
<tbody>
@if (count($modules) > 0)
@foreach ($modules 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">
{{ $item->counter }}
</td>
<td class="text-center">
{!! $item->getStatus() !!}
</td>
<td class="text-center">
@time($item->updated_at)
</td>
<td>
<a class="btn btn-warning btn-sm"
href="{{ route('module.hosting.edit', ['id' => $item->id]) }}">
<i class="fas fa-user-edit"></i>
</a>
</td>
<td>
@if (auth()->guard('admins')->user()->can('delete module hosting'))
<form method="post" class="d-inline"
action="{{ route('module.hosting.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>
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="card-footer">
{!! $modules->withQueryString()->links() !!}
<x-datatable id="hostingTable" ajax="{{ route('module.hosting.datatable') }}" :columns="[
['key' => 'name', 'label' => 'Name'],
['key' => 'action', 'label' => 'Action'],
]" />
</div>
</div>
@else
@@ -80,3 +35,9 @@
</div>
@endif
@endsection
@push('plugin-scripts')
@foreach (config('assets.datatable.js') as $datatable)
<script src="{{ asset($datatable) }}"></script>
@endforeach
@endpush