241 lines
9.3 KiB
HTML
241 lines
9.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="vi">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Địa chỉ của bạn - EuroTile Worker</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link rel="stylesheet" href="assets/css/style.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
</head>
|
|
<style>
|
|
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0,0,0,0.5);
|
|
z-index: 1000;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.modal-content {
|
|
background: white;
|
|
border-radius: 12px;
|
|
width: 100%;
|
|
max-width: 500px;
|
|
animation: slideUp 0.3s ease;
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from { transform: translateY(20px); opacity: 0; }
|
|
to { transform: translateY(0); opacity: 1; }
|
|
}
|
|
|
|
.modal-header {
|
|
padding: 20px;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 20px;
|
|
}
|
|
|
|
.modal-footer {
|
|
padding: 20px;
|
|
border-top: 1px solid #e5e7eb;
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 20px;
|
|
color: #6b7280;
|
|
cursor: pointer;
|
|
}
|
|
|
|
</style>
|
|
|
|
<body>
|
|
<div class="page-wrapper">
|
|
<!-- Header -->
|
|
<div class="header">
|
|
<a href="account.html" class="back-button">
|
|
<i class="fas fa-arrow-left"></i>
|
|
</a>
|
|
<h1 class="header-title">Địa chỉ của bạn</h1>
|
|
<button class="back-button" onclick="openInfoModal()">
|
|
<i class="fas fa-info-circle"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Info Modal -->
|
|
<div id="infoModal" class="modal-overlay" style="display: none;">
|
|
<div class="modal-content info-modal">
|
|
<div class="modal-header">
|
|
<h3 class="modal-title" style="font-weight: bold;">Hướng dẫn sử dụng</h3>
|
|
<button class="modal-close" onclick="closeInfoModal()">
|
|
<i class="fas fa-times"></i>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>Đây là nội dung hướng dẫn sử dụng cho tính năng Đổi quà tặng:</p>
|
|
<ul class="list-disc ml-6 mt-3">
|
|
<li>Sử dụng điểm tích lũy của bạn để đổi các phần quà giá trị trong danh mục.</li>
|
|
<li>Bấm vào một phần quà để xem chi tiết và điều kiện áp dụng.</li>
|
|
<li>Khi xác nhận đổi quà, bạn có thể chọn "Nhận hàng tại Showroom".</li>
|
|
<li>Nếu chọn "Nhận hàng tại Showroom", bạn sẽ cần chọn Showroom bạn muốn đến nhận từ danh sách thả xuống.</li>
|
|
<li>Quà đã đổi sẽ được chuyển vào mục "Quà của tôi" (trong trang Hội viên).</li>
|
|
</ul>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-primary" onclick="closeInfoModal()">Đóng</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="container">
|
|
<!-- Address List -->
|
|
<div class="address-list">
|
|
<!-- Default Address -->
|
|
<div class="address-item default">
|
|
<div class="address-content">
|
|
<div class="address-header">
|
|
<h4 class="address-name">Hoàng Minh Hiệp</h4>
|
|
<span class="default-badge">Mặc định</span>
|
|
</div>
|
|
<p class="address-phone">0347302911</p>
|
|
<p class="address-text">
|
|
123 Đường Võ Văn Ngân, Phường Linh Chiểu,
|
|
Thành phố Thủ Đức, TP.HCM
|
|
</p>
|
|
</div>
|
|
<div class="address-actions">
|
|
<button class="btn-address-edit" onclick="editAddress(1)">
|
|
<i class="fas fa-edit"></i>
|
|
</button>
|
|
<button class="btn-address-delete" onclick="deleteAddress(1)">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Address 2 -->
|
|
<div class="address-item">
|
|
<div class="address-content">
|
|
<div class="address-header">
|
|
<h4 class="address-name">Hoàng Minh Hiệp</h4>
|
|
<button class="set-default-btn" onclick="setDefault(2)">Đặt mặc định</button>
|
|
</div>
|
|
<p class="address-phone">0347302911</p>
|
|
<p class="address-text">
|
|
456 Đường Nguyễn Thị Minh Khai, Quận 3, TP.HCM
|
|
</p>
|
|
</div>
|
|
<div class="address-actions">
|
|
<button class="btn-address-edit" onclick="editAddress(2)">
|
|
<i class="fas fa-edit"></i>
|
|
</button>
|
|
<button class="btn-address-delete" onclick="deleteAddress(2)">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Address 3 -->
|
|
<div class="address-item">
|
|
<div class="address-content">
|
|
<div class="address-header">
|
|
<h4 class="address-name">Công ty TNHH ABC</h4>
|
|
<button class="set-default-btn" onclick="setDefault(3)">Đặt mặc định</button>
|
|
</div>
|
|
<p class="address-phone">0283445566</p>
|
|
<p class="address-text">
|
|
789 Đường Lê Văn Sỹ, Quận Phú Nhuận, TP.HCM
|
|
</p>
|
|
</div>
|
|
<div class="address-actions">
|
|
<button class="btn-address-edit" onclick="editAddress(3)">
|
|
<i class="fas fa-edit"></i>
|
|
</button>
|
|
<button class="btn-address-delete" onclick="deleteAddress(3)">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Add New Address Button -->
|
|
<button class="btn btn-primary w-100 mt-3" onclick="window.location.href='address-create.html'">
|
|
<i class="fas fa-plus"></i>
|
|
Thêm địa chỉ mới
|
|
</button>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<script>
|
|
function addAddress() {
|
|
alert('Chức năng thêm địa chỉ mới sẽ được phát triển');
|
|
}
|
|
|
|
function editAddress(id) {
|
|
alert('Chỉnh sửa địa chỉ #' + id);
|
|
}
|
|
|
|
function deleteAddress(id) {
|
|
if (confirm('Bạn có chắc chắn muốn xóa địa chỉ này?')) {
|
|
alert('Đã xóa địa chỉ #' + id);
|
|
}
|
|
}
|
|
|
|
function setDefault(id) {
|
|
document.querySelectorAll('.address-item').forEach(item => {
|
|
item.classList.remove('default');
|
|
item.querySelector('.default-badge')?.remove();
|
|
const setDefaultBtn = item.querySelector('.set-default-btn');
|
|
if (setDefaultBtn) setDefaultBtn.style.display = 'block';
|
|
});
|
|
|
|
const targetItem = document.querySelector('.address-item:nth-child(' + id + ')');
|
|
targetItem.classList.add('default');
|
|
targetItem.querySelector('.address-header').innerHTML += '<span class="default-badge">Mặc định</span>';
|
|
const btn = targetItem.querySelector('.set-default-btn');
|
|
if (btn) btn.style.display = 'none';
|
|
|
|
alert('Đã đặt làm địa chỉ mặc định');
|
|
}
|
|
|
|
function openInfoModal() {
|
|
document.getElementById('infoModal').style.display = 'flex';
|
|
}
|
|
|
|
function closeInfoModal() {
|
|
document.getElementById('infoModal').style.display = 'none';
|
|
}
|
|
|
|
function viewOrderDetail(orderId) {
|
|
window.location.href = `order-detail.html?id=${orderId}`;
|
|
}
|
|
|
|
// Close modal when clicking outside
|
|
document.addEventListener('click', function(e) {
|
|
if (e.target.classList.contains('modal-overlay')) {
|
|
e.target.style.display = 'none';
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |