update sometimes

This commit is contained in:
pbao9
2025-07-28 17:02:13 +07:00
parent c1698e7fe7
commit 5ea42105f9
25 changed files with 259 additions and 325 deletions
+68 -78
View File
@@ -8,6 +8,7 @@
width: 100%;
z-index: 1000;
}
.dropdown-selected {
display: flex;
justify-content: space-between;
@@ -23,14 +24,17 @@
position: relative;
z-index: 1001;
}
.dropdown-selected:hover {
border-color: #f66d2f;
box-shadow: 0 0 0 3px rgba(246, 109, 47, 0.1);
}
.dropdown-selected.active {
border-color: #f66d2f;
box-shadow: 0 0 0 3px rgba(246, 109, 47, 0.1);
}
.dropdown-options {
position: absolute;
top: 100%;
@@ -46,9 +50,11 @@
margin-top: 4px;
display: none;
}
.dropdown-options.show {
display: block !important;
}
.dropdown-option {
padding: 12px 16px;
cursor: pointer !important;
@@ -56,22 +62,27 @@
border-bottom: 1px solid #f3f4f6;
user-select: none;
}
.dropdown-option:hover {
background: #fff5f0;
color: #f66d2f;
}
.dropdown-option.selected {
background: #f66d2f;
color: white;
}
.dropdown-option:last-child {
border-bottom: none;
}
.dropdown-arrow {
transition: transform 0.2s ease;
color: #6b7280;
font-size: 12px;
}
.dropdown-selected.active .dropdown-arrow,
.dropdown-arrow.rotate-180 {
transform: rotate(180deg);
@@ -94,7 +105,7 @@
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8" x-data="{
paymentPeriod: {{ $cartItems[0]['months'] ?? 6 }},
baseTotal: {{ $cartItems[0]['product']->price_sale ?? $cartItems[0]['product']->price ?? 0 }},
baseTotal: {{ $cartItems[0]['product']->price_sale ?? ($cartItems[0]['product']->price ?? 0) }},
get totalPrice() {
const originalPrice = this.baseTotal * this.paymentPeriod;
const discount = this.paymentPeriod >= 12 ? Math.round(originalPrice * 0.1) : 0;
@@ -139,8 +150,6 @@
</p>
</div>
</div>
<!-- Product Title and Price -->
<div class="bg-white rounded-lg border border-gray-200 p-6">
<input type="hidden" name="product_id" value="{{ $product->id }}" />
@@ -183,102 +192,83 @@
<div>• Control Panel: Cpanel.</div>
@else
<!-- VPS Features -->
<div
class="flex items-center space-x-3 p-3 bg-gradient-to-r from-blue-50 to-indigo-50 rounded-lg border border-blue-100">
<div class="flex items-center space-x-3">
<div class="flex-shrink-0">
<svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z">
</path>
</svg>
<img src="{{ asset('/icon/cpu.svg') }}" alt="CPU" class="w-5 h-5">
</div>
<div>
<div class="font-semibold text-blue-800">{{ $product->cpu ?? 'Không rõ' }}
vCore</div>
<div class="text-xs text-blue-600">CPU</div>
<div class="flex items-center gap-2">
<span class="text-md font-semibold">CPU:</span>
<div class="font-semibold text-blue-800">
<span>{{ $product->cpu ?? 'Không rõ' }}</span>
<span class="text-xs text-blue-600">vCore</span>
</div>
</div>
</div>
<div class="flex items-center space-x-3">
<div class="flex-shrink-0">
<img src="{{ asset('/icon/ram.svg') }}" alt="Ram" class="w-5 h-5">
</div>
<div class="flex items-center gap-2">
<span class="text-md font-semibold">RAM:</span>
<div class="font-semibold text-blue-800">
<span>{{ $product->ram ?? 'Không rõ' }}</span>
<span class="text-xs text-blue-600">GB</span>
</div>
</div>
</div>
<div
class="flex items-center space-x-3 p-3 bg-gradient-to-r from-green-50 to-emerald-50 rounded-lg border border-green-100">
<div class="flex items-center space-x-3">
<div class="flex-shrink-0">
<svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10">
</path>
</svg>
<img src="{{ asset('/icon/storage.svg') }}" alt="Disk" class="w-5 h-5">
</div>
<div>
<div class="font-semibold text-green-800">{{ $product->ram ?? 'Không rõ' }}
GB</div>
<div class="text-xs text-green-600">RAM</div>
<div class="flex items-center gap-2">
<span class="text-md font-semibold">Disk:</span>
<div class="font-semibold text-blue-800">
<span>{{ $product->disk ?? 'Không rõ' }}</span>
<span class="text-xs text-blue-600">GB</span>
</div>
</div>
</div>
<div
class="flex items-center space-x-3 p-3 bg-gradient-to-r from-purple-50 to-violet-50 rounded-lg border border-purple-100">
<div class="flex items-center space-x-3">
<div class="flex-shrink-0">
<svg class="w-5 h-5 text-purple-600" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4">
</path>
</svg>
<img src="{{ asset('/icon/video.svg') }}" alt="GPU" class="w-5 h-5">
</div>
<div>
<div class="font-semibold text-purple-800">
{{ $product->disk ?? 'Không rõ' }} GB</div>
<div class="text-xs text-purple-600">SSD Storage</div>
<div class="flex items-center gap-2">
<span class="text-md font-semibold">GPU:</span>
<div class="font-semibold text-blue-800">
<span>{{ $product->gpu ?? 'Không rõ' }}</span>
<span class="text-xs text-blue-600">GB</span>
</div>
</div>
</div>
<div
class="flex items-center space-x-3 p-3 bg-gradient-to-r from-orange-50 to-amber-50 rounded-lg border border-orange-100">
<div class="flex items-center space-x-3">
<div class="flex-shrink-0">
<svg class="w-5 h-5 text-orange-600" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z">
</path>
</svg>
<img src="{{ asset('/icon/network.svg') }}" alt="IP" class="w-5 h-5">
</div>
<div>
<div class="font-semibold text-orange-800">{{ $product->gpu ?? 'Không' }}
GB</div>
<div class="text-xs text-orange-600">GPU</div>
<div class="flex items-center gap-2">
<span class="text-md font-semibold">IP Public:</span>
<div class="font-semibold text-blue-800">
<span>{{ $product->ip ?? 'Không rõ' }}</span>
<span class="text-xs text-blue-600">IP</span>
</div>
</div>
</div>
<div
class="flex items-center space-x-3 p-3 bg-gradient-to-r from-teal-50 to-cyan-50 rounded-lg border border-teal-100">
<div class="flex items-center space-x-3">
<div class="flex-shrink-0">
<svg class="w-5 h-5 text-teal-600" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9v-9m0-9v9"></path>
</svg>
<img src="{{ asset('/icon/bandwidth.svg') }}" alt="Bandwidth"
class="w-5 h-5">
</div>
<div>
<div class="font-semibold text-teal-800">{{ $product->ip ?? '1' }}</div>
<div class="text-xs text-teal-600">IP Public</div>
</div>
</div>
<div
class="flex items-center space-x-3 p-3 bg-gradient-to-r from-rose-50 to-pink-50 rounded-lg border border-rose-100">
<div class="flex-shrink-0">
<svg class="w-5 h-5 text-rose-600" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M13 10V3L4 14h7v7l9-11h-7z"></path>
</svg>
</div>
<div>
<div class="font-semibold text-rose-800">
{{ $product->bandwidth ?? 'Không giới hạn' }}</div>
<div class="text-xs text-rose-600">Băng thông</div>
<div class="flex items-center gap-2">
<span class="text-md font-semibold">Băng thông:</span>
<div class="font-semibold text-blue-800">
<span>{{ $product->bandwidth ?? 'Không rõ' }}</span>
<span class="text-xs text-blue-600">GB</span>
</div>
</div>
</div>
@endif
@@ -368,7 +358,7 @@
<!-- Right Column - Payment Summary -->
<div class="space-y-6">
<!-- Payment Period & Addons Section -->
<livewire:cart.summary-addons :product="$item['product']" :addons="$item['addon'] ?? []" :index="$index"
:months="$item['months']" />