update
This commit is contained in:
@@ -4,12 +4,14 @@ namespace App\Http\Controllers\admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\Module\IPPool\IPPoolRepositoryInterface;
|
||||
use App\Repositories\Module\Network\NetworkRepository;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ModuleIPPoolController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
public IPPoolRepositoryInterface $ipPoolRepository
|
||||
public IPPoolRepositoryInterface $ipPoolRepository,
|
||||
public NetworkRepository $moduleNetworkRepository
|
||||
) {
|
||||
}
|
||||
public function index(Request $request)
|
||||
@@ -26,7 +28,12 @@ class ModuleIPPoolController extends Controller
|
||||
public function create()
|
||||
{
|
||||
$title = 'Add new server ip pool';
|
||||
return view('admin.module.ippool.add', compact('title'));
|
||||
$moduleNetworks = $this->moduleNetworkRepository->filter(
|
||||
[
|
||||
'page' => 1
|
||||
]
|
||||
);
|
||||
return view('admin.module.ippool.add', compact('title', 'moduleNetworks'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
@@ -48,8 +55,13 @@ class ModuleIPPoolController extends Controller
|
||||
public function edit(int $id = 0)
|
||||
{
|
||||
$module = $this->ipPoolRepository->find($id);
|
||||
$moduleNetworks = $this->moduleNetworkRepository->filter(
|
||||
[
|
||||
'page' => 1
|
||||
]
|
||||
);
|
||||
$title = 'Edit server ip pool';
|
||||
return view('admin.module.ippool.edit', compact('module', 'title'));
|
||||
return view('admin.module.ippool.edit', ['module' => $module, 'title' => $title, 'moduleNetworks' => $moduleNetworks]);
|
||||
}
|
||||
|
||||
public function update(Request $request, int $id = 0)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('module_ip_address', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('module_host_id')->nullable()->default(null)->change();
|
||||
$table->unsignedBigInteger('module_network_id')->nullable()->default(null)->change();
|
||||
|
||||
$table->foreign('module_host_id')->references('id')->on('module_host')->onDelete('set null');
|
||||
$table->foreign('module_network_id')->references('id')->on('module_network')->onDelete('set null');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('module_ip_address', function (Blueprint $table) {
|
||||
$table->dropForeign(['module_host_id']);
|
||||
$table->dropForeign(['module_network_id']);
|
||||
|
||||
$table->bigInteger('module_host_id')->default(0)->nullable(false)->change();
|
||||
$table->bigInteger('module_network_id')->default(0)->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
+12
-20
@@ -1,5 +1,5 @@
|
||||
@import url(https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lexend:wght@100..900&display=swap);
|
||||
/*! tailwindcss v4.1.4 | MIT License | https://tailwindcss.com */
|
||||
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
|
||||
@layer properties;
|
||||
@layer theme, base, components, utilities;
|
||||
@layer theme {
|
||||
@@ -435,6 +435,9 @@
|
||||
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
|
||||
padding-block: 0;
|
||||
}
|
||||
::-webkit-calendar-picker-indicator {
|
||||
line-height: 1;
|
||||
}
|
||||
:-moz-ui-invalid {
|
||||
box-shadow: none;
|
||||
}
|
||||
@@ -476,7 +479,7 @@
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
clip-path: inset(50%);
|
||||
white-space: nowrap;
|
||||
border-width: 0;
|
||||
}
|
||||
@@ -1720,19 +1723,19 @@
|
||||
border-collapse: separate;
|
||||
}
|
||||
.origin-bottom-left {
|
||||
transform-origin: bottom left;
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
.origin-bottom-right {
|
||||
transform-origin: bottom right;
|
||||
transform-origin: 100% 100%;
|
||||
}
|
||||
.origin-left {
|
||||
transform-origin: left;
|
||||
transform-origin: 0;
|
||||
}
|
||||
.origin-top-left {
|
||||
transform-origin: top left;
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
.origin-top-right {
|
||||
transform-origin: top right;
|
||||
transform-origin: 100% 0;
|
||||
}
|
||||
.-translate-x-1\/2 {
|
||||
--tw-translate-x: calc(calc(1/2 * 100%) * -1);
|
||||
@@ -4807,51 +4810,43 @@
|
||||
}
|
||||
.backdrop-blur-2xl {
|
||||
--tw-backdrop-blur: blur(var(--blur-2xl));
|
||||
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
}
|
||||
.backdrop-blur-3xl {
|
||||
--tw-backdrop-blur: blur(var(--blur-3xl));
|
||||
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
}
|
||||
.backdrop-blur-lg {
|
||||
--tw-backdrop-blur: blur(var(--blur-lg));
|
||||
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
}
|
||||
.backdrop-blur-md {
|
||||
--tw-backdrop-blur: blur(var(--blur-md));
|
||||
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
}
|
||||
.backdrop-blur-none {
|
||||
--tw-backdrop-blur: ;
|
||||
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
}
|
||||
.backdrop-blur-sm {
|
||||
--tw-backdrop-blur: blur(var(--blur-sm));
|
||||
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
}
|
||||
.backdrop-blur-xl {
|
||||
--tw-backdrop-blur: blur(var(--blur-xl));
|
||||
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
}
|
||||
.backdrop-blur-xs {
|
||||
--tw-backdrop-blur: blur(var(--blur-xs));
|
||||
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
||||
}
|
||||
.transition {
|
||||
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter;
|
||||
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
|
||||
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
||||
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
||||
}
|
||||
.transition\! {
|
||||
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter !important;
|
||||
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter, display, content-visibility, overlay, pointer-events !important;
|
||||
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)) !important;
|
||||
transition-duration: var(--tw-duration, var(--default-transition-duration)) !important;
|
||||
}
|
||||
@@ -5924,14 +5919,12 @@
|
||||
}
|
||||
.before\:content-\[\'\'\] {
|
||||
&::before {
|
||||
content: var(--tw-content);
|
||||
--tw-content: '';
|
||||
content: var(--tw-content);
|
||||
}
|
||||
}
|
||||
.before\:content-\[\\\'\\\'\] {
|
||||
&::before {
|
||||
content: var(--tw-content);
|
||||
--tw-content: \'\';
|
||||
content: var(--tw-content);
|
||||
}
|
||||
@@ -6089,7 +6082,6 @@
|
||||
}
|
||||
.after\:content-\[\'\'\] {
|
||||
&::after {
|
||||
content: var(--tw-content);
|
||||
--tw-content: '';
|
||||
content: var(--tw-content);
|
||||
}
|
||||
|
||||
+46
-40
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
@@ -5,5 +5,8 @@
|
||||
"/js/core.min.js": "/js/core.min.js",
|
||||
"/js/main.min.js": "/js/main.min.js",
|
||||
"/js/service/vminfo.min.js": "/js/service/vminfo.min.js",
|
||||
"/css/app.css": "/css/app.css"
|
||||
"/css/app.css": "/css/app.css",
|
||||
"/fonts/AvertaPE-Regular.woff2?d2975139654f9cae8bac2e858686ffa8": "/fonts/AvertaPE-Regular.woff2?d2975139654f9cae8bac2e858686ffa8",
|
||||
"/fonts/AvertaPE-Bold.woff2?0c3fa07354777de57ba64f1838b591dc": "/fonts/AvertaPE-Bold.woff2?0c3fa07354777de57ba64f1838b591dc",
|
||||
"/fonts/AvertaPE-Extrabold.woff2?45d04f8ca8d830e0dd8e1c11b97e3bd4": "/fonts/AvertaPE-Extrabold.woff2?45d04f8ca8d830e0dd8e1c11b97e3bd4"
|
||||
}
|
||||
|
||||
@@ -107,10 +107,6 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr>
|
||||
<td width="30%" class="text-muted">VM ID:</td>
|
||||
<td><code>{{ $product->vmware_id ?? 'N/A' }}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted">Tên VM:</td>
|
||||
<td>{{ $product->name ?? 'Chưa đặt tên' }}</td>
|
||||
@@ -162,11 +158,13 @@
|
||||
<tr>
|
||||
<td class="text-muted">vCenter:</td>
|
||||
<td>
|
||||
@if (isset($product->ipaddress) &&
|
||||
@if (
|
||||
isset($product->ipaddress) &&
|
||||
isset($product->ipaddress->host) &&
|
||||
isset($product->ipaddress->host->datacenter) &&
|
||||
isset($product->ipaddress->host->datacenter->vCenter))
|
||||
{{ $product->ipaddress->host->datacenter->vCenter->host ?? 'N/A' }}
|
||||
isset($product->ipaddress->host->datacenter->vCenter)
|
||||
)
|
||||
{{ $product->ipaddress->host->datacenter->vCenter->host ?? 'N/A' }}
|
||||
@else
|
||||
N/A
|
||||
@endif
|
||||
@@ -274,9 +272,6 @@
|
||||
<span class="badge badge-secondary ml-1">Hết hạn</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<small class="text-muted">VM ID:</small> <code>{{ $product->vmware_id ?? 'N/A' }}</code>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-1">
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -19,8 +19,12 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3" for="module_network_id">Module Network</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" id="module_network_id" name="module_network_id" placeholder="1"
|
||||
value="{{ old('module_network_id') }}" class="form-control">
|
||||
<select name="module_network_id" id="module_network_id" class="form-control">
|
||||
<option value="">Select Module Network</option>
|
||||
@foreach ($moduleNetworks as $moduleNetwork)
|
||||
<option value="{{ $moduleNetwork->id }}">{{ $moduleNetwork->name . ' - ' . $moduleNetwork->network }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,248 +21,242 @@
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="bg-gray-50 rounded-lg py-12">
|
||||
<div class="container mx-auto px-4 max-w-4xl">
|
||||
<!-- Card chính -->
|
||||
<div class="bg-white rounded-lg shadow-lg overflow-hidden mb-8">
|
||||
<!-- Header -->
|
||||
<div class="bg-primary p-6">
|
||||
<div class="flex justify-between items-center">
|
||||
<h1 class="text-white text-2xl font-bold">Thông tin đơn hàng</h1>
|
||||
<span class="bg-white text-primary px-4 py-2 rounded-full text-sm font-medium">
|
||||
Mã đơn: #{{ $invoice->order_num ?? 'N/A'}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Thông tin đơn hàng -->
|
||||
<div class="p-6 border-b border-gray-200">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Thông tin đơn hàng</h2>
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Ngày đặt:</span>
|
||||
<span class="font-medium">
|
||||
@if ($invoice->date)
|
||||
{{ date('d/m/Y H:i', strtotime($invoice->date)) }}
|
||||
@else
|
||||
N/A
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Trạng thái:</span>
|
||||
<span class="font-medium">
|
||||
@if ($invoice->status == 1)
|
||||
<span class="bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full text-xs">Chờ
|
||||
thanh toán</span>
|
||||
@elseif($invoice->status == 2)
|
||||
<span class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs">Đã
|
||||
thanh toán</span>
|
||||
@else
|
||||
<span
|
||||
class="bg-gray-100 text-gray-800 px-2 py-1 rounded-full text-xs">Khác</span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Tên miền (Domain):</span>
|
||||
<span class="font-medium">{{ $invoice->invoiceItem->first()->server_name ?? '' }}
|
||||
</span>
|
||||
</div>
|
||||
@if ($invoice->vm_id)
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">VM ID:</span>
|
||||
<span class="font-medium text-green-600">{{ $invoice->vm_id }}</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="bg-gray-50 rounded-lg py-12">
|
||||
<div class="container mx-auto px-4 max-w-4xl">
|
||||
<!-- Card chính -->
|
||||
<div class="bg-white rounded-lg shadow-lg overflow-hidden mb-8">
|
||||
<!-- Header -->
|
||||
<div class="bg-primary p-6">
|
||||
<div class="flex justify-between items-center">
|
||||
<h1 class="text-white text-2xl font-bold">Thông tin đơn hàng</h1>
|
||||
<span class="bg-white text-primary px-4 py-2 rounded-full text-sm font-medium">
|
||||
Mã đơn: #{{ $invoice->order_num ?? 'N/A'}}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Thông tin khách hàng</h2>
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Họ tên:</span>
|
||||
<span
|
||||
class="font-medium">{{ $invoice->customer->firstname . ' ' . $invoice->customer->lastname }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Thông tin đơn hàng -->
|
||||
<div class="p-6 border-b border-gray-200">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Thông tin đơn hàng</h2>
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Ngày đặt:</span>
|
||||
<span class="font-medium">
|
||||
@if ($invoice->date)
|
||||
{{ date('d/m/Y H:i', strtotime($invoice->date)) }}
|
||||
@else
|
||||
N/A
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Trạng thái:</span>
|
||||
<span class="font-medium">
|
||||
@if ($invoice->status == 1)
|
||||
<span class="bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full text-xs">Chờ
|
||||
thanh toán</span>
|
||||
@elseif($invoice->status == 2)
|
||||
<span class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs">Đã
|
||||
thanh toán</span>
|
||||
@else
|
||||
<span
|
||||
class="bg-gray-100 text-gray-800 px-2 py-1 rounded-full text-xs">Khác</span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Tên miền (Domain):</span>
|
||||
<span class="font-medium">{{ $invoice->invoiceItem->first()->server_name ?? '' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Số điện thoại:</span>
|
||||
<span class="font-medium">{{ $invoice->customer->phone }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Email:</span>
|
||||
<span class="font-medium">{{ $invoice->customer->email }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Thông tin khách hàng</h2>
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Họ tên:</span>
|
||||
<span
|
||||
class="font-medium">{{ $invoice->customer->firstname . ' ' . $invoice->customer->lastname }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Số điện thoại:</span>
|
||||
<span class="font-medium">{{ $invoice->customer->phone }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Email:</span>
|
||||
<span class="font-medium">{{ $invoice->customer->email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Chi tiết sản phẩm -->
|
||||
<div class="p-6">
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Chi tiết sản phẩm</h2>
|
||||
<!-- Chi tiết sản phẩm -->
|
||||
<div class="p-6">
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Chi tiết sản phẩm</h2>
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left">
|
||||
<thead>
|
||||
<tr class="bg-gray-50">
|
||||
<th class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider">
|
||||
Mô tả
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider text-right">
|
||||
Số lượng
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider text-right">
|
||||
Giá
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@foreach ($invoice->invoiceItem as $item)
|
||||
<tr class="bg-white">
|
||||
<td class="px-4 py-3">
|
||||
<div class="font-medium text-gray-800">Sản phẩm
|
||||
{{ $item->product->name ?? 'Không xác định' }}
|
||||
</div>
|
||||
<div class="text-sm text-gray-500">
|
||||
Loại:
|
||||
@if ($item->product_type == 1)
|
||||
Shared Hosting
|
||||
@elseif($item->product_type == 4)
|
||||
VPS
|
||||
@elseif($item->product_type == 3)
|
||||
Dedicated Server
|
||||
@else
|
||||
Khác
|
||||
@endif
|
||||
</div>
|
||||
<div class="text-sm text-gray-500 flex flex-row items-center">
|
||||
Hệ điều hành:
|
||||
<div class="ml-2 flex items-center gap-2">
|
||||
<div class="avatar">
|
||||
<div class="size-6 rounded-md">
|
||||
<img src="{{ $item->os->osGroup->thumbnail }}"
|
||||
alt="{{ $item->os->osGroup->name }}" />
|
||||
</div>
|
||||
</div>{{ $item->os->osGroup->name }}
|
||||
{{ $item->os->version }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
{{ $item->quantity }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<p>
|
||||
{{ format_price($item->price) }}
|
||||
/{{ $item->months }}tháng
|
||||
</p>
|
||||
</td>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left">
|
||||
<thead>
|
||||
<tr class="bg-gray-50">
|
||||
<th class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider">
|
||||
Mô tả
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider text-right">
|
||||
Số lượng
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider text-right">
|
||||
Giá
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<!-- Addon items -->
|
||||
@foreach ($item->addons as $addon)
|
||||
<tr class="bg-gray-50">
|
||||
<td class="px-4 py-2 pl-8">
|
||||
<div class="text-sm text-gray-600">
|
||||
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-0.5 rounded">
|
||||
Addon
|
||||
</span>
|
||||
<span class="ml-2">{{ $addon->addonItems->name }} đơn giá:
|
||||
({{ format_price($addon->addonItems->price) }})
|
||||
/ {{ $addon->addonItems->step . $addon->addonItems->prefix }}
|
||||
</span>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@foreach ($invoice->invoiceItem as $item)
|
||||
<tr class="bg-white">
|
||||
<td class="px-4 py-3">
|
||||
<div class="font-medium text-gray-800">Sản phẩm
|
||||
{{ $item->product->name ?? 'Không xác định' }}
|
||||
</div>
|
||||
<div class="text-sm text-gray-500">
|
||||
Loại:
|
||||
@if ($item->product_type == 1)
|
||||
Shared Hosting
|
||||
@elseif($item->product_type == 4)
|
||||
VPS
|
||||
@elseif($item->product_type == 3)
|
||||
Dedicated Server
|
||||
@else
|
||||
Khác
|
||||
@endif
|
||||
</div>
|
||||
<div class="text-sm text-gray-500 flex flex-row items-center">
|
||||
Hệ điều hành:
|
||||
<div class="ml-2 flex items-center gap-2">
|
||||
<div class="avatar">
|
||||
<div class="size-6 rounded-md">
|
||||
<img src="{{ $item->os->osGroup->thumbnail }}"
|
||||
alt="{{ $item->os->osGroup->name }}" />
|
||||
</div>
|
||||
</div>{{ $item->os->osGroup->name }}
|
||||
{{ $item->os->version }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-2 text-right text-sm text-gray-600">
|
||||
{{ $addon->qty }} / {{ $addon->addonItems->prefix }}
|
||||
({{ $item->months }} tháng)
|
||||
<td class="px-4 py-3 text-right">
|
||||
{{ $item->quantity }}
|
||||
</td>
|
||||
<td class="px-4 py-2 text-right text-sm text-gray-600">
|
||||
{{ number_format($addon->price * $item->months) }} VNĐ
|
||||
<td class="px-4 py-3 text-right">
|
||||
<p>
|
||||
{{ format_price($item->price) }}
|
||||
/{{ $item->months }}tháng
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Addon items -->
|
||||
@foreach ($item->addons as $addon)
|
||||
<tr class="bg-gray-50">
|
||||
<td class="px-4 py-2 pl-8">
|
||||
<div class="text-sm text-gray-600">
|
||||
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-0.5 rounded">
|
||||
Addon
|
||||
</span>
|
||||
<span class="ml-2">{{ $addon->addonItems->name }} đơn giá:
|
||||
({{ format_price($addon->addonItems->price) }})
|
||||
/ {{ $addon->addonItems->step . $addon->addonItems->prefix }}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-2 text-right text-sm text-gray-600">
|
||||
{{ $addon->qty }} / {{ $addon->addonItems->prefix }}
|
||||
({{ $item->months }} tháng)
|
||||
</td>
|
||||
<td class="px-4 py-2 text-right text-sm text-gray-600">
|
||||
{{ number_format($addon->price * $item->months) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
@php
|
||||
$addonTotal = 0;
|
||||
foreach ($invoice->invoiceItem as $item) {
|
||||
foreach ($item->addons as $addon) {
|
||||
$addonTotal += $addon->price * $item->months;
|
||||
}
|
||||
}
|
||||
$productTotal = $invoice->total - $addonTotal;
|
||||
@endphp
|
||||
<tr class="border-t-2 border-gray-200">
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Giá trị sản phẩm</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
{{ number_format($productTotal) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Tổng addon</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
{{ number_format($addonTotal) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@if ($invoice->discount_value)
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Giảm giá</td>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
@php
|
||||
$addonTotal = 0;
|
||||
foreach ($invoice->invoiceItem as $item) {
|
||||
foreach ($item->addons as $addon) {
|
||||
$addonTotal += $addon->price * $item->months;
|
||||
}
|
||||
}
|
||||
$productTotal = $invoice->total - $addonTotal;
|
||||
@endphp
|
||||
<tr class="border-t-2 border-gray-200">
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Giá trị sản phẩm</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
-{{ number_format($invoice->discount_value) }} VNĐ
|
||||
{{ number_format($productTotal) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-lg font-bold text-gray-800">Tổng cộng</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-lg font-bold text-gray-800">
|
||||
{{ number_format($invoice->total) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Tổng addon</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
{{ number_format($addonTotal) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@if ($invoice->discount_value)
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Giảm giá</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
-{{ number_format($invoice->discount_value) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-lg font-bold text-gray-800">Tổng cộng</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-lg font-bold text-gray-800">
|
||||
{{ number_format($invoice->total) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Ghi chú -->
|
||||
@if ($invoice->note)
|
||||
<div class="bg-white rounded-lg shadow-lg p-6 mt-8">
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-2">Ghi chú đơn hàng</h2>
|
||||
<p class="text-gray-600">{{ $invoice->note }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Hỗ trợ -->
|
||||
<div class="bg-blue-50 rounded-lg p-6 mt-8 border border-blue-100">
|
||||
<div class="flex items-start">
|
||||
<div class="flex-shrink-0 w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mr-4">
|
||||
<svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
<!-- Ghi chú -->
|
||||
@if ($invoice->note)
|
||||
<div class="bg-white rounded-lg shadow-lg p-6 mt-8">
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-2">Ghi chú đơn hàng</h2>
|
||||
<p class="text-gray-600">{{ $invoice->note }}</p>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-medium text-blue-800">Bạn cần hỗ trợ?</h3>
|
||||
<p class="text-blue-600 mt-1">Nếu bạn gặp bất kỳ vấn đề nào khi thanh toán, vui lòng liên hệ với
|
||||
chúng tôi thông qua. </br> Hotline <span
|
||||
class="font-medium">{{ setting('setting.tel') }}</span> hoặc
|
||||
thông qua Email <span class="font-medium">{{ setting('setting.support') }}</span></p>
|
||||
@endif
|
||||
|
||||
<!-- Hỗ trợ -->
|
||||
<div class="bg-blue-50 rounded-lg p-6 mt-8 border border-blue-100">
|
||||
<div class="flex items-start">
|
||||
<div class="flex-shrink-0 w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mr-4">
|
||||
<svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-medium text-blue-800">Bạn cần hỗ trợ?</h3>
|
||||
<p class="text-blue-600 mt-1">Nếu bạn gặp bất kỳ vấn đề nào khi thanh toán, vui lòng liên hệ với
|
||||
chúng tôi thông qua. </br> Hotline <span
|
||||
class="font-medium">{{ setting('setting.tel') }}</span> hoặc
|
||||
thông qua Email <span class="font-medium">{{ setting('setting.support') }}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@@ -1,255 +1,252 @@
|
||||
@extends('frontend.layouts.master')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-50 rounded-lg py-12">
|
||||
<div class="container mx-auto px-4 max-w-4xl">
|
||||
<!-- Card chính -->
|
||||
<div class="bg-white rounded-lg shadow-lg overflow-hidden mb-8">
|
||||
<!-- Header -->
|
||||
<div class="bg-primary p-6">
|
||||
<div class="flex justify-between items-center">
|
||||
<h1 class="text-white text-2xl font-bold">Thanh toán đơn hàng</h1>
|
||||
<span class="bg-white text-primary px-4 py-2 rounded-full text-sm font-medium">
|
||||
Mã đơn: #{{ $orders->order_num }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Thông tin đơn hàng -->
|
||||
<div class="p-6 border-b border-gray-200">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Thông tin đơn hàng</h2>
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Ngày đặt:</span>
|
||||
<span class="font-medium">{{ date('d/m/Y H:i', $orders->date) }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Trạng thái:</span>
|
||||
<span class="font-medium">
|
||||
@if ($orders->status == 0)
|
||||
<span class="bg-red-100 text-red-800 px-2 py-1 rounded-full text-xs">Chờ xử lý</span>
|
||||
@elseif($orders->status == 1)
|
||||
<span class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs">Đã kích hoạt</span>
|
||||
@elseif($orders->status == 2)
|
||||
<span class="bg-gray-100 text-gray-800 px-2 py-1 rounded-full text-xs">Đã hủy</span>
|
||||
@elseif($orders->status == 3)
|
||||
<span class="bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full text-xs">Đang xử lý</span>
|
||||
@else
|
||||
<span class="bg-gray-100 text-gray-800 px-2 py-1 rounded-full text-xs">Khác</span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Tên miền (Domain):</span>
|
||||
<span class="font-medium">{{ $orders->orderItems[0]->server_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Thông tin khách hàng</h2>
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Họ tên:</span>
|
||||
<span
|
||||
class="font-medium">{{ $orders->customer->firstname . ' ' . $orders->customer->lastname }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Số điện thoại:</span>
|
||||
<span class="font-medium">{{ $orders->customer->phone }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Email:</span>
|
||||
<span class="font-medium">{{ $orders->customer->email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-50 rounded-lg py-12">
|
||||
<div class="container mx-auto px-4 max-w-4xl">
|
||||
<!-- Card chính -->
|
||||
<div class="bg-white rounded-lg shadow-lg overflow-hidden mb-8">
|
||||
<!-- Header -->
|
||||
<div class="bg-primary p-6">
|
||||
<div class="flex justify-between items-center">
|
||||
<h1 class="text-white text-2xl font-bold">Thanh toán đơn hàng</h1>
|
||||
<span class="bg-white text-primary px-4 py-2 rounded-full text-sm font-medium">
|
||||
Mã đơn: #{{ $orders->order_num }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Chi tiết sản phẩm -->
|
||||
<div class="p-6">
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Chi tiết sản phẩm</h2>
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left">
|
||||
<thead>
|
||||
<tr class="bg-gray-50">
|
||||
<th class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider">
|
||||
Mô tả
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider text-right">
|
||||
Số lượng
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider text-right">
|
||||
Giá
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@foreach ($orders->orderItems as $item)
|
||||
<tr class="bg-white">
|
||||
<td class="px-4 py-3">
|
||||
<div class="font-medium text-gray-800">Sản phẩm
|
||||
{{ $item->product->name ?? 'Không xác định' }}
|
||||
</div>
|
||||
<div class="text-sm text-gray-500">
|
||||
Loại:
|
||||
@if ($item->product_type == 1)
|
||||
Shared Hosting
|
||||
@elseif($item->product_type == 2)
|
||||
VPS
|
||||
@elseif($item->product_type == 3)
|
||||
Dedicated Server
|
||||
<!-- Thông tin đơn hàng -->
|
||||
<div class="p-6 border-b border-gray-200">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Thông tin đơn hàng</h2>
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Ngày đặt:</span>
|
||||
<span class="font-medium">{{ date('d/m/Y H:i', $orders->date) }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Trạng thái:</span>
|
||||
<span class="font-medium">
|
||||
@if ($orders->status == 0)
|
||||
<span class="bg-red-100 text-red-800 px-2 py-1 rounded-full text-xs">Chờ xử
|
||||
lý</span>
|
||||
@elseif($orders->status == 1)
|
||||
<span class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs">Đã kích
|
||||
hoạt</span>
|
||||
@elseif($orders->status == 2)
|
||||
<span class="bg-gray-100 text-gray-800 px-2 py-1 rounded-full text-xs">Đã hủy</span>
|
||||
@elseif($orders->status == 3)
|
||||
<span class="bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full text-xs">Đang xử
|
||||
lý</span>
|
||||
@else
|
||||
Khác
|
||||
<span class="bg-gray-100 text-gray-800 px-2 py-1 rounded-full text-xs">Khác</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="text-sm text-gray-500 flex flex-row items-center">
|
||||
Hệ điều hành:
|
||||
<div class="ml-2 flex items-center gap-2">
|
||||
<div class="avatar">
|
||||
<div class="size-6 rounded-md">
|
||||
<img src="{{ $item->os->osGroup->thumbnail }}"
|
||||
alt="{{ $item->os->osGroup->name }}" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Tên miền (Domain):</span>
|
||||
<span class="font-medium">{{ $orders->orderItems[0]->server_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Thông tin khách hàng</h2>
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Họ tên:</span>
|
||||
<span class="font-medium">{{ $orders->customer->firstname . ' ' . $orders->customer->lastname }}</span>
|
||||
</div>
|
||||
</div>{{ $item->os->osGroup->name }}
|
||||
{{ $item->os->version }}
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Số điện thoại:</span>
|
||||
<span class="font-medium">{{ $orders->customer->phone }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">Email:</span>
|
||||
<span class="font-medium">{{ $orders->customer->email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
{{ $item->quantity }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<p>
|
||||
{{ format_price($item->price) }}
|
||||
/{{ $item->months }}tháng
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Addon items -->
|
||||
@foreach ($item->addons as $addon)
|
||||
<tr class="bg-gray-50">
|
||||
<td class="px-4 py-2 pl-8">
|
||||
<div class="text-sm text-gray-600">
|
||||
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-0.5 rounded">
|
||||
Addon
|
||||
</span>
|
||||
<span class="ml-2">{{ $addon->addonItems->name }} đơn giá:
|
||||
({{ format_price($addon->addonItems->price) }})
|
||||
/ {{ $addon->addonItems->step . $addon->addonItems->prefix }}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-2 text-right text-sm text-gray-600">
|
||||
{{ $addon->qty }} / {{ $addon->addonItems->prefix }}
|
||||
({{ $item->months }} tháng)
|
||||
</td>
|
||||
<td class="px-4 py-2 text-right text-sm text-gray-600">
|
||||
{{ number_format($addon->price * $item->months) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
@php
|
||||
$addonTotal = 0;
|
||||
foreach ($orders->orderItems as $item) {
|
||||
foreach ($item->addons as $addon) {
|
||||
$addonTotal += $addon->price * $item->months;
|
||||
}
|
||||
}
|
||||
$productTotal = $orders->amount - $addonTotal;
|
||||
@endphp
|
||||
<tr class="border-t-2 border-gray-200">
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Giá trị sản phẩm</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
{{ number_format($productTotal) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Tổng addon</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
{{ number_format($addonTotal) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@if ($orders->discount_value)
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Giảm giá</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
-{{ number_format($orders->discount_value) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-lg font-bold text-gray-800">Tổng cộng</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-lg font-bold text-gray-800">
|
||||
{{ number_format($orders->amount) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@if ($orders->status == 1)
|
||||
<div class="flex flex-row justify-between pt-3 border-t border-gray-200">
|
||||
<flux:modal.trigger name="destroy-order">
|
||||
<flux:button type="button" variant="danger" icon="trash">Huỷ đơn hàng</flux:button>
|
||||
</flux:modal.trigger>
|
||||
|
||||
<flux:modal.trigger name="confirm-order">
|
||||
<flux:button type="button" variant="primary" color="orange" icon="credit-card">Xác nhận thanh toán</flux:button>
|
||||
</flux:modal.trigger>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Chi tiết sản phẩm -->
|
||||
<div class="p-6">
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-4">Chi tiết sản phẩm</h2>
|
||||
|
||||
<!-- Ghi chú -->
|
||||
@if ($orders->note)
|
||||
<div class="bg-white rounded-lg shadow-lg p-6 mt-8">
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-2">Ghi chú đơn hàng</h2>
|
||||
<p class="text-gray-600">{{ $orders->note }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left">
|
||||
<thead>
|
||||
<tr class="bg-gray-50">
|
||||
<th class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider">
|
||||
Mô tả
|
||||
</th>
|
||||
<th class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider text-right">
|
||||
Số lượng
|
||||
</th>
|
||||
<th class="px-4 py-3 text-sm font-medium text-gray-500 uppercase tracking-wider text-right">
|
||||
Giá
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@foreach ($orders->orderItems as $item)
|
||||
<tr class="bg-white">
|
||||
<td class="px-4 py-3">
|
||||
<div class="font-medium text-gray-800">Sản phẩm
|
||||
{{ $item->product->name ?? 'Không xác định' }}
|
||||
</div>
|
||||
<div class="text-sm text-gray-500">
|
||||
Loại:
|
||||
@if ($item->product_type == 1)
|
||||
Shared Hosting
|
||||
@elseif($item->product_type == 2)
|
||||
VPS
|
||||
@elseif($item->product_type == 3)
|
||||
Dedicated Server
|
||||
@else
|
||||
Khác
|
||||
@endif
|
||||
</div>
|
||||
<div class="text-sm text-gray-500 flex flex-row items-center">
|
||||
Hệ điều hành:
|
||||
<div class="ml-2 flex items-center gap-2">
|
||||
<div class="avatar">
|
||||
<div class="size-6 rounded-md">
|
||||
<img src="{{ $item->os->osGroup->thumbnail }}"
|
||||
alt="{{ $item->os->osGroup->name }}" />
|
||||
</div>
|
||||
</div>{{ $item->os->osGroup->name }}
|
||||
{{ $item->os->version }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
{{ $item->quantity }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<p>
|
||||
{{ format_price($item->price) }}
|
||||
/{{ $item->months }}tháng
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Hỗ trợ -->
|
||||
<div class="bg-blue-50 rounded-lg p-6 mt-8 border border-blue-100">
|
||||
<div class="flex items-start">
|
||||
<div class="flex-shrink-0 w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mr-4">
|
||||
<svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-medium text-blue-800">Bạn cần hỗ trợ?</h3>
|
||||
<p class="text-blue-600 mt-1">Nếu bạn gặp bất kỳ vấn đề nào khi thanh toán, vui lòng liên hệ với
|
||||
chúng tôi thông qua. </br> Hotline <span
|
||||
class="font-medium">{{ setting('setting.tel') }}</span> hoặc
|
||||
thông qua Email <span class="font-medium">{{ setting('setting.support') }}</span></p>
|
||||
<!-- Addon items -->
|
||||
@foreach ($item->addons as $addon)
|
||||
<tr class="bg-gray-50">
|
||||
<td class="px-4 py-2 pl-8">
|
||||
<div class="text-sm text-gray-600">
|
||||
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-0.5 rounded">
|
||||
Addon
|
||||
</span>
|
||||
<span class="ml-2">{{ $addon->addonItems->name }} đơn giá:
|
||||
({{ format_price($addon->addonItems->price) }})
|
||||
/ {{ $addon->addonItems->step . $addon->addonItems->prefix }}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-2 text-right text-sm text-gray-600">
|
||||
{{ $addon->qty }} / {{ $addon->addonItems->prefix }}
|
||||
({{ $item->months }} tháng)
|
||||
</td>
|
||||
<td class="px-4 py-2 text-right text-sm text-gray-600">
|
||||
{{ number_format($addon->price * $item->months) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
@php
|
||||
$addonTotal = 0;
|
||||
foreach ($orders->orderItems as $item) {
|
||||
foreach ($item->addons as $addon) {
|
||||
$addonTotal += $addon->price * $item->months;
|
||||
}
|
||||
}
|
||||
$productTotal = $orders->amount - $addonTotal;
|
||||
@endphp
|
||||
<tr class="border-t-2 border-gray-200">
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Giá trị sản phẩm</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
{{ number_format($productTotal) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Tổng addon</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
{{ number_format($addonTotal) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@if ($orders->discount_value)
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-gray-500 font-medium">Giảm giá</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-gray-500 font-medium">
|
||||
-{{ number_format($orders->discount_value) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-lg font-bold text-gray-800">Tổng cộng</td>
|
||||
<td></td>
|
||||
<td class="px-4 py-3 text-right text-lg font-bold text-gray-800">
|
||||
{{ number_format($orders->amount) }} VNĐ
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@if ($orders->status == 1)
|
||||
<div class="flex flex-row justify-end pt-3 border-t border-gray-200">
|
||||
<flux:modal.trigger name="confirm-order" class="flex-end">
|
||||
<flux:button type="button" variant="primary" color="orange" icon="credit-card">Xác nhận
|
||||
thanh toán</flux:button>
|
||||
</flux:modal.trigger>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Ghi chú -->
|
||||
@if ($orders->note)
|
||||
<div class="bg-white rounded-lg shadow-lg p-6 mt-8">
|
||||
<h2 class="text-gray-700 text-lg font-semibold mb-2">Ghi chú đơn hàng</h2>
|
||||
<p class="text-gray-600">{{ $orders->note }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Hỗ trợ -->
|
||||
<div class="bg-blue-50 rounded-lg p-6 mt-8 border border-blue-100">
|
||||
<div class="flex items-start">
|
||||
<div class="flex-shrink-0 w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mr-4">
|
||||
<svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-medium text-blue-800">Bạn cần hỗ trợ?</h3>
|
||||
<p class="text-blue-600 mt-1">Nếu bạn gặp bất kỳ vấn đề nào khi thanh toán, vui lòng liên hệ với
|
||||
chúng tôi thông qua. </br> Hotline <span class="font-medium">{{ setting('setting.tel') }}</span>
|
||||
hoặc
|
||||
thông qua Email <span class="font-medium">{{ setting('setting.support') }}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('frontend.order.modal.destroy', [
|
||||
@include('frontend.order.modal.destroy', [
|
||||
'order_id' => $orders->id,
|
||||
'order_num' => $orders->order_num,
|
||||
])
|
||||
|
||||
@include('frontend.order.modal.confirm', [
|
||||
@include('frontend.order.modal.confirm', [
|
||||
'order_id' => $orders->id,
|
||||
'order_num' => $orders->order_num,
|
||||
])
|
||||
|
||||
@@ -135,7 +135,6 @@
|
||||
<div class="mt-6 pt-4 border-t border-gray-200">
|
||||
<div class="flex items-center justify-between text-sm text-gray-500">
|
||||
<span>Cập nhật lần cuối: {{ $vmInfo['last_updated'] }}</span>
|
||||
<span>VM ID: {{ $vmInfo['vm_id'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
|
||||
Reference in New Issue
Block a user